【发布时间】:2011-02-05 12:55:44
【问题描述】:
我已按照本教程将 ruby 升级到 1.9.2、rubygems 1.5.0 并安装了最新的 rails 3.0.3:
http://hivelogic.com/articles/ruby-rails-mongrel-mysql-osx
但现在我现有的项目不再有效。如果我做一个“ruby script/about”,我会得到这个:
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- /Users/sneigaard/work/rails/myproject/config/../vendor/rails/railties/lib/initializer (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from /Users/sneigaard/work/rails/myproject/config/boot.rb:45:in `load_initializer'
from /Users/sneigaard/work/rails/myproject/config/boot.rb:38:in `run'
from /Users/sneigaard/work/rails/myproject/config/boot.rb:11:in `boot!'
from /Users/sneigaard/work/rails/myproject/config/boot.rb:110:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from script/about:2:in `<main>'
如果我运行“mongrel_rails start”,我会收到此错误:
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `gem_original_require': no such file to load -- /Users/sneigaard/work/rails/myproject/config/../vendor/rails/railties/lib/initializer (LoadError)
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
from /Users/sneigaard/work/rails/myproject/config/boot.rb:45:in `load_initializer'
from /Users/sneigaard/work/rails/myproject/config/boot.rb:38:in `run'
from /Users/sneigaard/work/rails/myproject/config/boot.rb:11:in `boot!'
from /Users/sneigaard/work/rails/myproject/config/boot.rb:110
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
from /Users/sneigaard/work/rails/myproject/config/environment.rb:7
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:147:in `rails'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in `cloaker_'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `call'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `listener'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
from /usr/bin/mongrel_rails:19:in `load'
from /usr/bin/mongrel_rails:19
在脚本/服务器中我有这个:
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/server'
我已经搜索并搜索了网络,但我无法弄清楚,我的项目被卡住了:(请帮助我。
谢谢
索伦
【问题讨论】:
-
你真的需要 1.9.2 吗?我确实使用 Rails 3,并使用 rvm 设置了 Ruby 企业版(我强烈推荐)
标签: ruby-on-rails ruby-on-rails-3