Hello. I''m a newbie and studying RoR reading "Agile Web Development with Rails". Do you need to restart WEBrick server after you have modified a model .rb file? It seems to me that changes to models .rb files are not reflected to the behaviour of the site. I mean, in development phase. -- OGURA Toshiyuki
Hello. I''m a newbie and studying RoR reading "Agile Web Development with Rails". Do you need to restart WEBrick server after you have modified a model .rb file? It seems to me that changes to models .rb files are not reflected to the behaviour of the site. I mean, in development phase. -- OGURA Toshiyuki
Hey Ogura In development mode all changes to the model should be reflected immediately, without requiring a restart of the server. Is there any specific behaviour that makes you think that they are not? -Luke
OGURA Toshiyuki
2005-Oct-16 15:51 UTC
Re: Does modifying models need restarting the server?
Hi, Luke. At the page 96 of "Agile Web Development with Rails", there is empty!() method. After I defined empty! on cart.rb model and modified store_controller.rb to call @cart.empty!, I encountered an error (I don''t remember what it said) when pressing "Empty cart" link on the browser. The error didn''t occur after restarting WEBrick server. So I thought it might be needed for the server to be restarted even in development mode when models are modified. Luke Randall wrote:> Hey Ogura > > In development mode all changes to the model should be reflected > immediately, without requiring a restart of the server. Is there any > specific behaviour that makes you think that they are not? > > -Luke-- OGURA Toshiyuki
Dave Silvester
2005-Oct-16 18:17 UTC
Re: Does modifying models need restarting the server?
On Sunday 16 Oct 2005 16:51, OGURA Toshiyuki wrote:> So I thought it might be needed for the server to be restarted even in > development mode when models are modified.Sometimes WEBrick is strange with errors - I''ve certainly had scenarios where after an error, even after fixing it in the code, the error won''t go away until WEBrick is restarted. If in doubt and an error you think you''ve fixed keeps happening, restart WEBrick and see if that helps. ~Dave -- Dave Silvester Rent-A-Monkey Website Development Web: http://www.rentamonkey.com/