Error launching Rails server: undefined method ‘configure’

I resolved it by doing following step.

Step 1: go to Project_Root_Directory/config/environment/development.rb

Change this line

Rails.application.configure do

To

Your_Rails_Application_Folder_name::Application.configure do

For example my rails project folder name is ‘Spree_demo’ so Your_Rails_Application_Folder_name in the following line:

Your_Rails_Application_Folder_name::Application.configure do

will be replaced as

SpreeDemo::Application.configure do

Note: See underscore in your application folder name it gets removed.

Hope it works for you guys.

Leave a Comment