Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NameError: uninitialized constant Gem::SourceIndex

Tags:

This error appears for a new rails app, with nothing modified, when visiting the homepage (after successfully running bundle install).

Here are the version numbers:

ruby: 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]

rails: 3.2.12

rvm: 1.18.14

gem: 2.0.0

bundler: 1.3.0.pre.8

Calling which ruby returns /Users/J/.rvm/rubies/ruby-1.9.3-p392/bin/ruby, which seems fishy, right?

like image 696
jamesfzhang Avatar asked Feb 25 '13 04:02

jamesfzhang


2 Answers

You need to update Bundler: gem update bundler

RubyGems release 2.0 seems to be the trigger for the error:

RubyGems 2.0 includes several new features and many breaking changes. Some of these changes will cause existing software to break. . . . If you are using bundler be sure to install a 1.3.0.prerelease version or newer. Older versions of bundler will not work with RubyGems 2.0.

Here are the issue details.

like image 58
Dogweather Avatar answered Sep 17 '22 11:09

Dogweather


Run:

gem update --system 1.8.24 

Sounds like there's something buggy with latest.

like image 28
Tylerc230 Avatar answered Sep 17 '22 11:09

Tylerc230