简体   繁体   中英

Do I need to restart Server : Ruby on Rails

Do I need to restart Server when i change the database host in the database.yml in Ruby on Rails. Database is Postgres.

I haven't worked on Ruby On Rails, and the reason i am asking this is because its a production server.

You need to restart the service which responsible for running your rails application in order to take effects eg unicorn, puma or whatever used to run the applicaition. not restarting the whole server itself

You need to restart you server when you need Rails to be loaded again from the start.

If you're adding or removing gems, then yes, you will need to restart the server.

If you change your version of ruby, change your Gemfile or change something from internal classes of Rails, you will need to restart it, otherwise it should be ok. But if unexpected problems arise, restart the server is the first thing you should try.

Also, on a side-note, you will only see the changes just refreshing the page if config.cache_classes is set to false (which I think is the default for development, but not for production).

Making changes to anything outside of app/ or config/routes.rb or db/ will require a restart.

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