Please help with new Ruby install (my gems are missing!)

Hello. I am trying to get Ruby installed on our CentOS 5.2 (x64)
server for a specific Ruby application (clockingIT).

I followed the steps here:

I made sure that all Ruby related packages are installed, here are the
versions according to RPM.

But on Step 3 I am unable to “gem install passenger”, it just says

ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find passenger (> 0) in any repository

So I tried installing Phusion Passenger from source, but it says I am
missing Rake and Rack and Fastthread.

So I tried installing those, same problem…

gem install rake
Could not find rake (> 0) in any repository
gem install rack
Could not find rack (> 0) in any repository
gem install fastthread
Could not find fastthread (> 0) in any repository

When I checked the “gem env” it says:

RubyGems Environment:

  • VERSION: 0.9.4 (0.9.4)
  • INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  • GEM PATH:
    • /usr/lib/ruby/gems/1.8
  • REMOTE SOURCES:

I read somewhere about deleting the source_cache and doing “gem
update” so I tried that, but no luck. Any ideas?

Thanks!

Hi,

Sorry if I go too much to the basics but what is the output of “gem
sources”?
That will tell you the repositories you have defined to look for gems.

For example rake is in github (based on a quick search in google).
Does adding github help? Use “gem sources -a http://gems.github.com” to
add the repository.

Add that if you don’t have it and try to get the gem/s again.

Cheers.

Your gems environment indicates that you only have gems.rubyforge.org as
a repository. Not all the gems are found there so you need to add the
right locations. Adding github might solve your problems…

Finally got it working, had to upgrade to Ruby 1.8.6 for the Gem
update to run successfully (it was saying I’m on 1.8.5, expecting
1.8.6). So I had to build Ruby from source for CentOS 5.2 x64.

Also the 2nd half of this script to install Gem 1.3.5 was useful.

http://github.com/albertsj1/Misc-Scripts/raw/master/install_gems.sh

Thanks!

On Tue, Feb 23, 2010 at 10:29 PM, rezilient [email protected] wrote:

ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find passenger (> 0) in any repository

When I checked the “gem env” it says:

RubyGems Environment:

  • VERSION: 0.9.4 (0.9.4)

Your version of gem is ancient – current version is 1.3.6.

Try gem update --system and see if that brings you current. Then
you shouldn’t have any trouble installing those other gems.