# Internal server error after editing environment.rb

**URL:** <https://www.ruby-forum.com/t/internal-server-error-after-editing-environment-rb/150762>\
**Category:** Rails\
**Created:** [October 12, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/internal-server-error-after-editing-environment-rb/150762 "2008-10-12T20:52:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomzoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tomzoo](https://www.ruby-forum.com/u/tomzoo)\
**Post date:** [October 12, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/internal-server-error-after-editing-environment-rb/150762/1 "2008-10-12T20:52:23Z")

</div>

Hi all,

this is hopefully a quick one for gurus. I edited my environment.rb  
file, commenting out these lines:

config.action\_controller.session = {  
:session\_key =\> ‘\_test\_session’,  
:secret =\> ‘long key here’  
}

When I browsed to my app, I got the internal server error, I immediately  
reverted the changes but still get the error. I tried a different pc  
and also got the error. Why is this happening and what can I do to  
resolve it.

p.s. I commented out the lines as I was getting invalid authentication  
token errors, when sending form data, I’m using a subdomain.

Any pointers for a ruby newb greatly appreciated,  
thanks  
T

---

<div class="post-metadata">

**Author:** ![tomzoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tomzoo](https://www.ruby-forum.com/u/tomzoo)\
**Post date:** [October 12, 2008, 9:12pm UTC](https://www.ruby-forum.com/t/internal-server-error-after-editing-environment-rb/150762/2 "2008-10-12T21:12:31Z")

</div>

Check your log files. “the internal server error” could be any number  
of things,from a syntax error to a misconfiguration

Your authentication token problems could be because when if you make a  
request to a different subdomain than the one that created the form it  
probably isn’t sending the session cookie (which the authentication  
token is derived from)

Sent from my iPhone

On 12 Oct 2008, at 19:52, Tom E. \<rails-mailing-list@andreas-

---

<div class="post-metadata">

**Author:** ![tomzoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tomzoo](https://www.ruby-forum.com/u/tomzoo)\
**Post date:** [October 13, 2008, 9:34am UTC](https://www.ruby-forum.com/t/internal-server-error-after-editing-environment-rb/150762/3 "2008-10-13T09:34:46Z")

</div>

Have you restarted the server? Any environment change will result in  
an internal error, until you restart your server.

Hope that helps =)

On Oct 13, 6:11 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![tomzoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tomzoo](https://www.ruby-forum.com/u/tomzoo)\
**Post date:** [October 13, 2008, 8:28pm UTC](https://www.ruby-forum.com/t/internal-server-error-after-editing-environment-rb/150762/4 "2008-10-13T20:28:46Z")

</div>

Thanks for the advice. I just checked it there and it’s back up again,  
I guess the host must have done a refresh. I’m using AJAX in the forms,  
so maybe that is why there are issues with tokens. I’ll have to  
investigate further.
