In my first rails project (using mysql), I tried to run the rake db:create
command, but I got the following error:
Could not find JavaScript executable. See https://github.com/sstephenson/execjs for a list of available battery life.
So, I included the gem 'therubyracer', require: "v8"
in my Gemfile and executed a bundle install
. The problem is resolved, but it left some doubts.
Can someone give me an explanation why javascript runtime is required to complete this task? I am new to Ruby and RoR, so it seems rather strange to me, why does RoR use javascript to create a database?
source share