Changes to Class File Not Being Recognized by Webrick

Newbie, having good luck with Dave T.’ book ‘Depot’ application
until I discovered that changes to one of my .rb class files are not
being recognized until I bounce the webrick server.

Any ideas on this? Thanks.

running in prodcution mode??

.rb placed in lib??

if thats the case, you WILL need to restart webrick…otherwise NOT…

On Friday, February 24, 2006, at 9:12 PM, Gaudi wrote:

[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Mikkel B.

www.strongside.dk - Football Portal(DK)
nflfeed.helenius.org - Football News(DK)
ting.minline.dk - Buy Old Stuff!(DK)

I believe I’m running in development mode (how do I know which mode I’m
running in?) because in database.yml the “test” and “production”
databases do not exist.

Are you saying that the .rb file(s) should be in the lib directory? The
Thomas book is telling me to put them in app/models directory.

app environment:
Ruby version 1.8.2 (powerpc-darwin8.0)
RubyGems version 0.8.10
Rails version 1.0.0
Active Record version 1.13.2
Action Pack version 1.11.2
Action Web Service version 1.0.0
Action Mailer version 1.1.5
Active Support version 1.2.5
Application root /usr/local/rails/depot
Environment development
Database adapter mysql

Thanks,
David

Mikkel B. wrote:

running in prodcution mode??

.rb placed in lib??

if thats the case, you WILL need to restart webrick…otherwise NOT…

On Friday, February 24, 2006, at 9:12 PM, Gaudi wrote:

[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Mikkel B.

www.strongside.dk - Football Portal(DK)
nflfeed.helenius.org - Football News(DK)
ting.minline.dk - Buy Old Stuff!(DK)

Models need to be placed in app/models…

If you havent done anything actively, you should be in development
mode…

I havent havent heard of this problem before…is it just plain and
simple ruby objects?? are you storing them in session??

On Friday, February 24, 2006, at 9:37 PM, Gaudi wrote:

Rails version 1.0.0
David

[email protected]

Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Mikkel B.

www.strongside.dk - Football Portal(DK)
nflfeed.helenius.org - Football News(DK)
ting.minline.dk - Buy Old Stuff!(DK)

If you are looking to change your envrionment from production to
development, it is actually quite easy. Since Rails knows to look at the
RAILS_ENV environament variable, you can change that in
config/environement.rb to development and that might fix your server
re-starting issue.

HTH,
Ryan

Gaudi

   > I believe I'm running in development mode (how do I know which

mode I’m
> running in?)

In your view add:

mode: <%= ENV['RAILS_ENV'] %>

Yes, my cart.rb object is a shopping cart, stored in the session.

I would think that if I deleted my cookie, which I’m doing, then changes
to cart.rb would then appear because Ruby would create a new session
object, right? But that’s not happening. Only restarting webrick
forces Rails to see changes to my cart.rb

I’ve tried

session[:cart] = nil

which does remove the cart from the session, but it does NOT force Rails
to re-read the cart.rb class file.

Oh well, I guess I’ll just bounce the server. I am surprised that no
one else is talking about this online.

Thanks for your assistance Mikkel.

Mikkel B. wrote:

Models need to be placed in app/models…

If you havent done anything actively, you should be in development
mode…

I havent havent heard of this problem before…is it just plain and
simple ruby objects?? are you storing them in session??

On Friday, February 24, 2006, at 9:37 PM, Gaudi wrote:

Rails version 1.0.0
David

[email protected]

Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Mikkel B.

www.strongside.dk - Football Portal(DK)
nflfeed.helenius.org - Football News(DK)
ting.minline.dk - Buy Old Stuff!(DK)