Why does code need to be reloaded in Rails 3?

Posted by Venkat D. on Stack Overflow See other posts from Stack Overflow or by Venkat D.
Published on 2011-03-15T08:07:41Z Indexed on 2011/03/15 8:09 UTC
Read the original article Hit count: 156

Filed under:
|
|
|

I am a former PHP developer learning Rails and Sinatra. In PHP, every page request loaded all of the required files. If I changed some code and refreshed the page, I could be sure that the code was fresh.

In Rails 3, Controller code is fresh on every request. However, if I modify any code in the /lib folder, I need to restart the server so the changes take effect.

Why does this happen? Is it something to do with the way Ruby is designed? Is Rails doing some optimizations to avoid reloading code on every request?

Thanks!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby