>
> 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.
>
You can install old version of rails if you want.
> 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?
>
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
>
> 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 http://errtheblog.com/posts/50-vendor-everything
Fred