This project is archived and is in readonly mode.
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
-
sgharms October 23rd, 2008 @ 01:26 PM
Relevant versions:
bash-3.2$ rails --version Rails 2.1.1 bash-3.2$ ruby --version ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin9.1.0] bash-3.2$ psql --version psql (PostgreSQL) 8.2.5 contains support for command-line editing bash-3.2$
-
josh December 3rd, 2008 @ 03:45 PM
- State changed from new to wontfix
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>