2012-10-24 84 views
2

我正在使用Ubuntu 12.04。「找不到JavaScript運行時。」在執行refinerycms命令期間

我正在嘗試使用煉油廠CMS創建一個新的網站。 我讀了the official Getting Started guide,並執行了下面的命令。

$ refinerycms rickrockstar 

,但我得到了以下錯誤消息:

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. 
     rake db:create 
rake aborted! 
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. 

(See full trace by running task with --trace) 
    generate refinery:cms --fresh-installation 
/home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `block (2 levels) in require' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `each' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `block in require' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `each' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `require' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.2.1/lib/bundler.rb:128:in `require' 
     from /srv/samba/share/refinery2test/rickrockstar/config/application.rb:13:in `<top (required)>' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.8/lib/rails/commands.rb:24:in `require' 
     from /home/jharai/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.8/lib/rails/commands.rb:24:in `<top (required)>' 
     from script/rails:6:in `require' 
     from script/rails:6:in `<main>' 

我上粘貼要點因爲the entire output它太長。

奇怪的是,我在幾天前試過同樣的命令,那時一切正常。

爲什麼會出現這種情況?我該如何解決它?

+0

我張貼的問題的原因的問題。 https://github.com/refinery/refinerycms/issues/2001 –

回答

0

爲了解決它,我做的事:

  • 運行refinerycms rickrockstar - 它會失敗,你描述
  • 編輯rickrockstar/Gemfile並取消*gem 'therubyracer', :platforms => :ruby*例外並保存更改;
  • 運行refinerycms rickrockstar再次
  • Gemfile中會有衝突,並詢問是否要覆蓋它。答覆否;與衝突
  • CD rickrockstar
  • 覆蓋其他文件
  • 軌小號