简体   繁体   中英

Changed a value in my development.rb but it did not reflect on nginx server

so i have some json file that grabs the value from config/development.rb

In my development.rb i have this line

config.base_root_url = "XXXXXXsome URLXXXXXXX"

and in my json.jbuilder file at views i have this line

url: Rails.application.config.base_root_url + "views/somesite"

How come, when I change the config.base_root_url value it is not reflected on my nginx hosted domain. but on Localhost , it shows my changes ? i tried restarting my nginx server but its still the same.

Is config/development.rb a file you added? Or do you mean config/environments/development.rb . Your nginx will run the app in production env hence you will need to edit config/environment/production.rb as well.

您必须在config/environments/production.rb文件中进行更改,以反映nginx运行的应用程序的更改,因为它在生产环境中运行您的应用程序。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM