0

我在玩 bundler 和 binstubs 以及“rake rails:update:bin”,下次我尝试运行 rails si 时遇到了这个异常:

`inherited': undefined method `application' for Rails:Module (NoMethodError)

即使对于我创建并尝试运行的新项目,也会出现相同的异常。

以下是全文:

C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:63:in `inherited': undefined method `application' for Rails:Module (NoMethodError)
from F:/aptana projects/testy/config/application.rb:10:in `<module:Testy>'
from F:/aptana projects/testy/config/application.rb:9:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
4

1 回答 1

1

好吧,发布后几分钟,我尝试了:

gem uninstall railties

然后再一次

bundle install

它解决了这个问题。不过,我仍然不知道一开始会发生什么。

于 2013-10-30T20:51:48.990 回答