Why is Phusion Passenger refusing to recognize my updated RubyGems?

耗尽温柔 提交于 2019-12-11 08:59:18

问题


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

The various places I've updated RubyGems http://files.droplr.com/files/14167865/zel8k.Screen%20shot%202010-03-09%20at%2017:24:59.png

but Phusion passenger keeps throwing the same error:

Error Screenshot http://files.droplr.com/files/14167865/zee8W.Screen%20shot%202010-03-09%20at%2017:19:50.png

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 http://files.droplr.com/files/14167865/zfH6x.Screen%20shot%202010-03-09%20at%2019:07:18.png


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/2413901/why-is-phusion-passenger-refusing-to-recognize-my-updated-rubygems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!