Error launching Rails server: undefined method 'configure'

前端 未结 5 1677
情歌与酒
情歌与酒 2020-11-28 06:04

I\'m new to rails and working through Hartl\'s tutorial. Everything was fine until I tried to do the tutorial a second time and created another project trying to use the lat

5条回答
  •  囚心锁ツ
    2020-11-28 06:23

    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.

提交回复
热议问题