Newbie, having good luck with Dave Thomas'' 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. -- Posted via http://www.ruby-forum.com/.
Mikkel Bruun
2006-Feb-24 20:15 UTC
[Rails] Changes to Class File Not Being Recognized by Webrick
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:>Newbie, having good luck with Dave Thomas'' 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. > >-- >Posted via http://www.ruby-forum.com/. >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/railsMikkel Bruun www.strongside.dk - Football Portal(DK) nflfeed.helenius.org - Football News(DK) ting.minline.dk - Buy Old Stuff!(DK) -- Posted with http://DevLists.com. Sign up and save your time!
Gaudi
2006-Feb-24 20:37 UTC
[Rails] Re: Changes to Class File Not Being Recognized by Webrick
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 Bruun 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: >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails > > > Mikkel Bruun > > www.strongside.dk - Football Portal(DK) > nflfeed.helenius.org - Football News(DK) > ting.minline.dk - Buy Old Stuff!(DK)-- Posted via http://www.ruby-forum.com/.
Mikkel Bruun
2006-Feb-24 21:09 UTC
[Rails] Re: Changes to Class File Not Being Recognized by Webrick
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:>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 Bruun 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: >>>Rails@lists.rubyonrails.org >>>http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> Mikkel Bruun >> >> www.strongside.dk - Football Portal(DK) >> nflfeed.helenius.org - Football News(DK) >> ting.minline.dk - Buy Old Stuff!(DK) > > >-- >Posted via http://www.ruby-forum.com/. >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/railsMikkel Bruun www.strongside.dk - Football Portal(DK) nflfeed.helenius.org - Football News(DK) ting.minline.dk - Buy Old Stuff!(DK) -- Posted with http://DevLists.com. Sign up and save your time!
Gaudi Mi
2006-Feb-24 22:13 UTC
[Rails] Re: Changes to Class File Not Being Recognized by Webrick
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 Bruun 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 >>>>Rails@lists.rubyonrails.org >>-- >>Posted via http://www.ruby-forum.com/. >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails > > > Mikkel Bruun > > www.strongside.dk - Football Portal(DK) > nflfeed.helenius.org - Football News(DK) > ting.minline.dk - Buy Old Stuff!(DK)-- Posted via http://www.ruby-forum.com/.
Ryan Prins
2006-Feb-25 01:06 UTC
[Rails] Re: Changes to Class File Not Being Recognized by Webrick
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 On 2/24/06, Gaudi Mi <gaudimila@yahoo.com> wrote:> > 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 Bruun 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 > >>>>Rails@lists.rubyonrails.org > >>-- > >>Posted via http://www.ruby-forum.com/. > >>_______________________________________________ > >>Rails mailing list > >>Rails@lists.rubyonrails.org > >>http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > Mikkel Bruun > > > > www.strongside.dk - Football Portal(DK) > > nflfeed.helenius.org - Football News(DK) > > ting.minline.dk - Buy Old Stuff!(DK) > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Ryan Prins rprins@gmail.com http://www.lazyi.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060225/63281fe6/attachment.html