views:

18

answers:

2

Hello,

I have several Rails applications with version 2.3.8, which I run using the thin server. I want to install Rails 3.0.1 on the same machine for testing purposes.

The installation worked fine, but after installing Rails 3.0.1, running Rails 2.3.8 applications with thin fails with this error:

>> Using rails adapter
Missing the Rails 2.3.8 gem. Please `gem install -v=2.3.8 rails`,
update your RAILS_GEM_VERSION setting in config/environment.rb for
the Rails version you do have installed, or comment out RAILS_GEM_VERSION
to use the latest version installed.

There seems to be a problem with the latest version of rack (1.2.1) installed with Rails 3. If I uninstall rack 1.2.1 and keep only rack 1.1.0, my Rails 2.3.8 applications run with no problem.

Specifying the rack version with config.gem in environment.rb doesn't solve the problem. Unpacking the rack 1.1.0 gem in the vendor/gems directory doesn't change anything either.

With rack 1.2.1, I can't start my Rails 2.3.8 applications. Without rack 1.2.1, I can't start my Rails 3.0.1 applications.

All the solutions I've found online are about unpacking the rack gem, but this doesn't seem to work for me. Is there something else I should be doing?

A: 

Had the same issue with a Rails 2.3.5 app and Thin (1.2.7). Had to:

gem uninstall rack --version 1.2.1
gem uninstall rack --version 1.1.0

that left me with only version 1.0.1 and then it worked fine.

Like you, I'm going to be in a mess trying to transition an app into Rails 3. One solution is to use rvm (which I already am) and its notion of gemsets which provide isolation for specific gems for specific applications. I've not played with those yet.

Hopefully the 'thin' folks will get this sorted out.

Rob Jones
Unfortunately, using rack 1.0.1 can't work for me as I'm using Rails 2.3.8, which requires rack 1.1.0.
Arcturus
A: 

I did manage to run both Rails versions by installing Ruby twice in separate locations.

If anyone finds a way to run with only one Ruby though, I'd be interested to know.

Arcturus