This project is archived and is in readonly mode.

#1258 ✓wontfix
sgharms

reload! does not reload environment

Reported by sgharms | October 23rd, 2008 @ 06:52 AM | in 2.x

I am testing a new model with script/console. I have created instances and used Class.find to retrieve instances of my new model. Life is good.

I have just added a method "frobnicate" and it's not quite right.

I add to frobnicate the poor man's debug of 'puts "work damn you!"'.

I then go to the console and issue reload!

I then issue instance.frobnicate and the puts statement is not printed.

I exit script/console, restart it, get a new instance ( either with find or create ) and issue instance.frobnicate and, viola, i get the output.

If i issue load 'lib/class_containing_frobnicate' instead of 'reload!' all works properly without requiring a drop to the shell.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages