当我的Ruby版本不同于1.9.1时,为什么gem安装在1.9.1目录中? [英] Why are gems installed in a 1.9.1 directory when my Ruby version is different than 1.9.1?

查看:119
本文介绍了当我的Ruby版本不同于1.9.1时,为什么gem安装在1.9.1目录中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我安装一个gem时,它会被安装在一个名为1.9.1的目录中,尽管这不是我安装的Ruby版本:

  $ ruby​​ -v 
ruby​​ 1.9.3p327(2012-11-10 revision 37606)[x86_64-darwin12.2.0]

$ gem哪个导轨
... / ruby​​ / gems / 1.9.1 / gems / railties-3.2.9 / lib / rails.rb

为什么会发生这种情况?我没有安装任何其他的Ruby版本(当然不是v1.9.1)。 根据 1.9.2发布公告


标准库安装在/usr/local/lib/ruby/1.9.1

中版本是库兼容
版本。 Ruby 1.9.2几乎兼容1.9.1
,因此该库是安装在1.9.1目录中的


尽管你仍然可以看到安装在1.9.1目录中的东西,但它使用1.9.2


When I install a gem, it gets installed in a directory named 1.9.1, despite that not being the version of Ruby I have installed:

$ ruby -v
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.2.0]

$ gem which rails
.../ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails.rb

Why does this happen? I have no other Ruby versions installed (and certainly not v1.9.1).

解决方案

Per the 1.9.2 release announcement:

Standard library is installed in /usr/local/lib/ruby/1.9.1

This version is a "library compatible version." Ruby 1.9.2 is almost 1.9.1 compatible, so the library is installed in the 1.9.1 directory.

Even though you still see stuff installed in a 1.9.1 directory, it is using 1.9.2

这篇关于当我的Ruby版本不同于1.9.1时,为什么gem安装在1.9.1目录中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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