2011-10-17 17 views
2

以下是當我運行rails服務器時吐出的日誌...升級Rails項目從2.3.5到3.1,並得到:沒有這樣的文件加載 - rails/init.rb當我運行rails s

Roy-Sherrills-MacBook-Pro:emeraldcg tjs$ rails s 
=> Booting WEBrick 
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3000 
=> Call with -d to detach 
=> Ctrl-C to shutdown server 
Exiting 
/Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require': no such file to load -- rails/init.rb (LoadError) 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require' 
from /Users/tjs/Sites/emeraldcg/vendor/plugins/jrails/init.rb:1:in `block in <class:Plugin>' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/plugin.rb:81:in `eval' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/plugin.rb:81:in `block in <class:Plugin>' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing' 
from /Users/tjs/Sites/emeraldcg/config/environment.rb:5:in `<top (required)>' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require' 
from /Users/tjs/Sites/emeraldcg/config.ru:4:in `block in <main>' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.3/lib/rack/builder.rb:51:in `instance_eval' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.3/lib/rack/builder.rb:51:in `initialize' 
from /Users/tjs/Sites/emeraldcg/config.ru:1:in `new' 
from /Users/tjs/Sites/emeraldcg/config.ru:1:in `<main>' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.3/lib/rack/builder.rb:40:in `eval' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.3/lib/rack/builder.rb:40:in `parse_file' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.3/lib/rack/server.rb:200:in `app' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands/server.rb:46:in `app' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.3/lib/rack/server.rb:301:in `wrapped_app' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.3/lib/rack/server.rb:252:in `start' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands/server.rb:70:in `start' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:54:in `block in <top (required)>' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:49:in `tap' 
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:49:in `<top (required)>' 
from script/rails:6:in `require' 
from script/rails:6:in `<main>' 
Roy-Sherrills-MacBook-Pro:emeraldcg tjs$ 

有什麼想法嗎?

回答

1

我有一個類似的問題,全新安裝的Rails 3.1.1。我發現了一個解決方案,可以在我的論壇上通過barbared。請參閱該條目瞭解更多詳情。

rvm pkg install openssl 
    rvm remove 1.9.2 
    rvm install 1.9.2 --with-openssl-dir=$HOME/.rvm/usr 
相關問題