Weird problems


#1

I just install rails for Ruby 1.9.2 running from Ubuntu 11.04
but everytime i try to Rails S or bundle install I get

NOTE: Gem::SourceIndex#all_gems is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::SourceIndex#all_gems called from
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/rubygems_integration.rb:256


#2

Hi Tomas,

Tomas R. wrote in post #996935:


NOTE: Gem::SourceIndex#all_gems is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::SourceIndex#all_gems called from

/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/rubygems_integration.rb:256

As far as I see from the sources:

Simply patch rubygems_integration.rb, line 256:

- Gem.source_index.all_gems.values
+ Gem.source_index.gems.values

Reason:

Gem::SourceIndex#all_gems was just returning @gems, and now there is an
attr_reader for @gems. I think that was the reason to remove the
all_gems method.

(see:
http://www.opensource.apple.com/source/RubyGems/RubyGems-17.1/rubygems/lib/rubygems/source_index.rb)

I tried the patch and it seems to work.

Best regards,
Martin