Forum: Ruby on Rails Weird problems

85458feac00c538a9689d43ee0f3c8d6?d=identicon&s=25 Tomas R. (josetomas_r)
on 2011-05-06 04:12
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
B467643a3c2132768fea3a29d6a8f8fc?d=identicon&s=25 Martin S. (martin_s)
on 2011-05-06 14:26
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/Ru...)

I tried the patch and it seems to work.

Best regards,
Martin
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.