# Error loading rubygems from vendor\_gem\_source\_index

**URL:** <https://www.ruby-forum.com/t/error-loading-rubygems-from-vendor-gem-source-index/173131>\
**Category:** Rails\
**Created:** [August 3, 2009, 6:56pm UTC](https://www.ruby-forum.com/t/error-loading-rubygems-from-vendor-gem-source-index/173131 "2009-08-03T18:56:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hirodusk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6f9a4e/32.png) [@hirodusk](https://www.ruby-forum.com/u/hirodusk)\
**Post date:** [August 3, 2009, 6:56pm UTC](https://www.ruby-forum.com/t/error-loading-rubygems-from-vendor-gem-source-index/173131/1 "2009-08-03T18:56:40Z")

</div>

I’m having trouble running script/generate due to the following error:

./script/…/config/…/vendor/rails/railties/lib/rails/vendor\_gem\_source\_index.rb:1:in  
`require': No such file to load -- rubygems (LoadError) from ./script/../config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:1 from ./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:1:in`require’  
from  
./script/…/config/…/vendor/rails/railties/lib/rails/gem\_dependency.rb:1  
from  
./script/…/config/…/vendor/rails/railties/lib/initializer.rb:10:in  
`require' from ./script/../config/../vendor/rails/railties/lib/initializer.rb:10 from ./script/../config/boot.rb:45:in`require’  
from ./script/…/config/boot.rb:45:in `load_initializer' from ./script/../config/boot.rb:38:in`run’  
from ./script/…/config/boot.rb:11:in `boot!' from ./script/../config/boot.rb:109 from script/generate:2:in`require’  
from script/generate:2

its obviously tripping up on “require ‘rubygems’” in  
vendor\_gem\_source\_index.rb.  
I have no idea why this started happening (been working on this app with  
frozen rails for months) … only that I recently upgraded my rails gem  
to 2.3.3. The version in the vendor folder is 2.2.

Any pointers would be really appreciated.  
Thanks in advance,  
Adam

---

<div class="post-metadata">

**Author:** ![hirodusk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6f9a4e/32.png) [@hirodusk](https://www.ruby-forum.com/u/hirodusk)\
**Post date:** [August 4, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/error-loading-rubygems-from-vendor-gem-source-index/173131/2 "2009-08-04T18:54:50Z")

</div>

Does this same error happen when you start up other Rails scripts (eg,  
script/console or script/server)?

The fact that it can’t find rubygems seems to indicate something has  
gone seriously wrong with your Ruby install.

Here’s some info that will help dignose (run at the command line,  
obviously):

which ruby  
which rails  
which gem  
gem --version

Also, are you manipulating the load path at all?

You may want to reply off-list, as this isn’t really a Rails issue and  
I’ll be able to reply faster.

–Matt J.

On Aug 3, 12:56 pm, Adam W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![hirodusk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6f9a4e/32.png) [@hirodusk](https://www.ruby-forum.com/u/hirodusk)\
**Post date:** [August 5, 2009, 1:46am UTC](https://www.ruby-forum.com/t/error-loading-rubygems-from-vendor-gem-source-index/173131/3 "2009-08-05T01:46:11Z")

</div>

I managed to solve the problem by uninstalling ruby with macports and  
reinstalling, following by rubygems via macports:

[http://zeroeight.net/notes/archives/10-Setup-Ruby-and-Rails-on-Mac-OSX.html](http://zeroeight.net/notes/archives/10-Setup-Ruby-and-Rails-on-Mac-OSX.html)

(yes I am on osx, and yes I know its not a rails issue but thought I  
would post my solution anyhow)

Matt J. wrote:

> Does this same error happen when you start up other Rails scripts (eg,  
> script/console or script/server)?
> 
> The fact that it can’t find rubygems seems to indicate something has  
> gone seriously wrong with your Ruby install.
> 
> Here’s some info that will help dignose (run at the command line,  
> obviously):
> 
> which ruby  
> which rails  
> which gem  
> gem --version
> 
> Also, are you manipulating the load path at all?
> 
> You may want to reply off-list, as this isn’t really a Rails issue and  
> I’ll be able to reply faster.
> 
> –Matt J.
> 
> On Aug 3, 12:56ï¿½pm, Adam W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
