# Need to restart Webrick each time I change my model

**URL:** <https://www.ruby-forum.com/t/need-to-restart-webrick-each-time-i-change-my-model/68241>\
**Category:** Rails\
**Created:** [September 11, 2006, 2:27am UTC](https://www.ruby-forum.com/t/need-to-restart-webrick-each-time-i-change-my-model/68241 "2006-09-11T02:27:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 11, 2006, 2:27am UTC](https://www.ruby-forum.com/t/need-to-restart-webrick-each-time-i-change-my-model/68241/1 "2006-09-11T02:27:50Z")

</div>

Hi,

I’m new to rails and I’m following along the depot sample application  
in Agile Web D. with Rails

> From what I understand I should not need to restart the server after  
> making changes to the model as long as I am in dev mode.

I got stuck on the part where you need to update the add\_product  
function in cart.rb in order for it to not insert the same product  
twice but just increase the quantity.

For about an hour I was wondering why nothing changed and I tried all  
sorts of stuff until I decided to give restarting the server a try. And  
that did the trick  
But isn’t that unnecessarry when running in dev mode?

thanks  
Marc

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 11, 2006, 2:51am UTC](https://www.ruby-forum.com/t/need-to-restart-webrick-each-time-i-change-my-model/68241/2 "2006-09-11T02:51:52Z")

</div>

In development mode you don’t need to restart the server when you  
make changes to your controllers or views. But you do need to  
restart the server when you change a model.

Aaron

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 11, 2006, 11:15am UTC](https://www.ruby-forum.com/t/need-to-restart-webrick-each-time-i-change-my-model/68241/3 "2006-09-11T11:15:46Z")

</div>

in model , make sure you  
include Reloadable or is  
subclass of ActiveRecord::Base(which include Reloadable).

On 9/11/06, Aaron B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Hi,
> > 
> > >
> 
> >

–  
Best Regards  
femto [http://femto.blogdriver.com](http://femto.blogdriver.com)
