In Development when i change the views,controllers, routes, etc. There’s no need to restart the rails server, but we do need in Production environment? Is it saving something in the memory so that we need the restart?
And about all the Gem files that we need in Gemfile (Gemfile.lock), are those Gems loaded (or save into somewhere) when we run the rails app, or is it loaded on-demand?
All of your views controllers and routes are cached in production to speed the app along. It would be a very bad thing to have to reload all of those for every request. This is taken from development.rb:
Also, your gems are loaded when the application environment starts. Those are installed to your global gem directory by doing a
bundle install. When you deploy to another server, you have to dobundle installon those as well.