运行rake about command时出错

时间:2013-03-13 11:39:03

标签: ruby-on-rails

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

   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,但仍显示相同的问题

1 个答案:

答案 0 :(得分:0)

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

此宝石适用于 -

  

调用JavaScript代码并从Ruby操作JavaScript对象。呼叫   Ruby代码并从JavaScript处理Ruby对象。

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