Rails: NoMethodError: undefined method `config' for nil:NilClass

Posted . Visible to the public.

While trying to upgrade from Rails 3.2 to 4.0 I had this problem when starting the app:

NoMethodError: undefined method `config' for nil:NilClass
/var/lib/gems/1.9.1/gems/railties-4.0.13/lib/rails.rb:32:in `configuration'
/var/lib/gems/1.9.1/gems/newrelic_rpm-3.4.1/lib/newrelic_rpm.rb:44:in `<top (required)>'
/var/lib/gems/1.9.1/gems/bundler-1.10.5/lib/bundler/runtime.rb:76:in `require'
/var/lib/gems/1.9.1/gems/bundler-1.10.5/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/var/lib/gems/1.9.1/gems/bundler-1.10.5/lib/bundler/runtime.rb:72:in `each'
/var/lib/gems/1.9.1/gems/bundler-1.10.5/lib/bundler/runtime.rb:72:in `block in require'
/var/lib/gems/1.9.1/gems/bundler-1.10.5/lib/bundler/runtime.rb:61:in `each'
/var/lib/gems/1.9.1/gems/bundler-1.10.5/lib/bundler/runtime.rb:61:in `require'
/var/lib/gems/1.9.1/gems/bundler-1.10.5/lib/bundler.rb:134:in `require'
/vagrant/config/application.rb:12:in `<top (required)>'
/vagrant/Rakefile:4:in `require'
/vagrant/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

Solution

The issue seems to be with newrelic_rpm. The version being used is 3.4.1. Upgrading the gem to the latest version (3.12.1.298 at the time of writing) seems to resolve the issue.

adre
Last edit
adre
Posted by adre to Foxsoft (2015-07-14 15:07)