# RE: Newbie Question about Custom Classes

**URL:** <https://www.ruby-forum.com/t/re-newbie-question-about-custom-classes/84294>\
**Category:** Rails\
**Created:** [March 20, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/re-newbie-question-about-custom-classes/84294 "2006-03-20T20:35:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [March 20, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/re-newbie-question-about-custom-classes/84294/1 "2006-03-20T20:35:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [March 20, 2006, 8:39pm UTC](https://www.ruby-forum.com/t/re-newbie-question-about-custom-classes/84294/2 "2006-03-20T20:39:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [March 20, 2006, 8:42pm UTC](https://www.ruby-forum.com/t/re-newbie-question-about-custom-classes/84294/3 "2006-03-20T20:42:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [March 21, 2006, 2:08pm UTC](https://www.ruby-forum.com/t/re-newbie-question-about-custom-classes/84294/4 "2006-03-21T14:08:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [March 21, 2006, 3:39am UTC](https://www.ruby-forum.com/t/re-newbie-question-about-custom-classes/84294/5 "2006-03-21T03:39:46Z")

</div>

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
