Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phusion Passenger Error: You have activated rack 1.2.1, but your Gemfile requires rack 1.2.2

Tags:

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 

enter image description here

like image 571
aren55555 Avatar asked Apr 25 '11 02:04

aren55555


1 Answers

try to restart your server after edit in your Gemfile and put this: gem 'rack', '1.2.1'

like image 86
Surya Avatar answered Jan 06 '23 19:01

Surya