# Interactive debugging of rails models

**URL:** <https://www.ruby-forum.com/t/interactive-debugging-of-rails-models/62535>\
**Category:** Rails\
**Created:** [June 5, 2006, 11:23pm UTC](https://www.ruby-forum.com/t/interactive-debugging-of-rails-models/62535 "2006-06-05T23:23:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hariraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/4491bb/32.png) [@hariraj](https://www.ruby-forum.com/u/hariraj)\
**Post date:** [June 5, 2006, 11:23pm UTC](https://www.ruby-forum.com/t/interactive-debugging-of-rails-models/62535/1 "2006-06-05T23:23:32Z")

</div>

Hi, How can I debug the models interactively?

When I load the console using “ruby script/console”, the changes in the  
models doesn’t get reflected. I have exit the console and reload the  
console everytime I make some changes.

Is there a better way?

Thanks, Hari

---

<div class="post-metadata">

**Author:** ![hariraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/4491bb/32.png) [@hariraj](https://www.ruby-forum.com/u/hariraj)\
**Post date:** [June 6, 2006, 1:06am UTC](https://www.ruby-forum.com/t/interactive-debugging-of-rails-models/62535/2 "2006-06-06T01:06:14Z")

</div>

On Mon, Jun 05, 2006 at 11:23:32PM +0200, Nara H. wrote:

> When I load the console using “ruby script/console”, the changes in the  
> models doesn’t get reflected. I have exit the console and reload the  
> console everytime I make some changes.

Use the ‘reload!’ command.  
You might lose some variables that you have declared, but you’ll get the  
model updated. It’s much quicker than existing and reloading.

-jim

---

<div class="post-metadata">

**Author:** ![hariraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/4491bb/32.png) [@hariraj](https://www.ruby-forum.com/u/hariraj)\
**Post date:** [June 6, 2006, 8:21am UTC](https://www.ruby-forum.com/t/interactive-debugging-of-rails-models/62535/3 "2006-06-06T08:21:33Z")

</div>

> Use the ‘reload!’ command.

is there a way to send this reload! message to a running fastcgi  
instance? to eg refresh an app in production mode after an update  
without restarting apache… or kill -HUP or something (im thinking  
something in an admin page that rolls out the update)

---

<div class="post-metadata">

**Author:** ![hariraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/4491bb/32.png) [@hariraj](https://www.ruby-forum.com/u/hariraj)\
**Post date:** [June 9, 2006, 10:53pm UTC](https://www.ruby-forum.com/t/interactive-debugging-of-rails-models/62535/4 "2006-06-09T22:53:29Z")

</div>

Jim C. wrote:

> On Mon, Jun 05, 2006 at 11:23:32PM +0200, Nara H. wrote:
> 
> > When I load the console using “ruby script/console”, the changes in the  
> > models doesn’t get reflected. I have exit the console and reload the  
> > console everytime I make some changes.
> 
> Use the ‘reload!’ command.  
> You might lose some variables that you have declared, but you’ll get the  
> model updated. It’s much quicker than existing and reloading.
> 
> -jim

Thanks Jim for the tip. But I have noticed the reload command reloads  
only the models associated with a database, is there a way to reload all  
the models?

\_Hari
