3
嗨我正在升級Rails 2應用程序到Rails 3. 當我想運行如下類似的東西:rails c
,rake -T
等。它會拋出:未定義的方法`資產'爲#<Rails :: Application :: Configuration>
$ rails c
/usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/railtie/configuration.rb:77:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0xb6569120> (NoMethodError)
from /home/neoriddle/proyectos/interkids/config/application.rb:49
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:21:in `require'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:21
from script/rails:6:in `require'
from script/rails:6
,這是與rails c
和一個日誌運行rake -T
:
$ rake -T --trace
rake aborted!
undefined method `assets' for #<Rails::Application::Configuration:0xb658aa64>
/usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/railtie/configuration.rb:77:in `method_missing'
/home/neoriddle/proyectos/interkids/config/application.rb:49
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/home/neoriddle/proyectos/interkids/Rakefile:5
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/bin/rake:33
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
你有一些想法來解決這個問題?
我將從3.0升級到3.1,但現在我需要完成從2.x升級到3.0。 Rails 3.0現在需要一段時間,我需要努力工作。那麼我如何修復(暫時)以使其工作? – Israel
@NeoRiddle:從'config'中的文件中刪除引用'config.assets'的行。 –
@RyanBigg非常感謝你,禁用所有引用它的作品。 – Israel