# Should I set RAILS\_GEM\_VERSION = 'XXX'?

**URL:** <https://www.ruby-forum.com/t/should-i-set-rails-gem-version-xxx/84470>\
**Category:** Rails\
**Created:** [February 5, 2007, 1:01am UTC](https://www.ruby-forum.com/t/should-i-set-rails-gem-version-xxx/84470 "2007-02-05T01:01:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 5, 2007, 1:01am UTC](https://www.ruby-forum.com/t/should-i-set-rails-gem-version-xxx/84470/1 "2007-02-05T01:01:32Z")

</div>

Hi,

Just wondering what the collective wisdom is regarding whether the  
environment.rb file should have a “RAILS\_GEM\_VERSION = ‘1.1.6’” type  
line  
set or not?

I noted on Dreamhost previously after a rails upgrade my site wasn’t  
working, after which I can to do and change this parameter to align with  
the  
latest Dreamhost deployed version of Rails. So should I not be setting  
this parameter such that when Dreamhost upgrades my site doesn’t die?

Tks  
Greg

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 5, 2007, 1:24am UTC](https://www.ruby-forum.com/t/should-i-set-rails-gem-version-xxx/84470/2 "2007-02-05T01:24:33Z")

</div>

Unpacking rails (whatever version your app needs) into the vendor  
directory  
is the “safest” way to ensure everything keeps working.

On 2/4/07, Greg H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> this parameter such that when Dreamhost upgrades my site doesn’t die?
> 
> Tks  
> Greg
> 
> >

–  
Thanks,  
-Steve  
[http://www.stevelongdo.com](http://www.stevelongdo.com)

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 5, 2007, 1:32am UTC](https://www.ruby-forum.com/t/should-i-set-rails-gem-version-xxx/84470/3 "2007-02-05T01:32:34Z")

</div>

Hi Greg, I take it that you’re using Rails Gem. If this is the case I  
recommend that you do the following:

a) update your version environment.rb file to reference the correct  
version of Rails.

b) execute ‘rake rails:update’ in the root of your rails application

c) rake rails:freeze:gems

d) if you’re using 3rd party gems within your application, then do  
the following:

```
 http://nubyonrails.com/articles/2005/12/22/freeze-other-gems-to-rails-lib-directory

```

e) upload to your server

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 5, 2007, 1:58am UTC](https://www.ruby-forum.com/t/should-i-set-rails-gem-version-xxx/84470/4 "2007-02-05T01:58:35Z")

</div>

tks guys
