Forum: Ruby on Rails Changes to Class File Not Being Recognized by Webrick

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.
Gaudi (Guest)
on 2006-02-24 22:12
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.
Mikkel B. (Guest)
on 2006-02-24 22:18
(Received via mailing list)
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:
>removed_email_address@domain.invalid
>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)
Gaudi (Guest)
on 2006-02-24 22:37
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:
>>removed_email_address@domain.invalid
>>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)
Mikkel B. (Guest)
on 2006-02-24 23:09
(Received via mailing list)
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
>>>removed_email_address@domain.invalid
>--
>Posted via http://www.ruby-forum.com/.
>_______________________________________________
>Rails mailing list
>removed_email_address@domain.invalid
>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)
Gaudi M. (Guest)
on 2006-02-25 00:13
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
>>>>removed_email_address@domain.invalid
>>--
>>Posted via http://www.ruby-forum.com/.
>>_______________________________________________
>>Rails mailing list
>>removed_email_address@domain.invalid
>>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)
Ryan P. (Guest)
on 2006-02-25 03:08
(Received via mailing list)
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
Alain R. (Guest)
on 2006-02-25 11:32
(Received via mailing list)
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'] %>
This topic is locked and can not be replied to.