I'm trying to run a Ruby on Rails app on a Dreamhost shared server. All is well so far except one weird bug I have not been able to unravel.
Sometimes when I visit the web app, I get presented with a Phusion Passenger error saying,
You have already activated rack 1.2.1, but your Gemfile requires rack 1.2.2. Consider using bundle exec.
When I just refresh the page it seems to work, though - no more Phusion Passenger error message.
Following other stack overflow threads and a similar Dreamhost wiki, I added the following to the top of the config/environment.rb
file:
if ENV['RAILS_ENV'] == 'production' # don't bother on dev ENV['GEM_PATH'] = '/home/myusername/.gems' + ':/usr/lib/ruby/gems/1.8' end
try to restart your server after edit in your Gemfile and put this: gem 'rack', '1.2.1'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With