error giving the command rake db:create in summer Rails 4.0.0

Asked

Viewed 166 times

0

Well, I’m starting on Ruby on Rails, I’d like to understand the following error when generating the command

rake db:create
so I can solve it.

/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
rake aborted!
ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/execjs-2.6.0/lib/execjs/runtimes.rb:48:in `autodetect'
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/execjs-2.6.0/lib/execjs.rb:5:in `'
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/execjs-2.6.0/lib/execjs.rb:4:in `'
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/uglifier-2.7.2/lib/uglifier.rb:3:in `require'
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/uglifier-2.7.2/lib/uglifier.rb:3:in `'
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
/home/jefferson/.rvm/gems/ruby-2.2.3@catalo/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
/home/jefferson/Documentos/Ruby_project/catalo/config/application.rb:7:in `'
/home/jefferson/Documentos/Ruby_project/catalo/Rakefile:4:in `'
(See full trace by running task with --trace)

2 answers

1

In the Gemfile file, you also add to Gem:

In 'therubyracer'

Then just take a Bundle install and try again. :)

1

Try typing these commands into the terminal

gem install execjs
sudo aptitude install nodejs -y
sudo apt-get install g++ -y
gem install therubyracer

Browser other questions tagged

You are not signed in. Login or sign up in order to post.