2013-06-23 58 views
0

日誌的Rails 3開始服務器獲取消息ExecJS時:: RuntimeUnavailable

[email protected]:/rails_projects/test2$ rails server 
/usr/local/rvm/gems/[email protected]/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 /usr/local/rvm/gems/[email protected]/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>' 
    from /usr/local/rvm/gems/[email protected]/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>' 
    from /usr/local/rvm/gems/[email protected]/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require' 
    from /usr/local/rvm/gems/[email protected]/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>' 
    from /usr/local/rvm/gems/[email protected]/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require' 
    from /usr/local/rvm/gems/[email protected]/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>' 
    from /usr/local/rvm/gems/[email protected]/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require' 
    from /usr/local/rvm/gems/[email protected]/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler.rb:132:in `require' 
    from /rails_projects/test2/config/application.rb:7:in `<top (required)>' 
    from /usr/local/rvm/gems/[email protected]/gems/railties-3.2.3/lib/rails/commands.rb:53:in `require' 
    from /usr/local/rvm/gems/[email protected]/gems/railties-3.2.3/lib/rails/commands.rb:53:in `block in <top (required)>' 
    from /usr/local/rvm/gems/[email protected]/gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap' 
    from /usr/local/rvm/gems/[email protected]/gems/railties-3.2.3/lib/rails/commands.rb:50:in `<top (required)>' 
    from script/rails:6:in `require' 
    from script/rails:6:in `<main>' 

的Gemfile:

source 'https://rubygems.org' 

gem 'rails', '3.2.3' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 

gem 'sqlite3' 


# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 

    # See https://github.com/sstephenson/execjs#readme for more supported runtimes 
    # gem 'therubyracer', :platform => :ruby 

    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

gem 'execjs' 

# To use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# To use Jbuilder templates for JSON 
# gem 'jbuilder' 

# Use unicorn as the app server 
# gem 'unicorn' 

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'ruby-debug19', :require => 'ruby-debug' 

任何幫助將衷心感謝。謝謝,格雷格。

編輯不會允許我發佈它,有什麼地方可以將文件郵寄給我嗎? 感謝 格雷格

+0

你可以發佈你的Gemfile嗎? –

回答

0

取消註釋此行Gemfile和運行bundle進行安裝:

gem 'therubyracer', :platform => :ruby 

更新

刪除RVM:

rvm implode 

安裝回去使用本教程:

http://www.andrehonsberg.com/article/install-rvm-ubuntu-1204-linux-for-ruby-193

+0

現在開始,但在輸出1000行後,它會以mnessage中止: – Greg

+0

您可能遇到Ruby解釋器或擴展庫中的錯誤。錯誤報告是受歡迎的。現在有什麼建議嗎?謝謝,格雷格 – Greg

+0

錯誤消息的第一部分說:/usr/local/rvm/gems/[email protected]/gems/json-1.8.0/lib/json/common.rb:67:[BUG ]未知類型0x22(0xc給出)ruby 1.9.3p429(2013-05-15 revision 40747)[i686-linux]控制幀信息(太多錯誤行列出) – Greg

相關問題