When upgrading to Rails 4.2.3 I get "NameError: uninitialized constant ActionController::Responder"
When upgrading to Rails 4.2.3 I get "NameError: uninitialized constant ActionController::Responder"
我进行了很多 gem 升级,使我的 rails
版本升级到 4.2.3
。但是当我尝试访问我的应用程序时(运行 在 Pow 服务器上)我现在收到以下错误:
Your Rack app raised an exception when Pow tried to run it.
NameError: uninitialized constant ActionController::Responder
~/.rvm/gems/ruby-2.0.0-p247/gems/inherited_resources-1.4.1/lib/inherited_resources/responder.rb:2:in `<module:InheritedResources>'
~/.rvm/gems/ruby-2.0.0-p247/gems/inherited_resources-1.4.1/lib/inherited_resources/responder.rb:1:in `<top (required)>'
~/.rvm/gems/ruby-2.0.0-p247/gems/inherited_resources-1.4.1/lib/inherited_resources.rb:4:in `<top (required)>'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
~/Projekter/myapp/config/application.rb:14:in `<top (required)>'
~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
~/Projekter/myapp/config/environment.rb:3:in `<top (required)>'
~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
~/Projekter/myapp/config.ru:3:in `block in <main>'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/builder.rb:4:in `instance_eval'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/builder.rb:4:in `initialize'
~/Projekter/myapp/config.ru:1:in `new'
~/Projekter/myapp/config.ru:1:in `<main>'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:51:in `eval'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:51:in `load_config'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:42:in `initialize'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:12:in `new'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:12:in `run'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/bin/nack_worker:4:in `<main>'
这是我的 Gemfile 的简化版本:
source 'https://rubygems.org'
gem 'rails', '4.2.3'
gem 'sass-rails', '>= 5.0.3'
gem 'sprockets-rails', '~> 2.3.2'
gem 'activeresource'
gem "jquery-rails"
gem "thin", ">= 1.5.0"
gem 'mongoid', '4.0.0', github: 'mongoid/mongoid'
gem 'moped', '2.0.2', github: 'mongoid/moped'
gem 'bson_ext'
gem "bson", '2.3.0'
gem "haml-rails", ">= 0.9.0"
gem 'bootstrap-sass', '~> 3.3.5'
gem "devise"
gem 'inherited_resources', '1.4.1'
gem 'i18n-js'
gem 'awesome_print'
gem 'therubyracer'
gem 'protected_attributes'
gem 'actionpack-action_caching'
gem 'rails-observers'
gem 'sinatra', :require => nil
gem 'nokogiri', '1.6.6.2'
gem 'rails-i18n', '~> 4.0.4'
gem 'capistrano', '2.15.5'
gem 'unicorn', '4.8.3'
gem 'i18n_country_select'
gem 'i18n-country-translations'
gem 'http_accept_language'
我曾尝试搜索其他遇到此问题并已解决的人,但他们似乎不存在。
respond_with
已在 Rails 4.2 中单独移动 gem。您需要将 gem 添加到 gem 文件
gem 'responders', '~> 2.0'
查看 Rails upgrade guide 以了解您可能错过的其他内容。
我进行了很多 gem 升级,使我的 rails
版本升级到 4.2.3
。但是当我尝试访问我的应用程序时(运行 在 Pow 服务器上)我现在收到以下错误:
Your Rack app raised an exception when Pow tried to run it.
NameError: uninitialized constant ActionController::Responder
~/.rvm/gems/ruby-2.0.0-p247/gems/inherited_resources-1.4.1/lib/inherited_resources/responder.rb:2:in `<module:InheritedResources>'
~/.rvm/gems/ruby-2.0.0-p247/gems/inherited_resources-1.4.1/lib/inherited_resources/responder.rb:1:in `<top (required)>'
~/.rvm/gems/ruby-2.0.0-p247/gems/inherited_resources-1.4.1/lib/inherited_resources.rb:4:in `<top (required)>'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
~/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
~/Projekter/myapp/config/application.rb:14:in `<top (required)>'
~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
~/Projekter/myapp/config/environment.rb:3:in `<top (required)>'
~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
~/Projekter/myapp/config.ru:3:in `block in <main>'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/builder.rb:4:in `instance_eval'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/builder.rb:4:in `initialize'
~/Projekter/myapp/config.ru:1:in `new'
~/Projekter/myapp/config.ru:1:in `<main>'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:51:in `eval'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:51:in `load_config'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:42:in `initialize'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:12:in `new'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:12:in `run'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/bin/nack_worker:4:in `<main>'
这是我的 Gemfile 的简化版本:
source 'https://rubygems.org'
gem 'rails', '4.2.3'
gem 'sass-rails', '>= 5.0.3'
gem 'sprockets-rails', '~> 2.3.2'
gem 'activeresource'
gem "jquery-rails"
gem "thin", ">= 1.5.0"
gem 'mongoid', '4.0.0', github: 'mongoid/mongoid'
gem 'moped', '2.0.2', github: 'mongoid/moped'
gem 'bson_ext'
gem "bson", '2.3.0'
gem "haml-rails", ">= 0.9.0"
gem 'bootstrap-sass', '~> 3.3.5'
gem "devise"
gem 'inherited_resources', '1.4.1'
gem 'i18n-js'
gem 'awesome_print'
gem 'therubyracer'
gem 'protected_attributes'
gem 'actionpack-action_caching'
gem 'rails-observers'
gem 'sinatra', :require => nil
gem 'nokogiri', '1.6.6.2'
gem 'rails-i18n', '~> 4.0.4'
gem 'capistrano', '2.15.5'
gem 'unicorn', '4.8.3'
gem 'i18n_country_select'
gem 'i18n-country-translations'
gem 'http_accept_language'
我曾尝试搜索其他遇到此问题并已解决的人,但他们似乎不存在。
respond_with
已在 Rails 4.2 中单独移动 gem。您需要将 gem 添加到 gem 文件
gem 'responders', '~> 2.0'
查看 Rails upgrade guide 以了解您可能错过的其他内容。