views:

149

answers:

2

I've updated RubyGems everywhere I can possibly think to update it:

The various places I've updated RubyGems

but Phusion passenger keeps throwing the same error:

Error Screenshot

There is that one freaking place that shows 1.3.1 as the version, despite the file name of 1.3.6. I've obviously borked things up pretty badly here.

That is, I need to update to 1.3.2 or greater and that I currently have 1.3.1.

Any idea how in the world I can get PP to use the correct version of RubyGems and preferably change things so I don't have to face this problem again?

Could this have anything to do with different paths for RubyGems and Ruby environments? These are my environments:

Environment screenshots

A: 

That might be of several reasons.

First, verify that you don't have it to explicitly require the rubygem in environment.rb. That is, if you have a line like this:

config.gem "ruby_gems", :version => "1.3.1"

Then you'll have to remove the version from it.

Also, seeing that the rubygems-update gives the incorrect version, you might want to uninstall it.

sudo gem uninstall rubygems-update

Since you have updated it, that gem is not necessary anymore.

I don't think it will help, but I would probably uninstall the macports version of rubygem as well since that might create collisions, even though it doesn't seem like it in this case.

Update:

Since you are using the Ruby from the operating system you don't have to install rubygem through macports at all. To remove it:

sudo port uninstall rubygems

After that, make sure that you have upgraded the correct rubygem (the binary shows correct, but perhaps there is something missing)

sudo gem update --system

After you've done that. Open up irb (that is, irb and not the rails console) and check the following:

require 'rubygems'
puts Gem::RubyGemsVersion

Also, if you could paste how your apache/nginx configuration looks like, I doubt there is anything wrong in there, but you never know.

Jimmy Stenke
Thanks so much for chiming in, Jimmy. For starters, the environment.rb file is all right. No mention of it, and I have the exact same contents as the rest of my team, whom it's all working for, so it's likely a local issue. About to do some uninstalling and reporting back.
Joshua Cody
Do I install **all of MacPorts** or somehow just the rubygem?
Joshua Cody
A: 

First, obtain the value of your PassengerRuby configuration. Then use that Ruby interpreter to run the following script:

http://pastie.org/862871

Like this:

/path-to-your-passenger-ruby-interpreter myscript.rb

and follow the instructions.

Hongli