簡體   English   中英

嘗試升級到Rails 3.1時遇到錯誤:method_missing':未定義的方法`action_mailer

[英]Trying to upgrade to rails 3.1 getting the error: method_missing': undefined method `action_mailer

我們已經使用Rails 3.0.9已有很長時間了,由於依賴關系,我們現在想升級到最新版本。 我們從以下位置設置gem文件:

gem 'rails', '3.0.9'
gem 'rake', '0.9.2.2'

至:

gem 'rails'
gem 'rake'
gem "actionmailer"

現在,當我們嘗試運行rails時,出現以下錯誤:

/Users/xxx/.rvm/gems/ruby-1.9.2-p180@andyw/gems/railties-3.2.2/lib/rails/railtie/configuration.rb:85:in `method_missing': undefined method `action_mailer' for #<Rails::Application::Configuration:0x00000102b66c48> (NoMethodError)
    from /Users/xxx/Sites/picasso/config/environments/development.rb:18:in `block in <top (required)>'
    from /Users/xxx/.rvm/gems/ruby-1.9.2-p180@andyw/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:24:in `class_eval'
    from /Users/xxx/.rvm/gems/ruby-1.9.2-p180@andyw/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:24:in `configure'
    from /Users/xxx/Sites/picasso/config/environments/development.rb:1:in `<top (required)>'
    from /Users/xxx/.rvm/gems/ruby-1.9.2-p180@andyw/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'

有想法嗎? 謝謝

嘗試只放

gem 'rails', '3.2.2'

在您的Gemfile中,然后運行bundle命令。 您無需擔心actionmailer或gemfile中的rake。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM