RE: Newbie Question about Custom Classes

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.

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

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

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

Brent J. 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