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

0

Well, I'm starting in Ruby on rails, I'd like to understand the following error when generating the

rake db:create
so I can fix 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)
    
asked by anonymous 29.10.2015 / 00:54

2 answers

1

In the Gemfile file, you also add the gem:

  

gem 'therubyracer'

Then just give a bundle install and try again. :)

    
14.11.2015 / 20:06
1

Try to enter these commands into the terminal

gem install execjs
sudo aptitude install nodejs -y
sudo apt-get install g++ -y
gem install therubyracer
    
05.03.2016 / 14:41