While struggling with old gems and ruby installation on my macosx. I googled a lot for response and find no satisfactory answer.
The problem was simple, macosx 10.5 comes with ruby 1.8.1 and rails 1.2.6 which is now a depreciated version of ROR and not recommended to be used for production.
Now since gems have moved there base, every gem install command was throwing a 302 HTTP error.
$ sudo gem install rails
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://gems.rubyforge.org/yaml
Even the most suggested resolution which is a gem update didn’t work.
gaurav-mishras-macbook:rubygems-1.8.5 gaurav$ sudo gem update --system
Updating RubyGems...
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://gems.rubyforge.org/yaml
Then luckily a landed to a blog post which mentioned a similar problem and changing the source of the gem repositry worked like charm. Just add –source http://production.s3.rubygems.org
For example
gaurav-mishras-macbook:rubygems-1.8.5 gaurav$ sudo gem update --system --source http://production.s3.rubygems.org Updating RubyGems...

{ 5 comments… read them below or Shout @ me! }
This worked perfectly for me, thank you. Days of irritation = over.
Glad this worked for you Randy.
gems fixed, headache GONE! Thank you!
Yea!! Thanks!
Thank you so much!
I’ve been searching for hours on how to do this!
“RubyGems 1.3.6 installed”