I\'m currently on Dreamhost attempting to run a Rails 2.3.5 app.
Here is the situation, Dreamhost\'s servers have Rails 2.2.2 installed. Of course, I can\'t update a
Dreamhost has addressed this issue on their support wiki now.
http://wiki.dreamhost.com/Ruby_on_Rails#Rails_2.3.5_-_Rack_1.0_already_activated_.28fix.29
From that page:
When using Rails 2.3.5 you will get a problem from Passenger saying Rack 1.0.1 cannot be loaded because Rack 1.0 is already activated.
One way to solve this is by freezing Rails and unpack the Rack gem into vendor/gems/rack-1.0.1
Once Rails and Rack are in the vendor/rails and vendor/gems/rack-1.0.1 you must modify action_controller in file: vendor/rails/actionpack/lib/action_controller.rb
In line numbers 34 and 35 must be commented out and add the following to load rack from vendor/gems
load "#{RAILS_ROOT}/vendor/gems/rack-1.0.1/lib/rack.rb"
The end result should look something like this:
#gem 'rack', '~> 1.0.1' #require 'rack' load "#{RAILS_ROOT}/vendor/gems/rack-1.0.1/lib/rack.rb"
The real problem is that Passenger already loads Rack 1.0 and I believe Passenger must load 1.0.1 in order for this hack to go away.
Apparently this whole thing with Rails wanting rack 1.0.1 is a small dependency requirement bug in actionpack which can be solved fairly easily.
For me it was enough to edit vendor/rails/actionpack/lib/action_controller.rb
on line 34 from gem 'rack', '~> 1.0.1'
to gem 'rack', '~> 1.0'
and the problem went away.
See: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3685-actionpack-235-gem-declares-incompatibility-with-rack-110
rake gems:unpack:dependencies
doesn't allow you to unpack rake into your vendor/gems folder.
For the Dreamhost issue, you must do what Matt said. Freeze rails to 2.3.4.
rake rails:freeze:gems VERSION=2.3.4
Dreamhost uses an older version of Passenger which preloads rack 1.0.0. You can't load rack 1.0.1 once rack 1.0.0 has been preloaded. Therefore, the latest version of rails possible for DH is Rails 2.3.4 and Rack 1.0.0.