开发者

Where is the default Gem.dir path set?

This is really odd: I installed ruby 1.9.1 using a "191" suffix so that it will coexist with other versions. e.g. the executables look like ruby191, gem191 and the library directory where all of the vendor/site code lives is /usr/local/lib/ruby191. The version of RubyGems (1.3.1) that is included with ruby 1.9.1 works fine. The installation was performed with:

cd /usr/local/src/ruby-1.9.1-p429
./configure --prefix=/usr/local --program-suffix=191
make
sudo make install

However, when I upgrade my RubyGems installation with sudo gem191 update --system it appears to forget about all of the installed gems. When I checked it out with gem191 environment it is now looking in /usr/local/lib/ruby.

I know I can create a ~/.gemrc and change the location there, but that smells like a hack to me. I have spent a couple of hours trying to开发者_Python百科 figure out where Gem.dir is set in the code, but have been unable to find it. Does anyone know where the default location is set?


Apparently the Gem engine didn't work properly under ruby 1.9.1, but has been fixed under ruby 1.9.2. After installing the latest build, all of my Gem issues have disappeared.


You should definitely use rvm gem for multiple ruby installations on one system.

P.S. You can view your gem installation path by using $ gem{suffix} env.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜