I’m newbie in Rails. When I change routes.rb file Rails does not reload it, means /rails/info/routes shows same old routes and rake routes shows new. If I stop rails server and start again, it shows new routes. If I rename routes.rb files I get an exception routes.rb not found.
If I create new controller, change view and other files in app, I can see result in browser immediately, means rails reloads that code.
I'm newbie in Rails. When I change routes.rb file Rails does not reload it,
means /rails/info/routes shows same old routes and rake routes shows new. If
I stop rails server and start again, it shows new routes. If I rename
routes.rb files I get an exception routes.rb not found.
Yes, that is the way it works. If you change routes.rb you need to
restart the server.
If I create new controller, change view and other files in app, I can see
result in browser immediately, means rails reloads that code.
I'm using docker if it is important, Dockerfile:
FROM ruby:2.2.0
I don’t understand your point about why it is important in this case.
Please clarify.
It is really not inportant in this case. My thought was maybe Rails check if file was changed does not work because it is in container or something like that.
Well it turns out I have been spouting garbage. Having just tried it
on a Rails 3.2 and 4.1 app I find that it is not necessary to restart
the server. Very odd, perhaps I am remembering from earlier versions
and had not noticed that it had changed. So thanks Darius for helping
me to find my mistake, it will save me time in the future.
That brings us back though to why you find you need to restart the
server. Are you sure that is the case? Can you provide a concrete
example?