0

我在我的linux系统上安装了所有ruby on rails..然后当我输入命令'rake about'时,以下是错误..plz帮助

   rake aborted!
   Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a                   list of available runtimes.
   /home/imobigeeks1/work/demo/jbuilder/ruby/1.8/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect'
   /home/imobigeeks1/work/demo/jbuilder/ruby/1.8/gems/execjs-1.4.0/lib/execjs.rb:5
   /home/imobigeeks1/work/demo/jbuilder/ruby/1.8/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
   /home/imobigeeks1/work/demo/jbuilder/ruby/1.8/gems/coffee-script-2.2.0/lib/coffee_script.rb:1
   /home/imobigeeks1/work/demo/jbuilder/ruby/1.8/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
   /home/imobigeeks1/work/demo/jbuilder/ruby/1.8/gems/coffee-script-2.2.0/lib/coffee-    script.rb:1
   /home/imobigeeks1/work/demo/jbuilder/ruby/1.8/gems/coffee-rails-3.2.2/lib/coffee-  rails.rb:1:in `require'
   /home/imobigeeks1/work/demo/jbuilder/ruby/1.8/gems/coffee-rails-3.2.2/lib/coffee-  rails.rb:1
   /home/imobigeeks1/work/demo/config/application.rb:7
   /home/imobigeeks1/work/demo/Rakefile:5
   (See full trace by running task with --trace)

而且我还使用gem install execjs命令安装了javascript,仍然显示相同的问题

4

1 回答 1

0

放入gem 'therubyracer'您的gemfile,然后bundle install从命令行执行。

这颗宝石是为了——

从 Ruby 调用 JavaScript 代码并操作 JavaScript 对象。调用 Ruby 代码并从 JavaScript 操作 Ruby 对象。

来源 - http://rubydoc.info/gems/therubyracer/0.11.4/frames

于 2013-03-13T11:46:49.960 回答