Interactive debugging of rails models

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

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

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)

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