# Weird problems

**URL:** <https://www.ruby-forum.com/t/weird-problems/206622>\
**Category:** Rails\
**Created:** [May 6, 2011, 4:12am UTC](https://www.ruby-forum.com/t/weird-problems/206622 "2011-05-06T04:12:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [May 6, 2011, 4:12am UTC](https://www.ruby-forum.com/t/weird-problems/206622/1 "2011-05-06T04:12:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![josetomas\_r](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@josetomas\_r](https://www.ruby-forum.com/u/josetomas_r)\
**Post date:** [May 6, 2011, 2:26pm UTC](https://www.ruby-forum.com/t/weird-problems/206622/2 "2011-05-06T14:26:20Z")

</div>

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](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
