On Tue, Jun 24, 2008 at 03:06, Cali Wildman
<caliwildman2004-info / yahoo.com> wrote:
> I currently have Ruby 1.8.5 and Rails 1.2.3. I want to upgrade Ruby to
> 1.8.6 and Rails to 2.1. I have a Windows XP development machine and FC6
> production box. I can't find a clean up to upgrade Ruby without blowing
> away the installed gems. Someone suggested this workaround:

I'm that someone ;-)

> There's no ruby update AFAIK. You can work around this by renaming
> c:\ruby to something else, installing ruby, then overwrite
> C:\ruby\lib\ruby\gems with the old version and call 'gem update' to
> fetch the new versions.
>
> I am in the middle of trying that now but I stopped with the following
> concerns:
> 1) current gems include Rails like actionmailer, actionpack,
> actionrecord, etc. plus a number of other gems I installed. If I run gem
> update, won't this update Rails to 2.1 automatically?

you can freeze your rails prior to ruby reinstall
http://support.tigertech.net/freeze-rails

> 2) I also have mongrel gems installed and remembered something having to
> install Windows specific packages (can't recall off the top of my now
> the details), so I am worried that this wouldn't be handled properly.

I'm not sure but I assume gem will ask everytime which version to install.

> 3) I also installed htree but I can't tell if it is a gem, so I can't be
> sure that it will be handled properly.

Check either by running gem list or look at c:\ruby\lib\1.8\gems\

> I am sure I am not the only guy that is trying to upgrade Ruby, can
> anyone help me? Thanks in advance.

What you can do to be safe is to backup/rename your c:\ruby (e.g. to
c:\ruby-1.8.5).
Then install new version, copy gems, update them and test your rails app.
In case of problems, you can put c:\ruby-1.8.5 back to c:\ruby

Problem with this approach is that it messes list of installed
applications (Control Panel, Add/remove apps).
Maybe better would be backup, uninstall 1.8.5, install 1.8.6, replace
gems, update, check
Rollback: uninstall 1.8.6, install 1.8.5, replace the whole dir.

Still, this all is hackish. I guess one of the features the new MSI
installer could bring is ability to properly update.

J.