Forum: Ruby on Rails Interactive debugging of rails models

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Nara H. (Guest)
on 2006-06-06 01:23
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
Jim C. (Guest)
on 2006-06-06 03:06
(Received via mailing list)
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
Carmen -. (Guest)
on 2006-06-06 10:21
> 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)
Nara H. (Guest)
on 2006-06-10 00:53
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
This topic is locked and can not be replied to.