我刚从rails 3.1.11升级到3.1.12。我正在使用ruby 1.9.3。在我使用 rails s 启动服务器后,我收到以下错误
=> Booting WEBrick
=> Rails 3.1.12 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Uncaught exception: No such middleware to insert after: "ActionDispatch::ShowExceptions"
我的Gem文件位于
之下source 'http://rubygems.org'
gem 'rails', '~> 3.1.12'
gem 'rake'
gem 'rack'
gem "haml"
gem "haml-rails"
gem 'mysql2'
gem 'airbrake'
gem 'newrelic_rpm'
问题在于newrelic_rpm和airbrake宝石。如果两者都被删除,应用程序工作。 使用newrelic_rpm我们会收到此错误。
Uncaught exception: undefined local variable or method `establish_connection' for ActiveRecord::Base:Class
使用airbrake我们会收到此错误
Uncaught exception: No such middleware to insert after: "ActionDispatch::ShowExceptions"