将rails从2.2.2升级到2.3.9获取未定义的方法

时间:2010-12-12 20:18:26

标签: ruby-on-rails

将rails app从2.2.2升级到2.3.9时,第一个错误是:

D:\web>ruby script/server -trace
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- script/../config/boo
t (LoadError)
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from script/server:2:in `<main>'

所以我改变了脚本/服务器......

require File.dirname(__FILE__) + '/../config/boot'

为:

require File.expand_path('../../config/boot', __FILE__)

现在我得到了:

D:\web>ruby script/server --trace
C:/Ruby/lib/ruby/1.9.1/rubygems.rb:228:in `activate': undefined method `map' for nil:NilClass (NoMet
hodError)
        from C:/Ruby/lib/ruby/1.9.1/rubygems.rb:1119:in `try_activate'
        from <internal:lib/rubygems/custom_require>:32:in `rescue in require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from D:/web/vendor/rails/activesupport/lib/active_support.rb:56:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from D:/web/vendor/rails/railties/lib/commands/server.rb:1:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from script/server:4:in `<main>'

D:\web>

感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

这似乎是铁路插件的一些问题 也许您应该将其更新为与rails 2.3.9兼容的版本?


此外,更新rubygems后它有问题(它或一些宝石想要宝石工作)。并且在将rubygems更新为1.3.6后,将卸载gemcutter