# Trouble deploying / errors on production server

**URL:** <https://www.ruby-forum.com/t/trouble-deploying-errors-on-production-server/103839>\
**Category:** Deployment\
**Created:** [May 10, 2007, 9:22pm UTC](https://www.ruby-forum.com/t/trouble-deploying-errors-on-production-server/103839 "2007-05-10T21:22:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wheels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7bcc69/32.png) [@wheels](https://www.ruby-forum.com/u/wheels)\
**Post date:** [May 10, 2007, 9:22pm UTC](https://www.ruby-forum.com/t/trouble-deploying-errors-on-production-server/103839/1 "2007-05-10T21:22:54Z")

</div>

I’ve just developed my first 2 rails apps but can’t get them to work on  
my server. The support guys are saying something’s wrong with my  
application because it generates this error:

./…/config/boot.rb:29: undefined method `gem’ for main:Object  
(NoMethodError)  
from ./…/config/environment.rb:11  
from dispatch.cgi:3

Everything is the same version, I’ve checked that extensively. I’m  
running Ruby 1.8.5 and Rails 1.2.3. I developed on Apache and MySQL as  
that’s my host’s setup.

One point of confusion for me is that I’ve developed this with  
InstantRails 1.6 as my test server which runs Rails 1.2.2, but my  
environment.rb says 1.2.3. I ran ‘gem --update-system’, would that  
affect it?

It’s pretty urgent that I get this going so if anyone can help me or  
point me to a troubleshooting tutorial or whatever I’d be grateful.

---

<div class="post-metadata">

**Author:** ![wheels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7bcc69/32.png) [@wheels](https://www.ruby-forum.com/u/wheels)\
**Post date:** [May 17, 2007, 1:35am UTC](https://www.ruby-forum.com/t/trouble-deploying-errors-on-production-server/103839/2 "2007-05-17T01:35:36Z")

</div>

Either use a boot.rb file generated by rails on the deployment target,  
or freeze rails into your app so the various rails gems you developed  
for are deployed with your app.

> **[Freezing Rails | Tiger Technologies Support](https://support.tigertech.net/freeze-rails)**
>
> If you are using Ruby on Rails and want to ensure maximum stability, you should "freeze" the version of Rails you use.

–
