# Ruby Newcomer

**URL:** <https://www.ruby-forum.com/t/ruby-newcomer/182022>\
**Category:** Ruby\
**Created:** [January 21, 2010, 6:11pm UTC](https://www.ruby-forum.com/t/ruby-newcomer/182022 "2010-01-21T18:11:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gtr32x](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@gtr32x](https://www.ruby-forum.com/u/gtr32x)\
**Post date:** [January 21, 2010, 6:11pm UTC](https://www.ruby-forum.com/t/ruby-newcomer/182022/1 "2010-01-21T18:11:48Z")

</div>

Just recently installed Ruby for the purpose of developing extensions  
for SpiceWorks. However, this is my first ever experience with Ruby  
since its update to its new form (last time touched was at least 3 years  
ago when there’s no such thing as Webrick server). What I had noticed  
was, when I start the Webrick server, if I generate a new controller, I  
would receive a routing error until I restart the Webrick server. So  
that means for every test of modification I would need to restart the  
Webrick server, is that true? If it is, it would seem to be very  
tedious. Thanks.

UPDATE: Something I found really odd is that without restarting server,  
the new controller would only take effect after a while. Maybe I have  
done something during this time, but I don’t know. Does anyone what’s  
the possible problem?

---

<div class="post-metadata">

**Author:** ![gtr32x](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@gtr32x](https://www.ruby-forum.com/u/gtr32x)\
**Post date:** [January 21, 2010, 7:07pm UTC](https://www.ruby-forum.com/t/ruby-newcomer/182022/2 "2010-01-21T19:07:00Z")

</div>

On Thu, Jan 21, 2010 at 12:12 PM, Kefan X. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Just recently installed Ruby for the purpose of developing extensions  
> for SpiceWorks. However, this is my first ever experience with Ruby  
> since its update to its new form (last time touched was at least 3 years  
> ago when there’s no such thing as Webrick server).

Webrick has been around longer than 3 years, but I’m guessing this is  
your first time with Rails. (I’m assuming that SpiceWorks is still  
Rails-based.)

You might want to try seeking more targeted guidance from the Rails  
list.

[http://www.ruby-forum.com/forum/3](http://www.ruby-forum.com/forum/3)

> What I had noticed was, when I start the Webrick server, if I generate  
> a new controller, I would receive a routing error until I restart the  
> Webrick server. So that means for every test of modification I would  
> need to restart the Webrick server, is that true? If it is, it would seem  
> to be very tedious. Thanks.

It sounds like you may be starting the server with the Rails  
environment (RAILS\_ENV) set to production rather than development.

> **[Rails Environments](https://bandwagonblog.wordpress.com/2009/01/19/rails-environments/)**
>
> The environment is specified in the RAILS\_ENV variable; the name corresponds to the environment definition file in the config/environment folder.  Since the environment governs fundamental aspects …

"Development Mode  
config.cache\_classes = false

Production Mode  
config.cache\_classes = true"

> **[When cache\_classes gets you down - Space Vatican](https://www.spacevatican.org/2008/12/28/when-cache_classes-gets-you-down/)**
>
> As I’ve mentioned before, in Rails 2.2 if config.cache\_classes is true (which it is in production) then all of your models, controllers etc are …

“if config.cache\_classes is true (which it is in production) then all  
of your models, controllers etc are loaded up as part of application  
initialization”

---

<div class="post-metadata">

**Author:** ![gtr32x](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@gtr32x](https://www.ruby-forum.com/u/gtr32x)\
**Post date:** [January 21, 2010, 7:21pm UTC](https://www.ruby-forum.com/t/ruby-newcomer/182022/3 "2010-01-21T19:21:15Z")

</div>

Thanks for the clarification with Webrick server. I guess last time when  
I tried Rails it had Webrick but I wasn’t aware of it.

Also, for the environment variable, I checked it and it seemed that my  
application is already running under development mode. So that rules out  
this possibility. Could there be other problems?

PS. I’m running all this on Win 7.
