`method_missing': undefined local variable or method `development' for AppName::Application:Class (NameError)

638 Views Asked by At

Rail version - 4.2.3 When i try to start my app in production environment

rails s RAILS_ENV=production

I get this error :

/.rvm/gems/ruby-2.2.4/gems/railties-4.2.3/lib/rails/railtie.rb:196:in method_missing': undefined local variable or methoddevelopment'

2

There are 2 best solutions below

0
On

Try with:

RAILS_ENV=production rails s

or

rails s -e production
0
On

It occurred because of specifying wrong configuration in application.rb file