Forum: Ruby on Rails RE: Newbie Question about Custom Classes

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.
60e38de043848f82392062088f191213?d=identicon&s=25 Hogan, Brian P. (Guest)
on 2006-03-20 20:35
(Received via mailing list)
It's the beauty of Rails.... You can develop on WEBRICK and SQLite and
deploy to Apache + MySQL or Lighttpd + Oracle without worrying about
anything breaking.

We use WEBrick for day-to-day development, stage to Apache to make sure
it works, and then deploy to production on Apache.
F2a8e4cc069558b818508c80052f2f5e?d=identicon&s=25 Brent Johnson (Guest)
on 2006-03-20 20:39
(Received via mailing list)
Well one problem I may have is name based virtual hosting.  If I have
two or more projects in development at the same time, using apache I
can just use name based virtual hosting on our dev server and have one
web server serving two different sites (which is how we also do it in
production).  But if I use WEBrick for development, will I have to
load two instances of it on different ports?

Thanks,

- Brent
F2a8e4cc069558b818508c80052f2f5e?d=identicon&s=25 Brent Johnson (Guest)
on 2006-03-20 20:42
(Received via mailing list)
OK, even using WEBrick the class gets cached.  The caching is all set
to false under config/environments, is there something I'm missing?

- Brent
Eea7ad39737b0dbf3de38874e0a6c7d8?d=identicon&s=25 Justin Forder (Guest)
on 2006-03-21 03:39
(Received via mailing list)
Brent Johnson wrote:

> OK, even using WEBrick the class gets cached.  The caching is all set
> to false under config/environments, is there something I'm missing?

For Rails to reload your model files, the file name must correspond to
the class name, as follows:

   class Article should be in app/models/article.rb

   class NewsItem should be in app/models/news_item.rb

You hadn't mentioned your file names, so I thought I should point this
out.

regards

   Justin
F2a8e4cc069558b818508c80052f2f5e?d=identicon&s=25 Brent Johnson (Guest)
on 2006-03-21 14:08
(Received via mailing list)
Yep, the filename of the Article model is app/models/article.rb.  I'm
still trying to figure out why it's being cached under WEBrick and
Apache both.

Thanks,

- Brent
This topic is locked and can not be replied to.