# Different Versions of Rails

**URL:** <https://www.ruby-forum.com/t/different-versions-of-rails/126084>\
**Category:** Rails\
**Created:** [January 15, 2008, 9:13am UTC](https://www.ruby-forum.com/t/different-versions-of-rails/126084 "2008-01-15T09:13:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![daz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/87869e/32.png) [@daz](https://www.ruby-forum.com/u/daz)\
**Post date:** [January 15, 2008, 9:13am UTC](https://www.ruby-forum.com/t/different-versions-of-rails/126084/1 "2008-01-15T09:13:46Z")

</div>

I’m getting very confused with how the versions of Rails work and  
wondered if somebody could explain it to me (preferably as basically  
as possible, treat me as a beginner!)

The situation is that I have a desktop machine that has Rails 1.2.3 in  
which I created a couple of sites. I then uploaded them to a hosted  
server that is running Rails 1.2.5. The apps run fine on this server.  
I have now bought a laptop and if I install Rails it will be at  
version 2+. I also want to update the version I am running on my  
desktop. My hosts have no plans at present to upgrade to version 2 of  
Rails.

Here are my questions:  
What line would it be that forces the production site on the hosted  
server to use their version of rails rather than the version it was  
created in?  
How can I update my desktop machine’s version of Rails and then  
continue to develop these 2 sites if they specify that a previous  
version should be used?  
I’ve read about freezing edge Rails. This seems to imply that you  
include a whole version of rails as part of the site’s code. Can I do  
this with these projects and effectively choose which version of Rails  
is used on a project by project basis? Would I be able to freeze a  
version of Rails 2.x onto my hosted server to enable me to make use of  
Rails 2.0 in a hosted environment or will I have to wait until they  
upgrade?

I hope that makes sense. Thanks in advance,

DAZ

---

<div class="post-metadata">

**Author:** ![daz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/87869e/32.png) [@daz](https://www.ruby-forum.com/u/daz)\
**Post date:** [January 15, 2008, 10:59am UTC](https://www.ruby-forum.com/t/different-versions-of-rails/126084/2 "2008-01-15T10:59:29Z")

</div>

On 15 Jan 2008, at 08:12, DAZ wrote:

> desktop. My hosts have no plans at present to upgrade to version 2 of  
> Rails.

You can install old version of rails if you want.

> is used on a project by project basis? Would I be able to freeze a  
> version of Rails 2.x onto my hosted server to enable me to make use of  
> Rails 2.0 in a hosted environment or will I have to wait until they  
> upgrade?

freezing just means that a version of rails is copied into vendor/  
rails. That version is then using, independantly of what gems are  
installed. It can be edge, or just a regular version of rails (so that  
the version you use is independant from what gems are installed, you  
have have a different version for each project etc…). You can  
certainly freeze 2.0 into a project and run that on a server which  
only has 1.2 installed (or even no version of rails).

Fred

---

<div class="post-metadata">

**Author:** ![daz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/87869e/32.png) [@daz](https://www.ruby-forum.com/u/daz)\
**Post date:** [January 15, 2008, 2:20pm UTC](https://www.ruby-forum.com/t/different-versions-of-rails/126084/3 "2008-01-15T14:20:47Z")

</div>

This link might help (+ 1 person has replied so far)  
[http://clarkware.com/cgi/blosxom/2007/01/18#ManagingVersionsWithCap](http://clarkware.com/cgi/blosxom/2007/01/18#ManagingVersionsWithCap)

On 15/01/2008, DAZ [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> desktop. My hosts have no plans at present to upgrade to version 2 of  
> include a whole version of rails as part of the site’s code. Can I do  
> this with these projects and effectively choose which version of Rails  
> is used on a project by project basis? Would I be able to freeze a  
> version of Rails 2.x onto my hosted server to enable me to make use of  
> Rails 2.0 in a hosted environment or will I have to wait until they  
> upgrade?
> 
> I hope that makes sense. Thanks in advance,
> 
> DAZ

–  
see my photos at:  
[![Imgur](https://live.staticflickr.com/4017/4653073183_00d7abbfb4.jpg "Darren Jones") ](https://www.flickr.com/photos/daz4126/)

---

<div class="post-metadata">

**Author:** ![daz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/87869e/32.png) [@daz](https://www.ruby-forum.com/u/daz)\
**Post date:** [January 15, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/different-versions-of-rails/126084/4 "2008-01-15T22:14:39Z")

</div>

Thanks for the reply Fred. This sounds like good news - basically I  
can choose which version of Rails each individual application uses and  
this won’t depend on which machine it is running? Will ruby still have  
to be installed on the host?

Are there any good instructions of how to freeze a copy of rails into  
an application and do you need rails installed in the first place to  
do it?

Another question is what if I use some ruby gems. I often install  
bluecloth so that I can use markdown and luckily my host also has this  
installed. Can I freeze this into the app aswell?

cheers,

DAZ

On Jan 15, 9:58 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![daz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/87869e/32.png) [@daz](https://www.ruby-forum.com/u/daz)\
**Post date:** [January 15, 2008, 2:20pm UTC](https://www.ruby-forum.com/t/different-versions-of-rails/126084/5 "2008-01-15T14:20:47Z")

</div>

group link:  
[http://groups.google.com/group/rubyonrails-talk/browse\_thread/thread/8f82bea6faa669ab/e275191184e0395c?lnk=gst&q=Different+Versions+of+Rails#e275191184e0395c](http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/8f82bea6faa669ab/e275191184e0395c?lnk=gst&q=Different+Versions+of+Rails#e275191184e0395c)

---

<div class="post-metadata">

**Author:** ![daz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/87869e/32.png) [@daz](https://www.ruby-forum.com/u/daz)\
**Post date:** [January 15, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/different-versions-of-rails/126084/6 "2008-01-15T22:27:35Z")

</div>

On 15 Jan 2008, at 21:14, DAZ wrote:

> Thanks for the reply Fred. This sounds like good news - basically I  
> can choose which version of Rails each individual application uses and  
> this won’t depend on which machine it is running? Will ruby still have  
> to be installed on the host?

You need ruby.

> Are there any good instructions of how to freeze a copy of rails into  
> an application and do you need rails installed in the first place to  
> do it?

Either rake rails:freeze:gems (in which case you do need the gems)  
or rake rails:freeze:edge . You can specify which tag to use, so you  
can get it to lock to the 1.2.5 release for example.

> Another question is what if I use some ruby gems. I often install  
> bluecloth so that I can use markdown and luckily my host also has this  
> installed. Can I freeze this into the app aswell?

You can do stuff like [Vendor Everything — err.the\_blog](http://errtheblog.com/posts/50-vendor-everything)

Fred
