NameError:未初始化的常量Gem :: SourceIndex [英] NameError: uninitialized constant Gem::SourceIndex

查看:134
本文介绍了NameError:未初始化的常量Gem :: SourceIndex的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在访问主页时(在成功运行 bundle install 之后),一个新的rails应用程序出现这个错误,没有任何修改。



以下是版本号:

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



调用 ruby​​ 返回 /Users/J/.rvm/rubies/ruby-1.9.3 -p392 / bin / ruby​​ ,这看起来很腥,对吧?

解决方案

您需要更新Bundler: gem update bundler



RubyGems版本2.0 似乎是触发器的错误:


RubyGems 2.0包含几项新功能和许多重大更改。其中一些更改会导致现有软件中断。 。 。 。如果您使用捆绑软件,请确保安装1.3.0.prerelease或更新的版本。旧版本的bundler不适用于RubyGems 2.0。


以下是问题详情


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?

解决方案

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.

这篇关于NameError:未初始化的常量Gem :: SourceIndex的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆