# Why environment.rb is useless?

**URL:** <https://www.ruby-forum.com/t/why-environment-rb-is-useless/141291>\
**Category:** Rails\
**Created:** [June 24, 2008, 12:16pm UTC](https://www.ruby-forum.com/t/why-environment-rb-is-useless/141291 "2008-06-24T12:16:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bobov](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9adbd/32.png) [@Bobov](https://www.ruby-forum.com/u/Bobov)\
**Post date:** [June 24, 2008, 12:16pm UTC](https://www.ruby-forum.com/t/why-environment-rb-is-useless/141291/1 "2008-06-24T12:16:52Z")

</div>

Dear all,  
I’m a newbie in ROR.

my environment:  
ruby 1.8.5  
rails 2.0.2  
Lighttpd  
scgi\_rails 0.4.3  
working in development model.

questions:

1. I made some changes to config/environment.rb, and restart  
lighttpd, but the changes didn’t take any effect. I then even change  
RAILS\_GEM\_VERSION = ‘2.0.2’ unless defined? RAILS\_GEM\_VERSION  
to  
RAILS\_GEM\_VERSION = ‘8.0.2’ unless defined? RAILS\_GEM\_VERSION  
the application start as normal.  
Finally, I deleted environment.rb, but the application runs as well!  
What happened?

2. in the development model , I once deleted log/development.log  
because it’s too large. then, I made a new development.log file with  
only a line. Strange thing is that, development.log then never change  
any more.

Anyone can explain the above questions?  
Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Bobov](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9adbd/32.png) [@Bobov](https://www.ruby-forum.com/u/Bobov)\
**Post date:** [June 24, 2008, 12:19pm UTC](https://www.ruby-forum.com/t/why-environment-rb-is-useless/141291/2 "2008-06-24T12:19:16Z")

</div>

On 24 Jun 2008, at 11:15, Bobov wrote:

> 1. in the development model , I once deleted log/development.log  
> because it’s too large. then, I made a new development.log file with  
> only a line. Strange thing is that, development.log then never change  
> any more.

Sounds like you’re not running the code you thing you are running (in  
particular perhaps you didn’t restart what is actually processing your  
rails requests ?)  
How are you starting your rails app?

Fred

---

<div class="post-metadata">

**Author:** ![Bobov](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9adbd/32.png) [@Bobov](https://www.ruby-forum.com/u/Bobov)\
**Post date:** [June 24, 2008, 3:42pm UTC](https://www.ruby-forum.com/t/why-environment-rb-is-useless/141291/3 "2008-06-24T15:42:18Z")

</div>

Thanks for your information.  
I start my rails app using Lighttpd and scgi, as following:  
/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf  
ruby usr/lib/ruby/gems/1.8/gems/scgi\_rails-0.4.3/bin/scgi\_service  
config/scgi.yaml  
And this is the content of scgi.yaml:  
:port: 9999  
:password: brA4gP6Xahk.6  
:logfile: log/scgi.log  
:control\_url: druby://127.0.0.1:8999  
:config: config/scgi.yaml  
:disable\_signals: true  
:env: development  
:host: 127.0.0.1  
I’m thinking maybe there’s something wrong with scgi.

On 6ÔÂ24ÈÕ, ÏÂÎç6Ê±17·Ö, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Bobov](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9adbd/32.png) [@Bobov](https://www.ruby-forum.com/u/Bobov)\
**Post date:** [June 24, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/why-environment-rb-is-useless/141291/4 "2008-06-24T15:49:24Z")

</div>

On 24 Jun 2008, at 14:41, Bobov wrote:

> Thanks for your information.  
> I start my rails app using Lighttpd and scgi, as following:  
> /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf  
> ruby usr/lib/ruby/gems/1.8/gems/scgi\_rails-0.4.3/bin/scgi\_service

I know nothing about scgi, but I’d guess that the think you need to be  
restarting is the scgi\_service, not lighttpd

Fred
