Rubygems、Bundler 和 RVM 混淆 [英] Rubygems, Bundler and RVM confusion

查看:14
本文介绍了Rubygems、Bundler 和 RVM 混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我之前读过Rubygems、Bundler 和 RVM 之间的关系"再问一遍.

I read "Relationships between Rubygems, Bundler, and RVM" before asking it again.

嗯,有很多这样的问题,但回答的人说他们使用 Rubygems、RVM 和 Bundler,他们没有解释这些如何单独工作.

Well, there are many questions like this, but people who answered say they work with Rubygems, RVM and Bundler, and they have not explained how each of these work in isolation.

当我们安装 gems 时,我真的很困惑这三个是如何独立工作的.请不要告诉我你是怎么工作的,这会对我有所帮助,但是当我们和他们一起玩时我不会知道发生了什么.

I am really confused with how the three work in isolation when we are installing gems. Please do not tell me how you work, which will help me, but I won't learn what is happening when we play with them.

我的困惑可以分解为这些问题.什么时候在哪里安装 gem:

My confusion can be broken down into these questions. Where is a gem installed when:

  1. 我只有 Rubygems(没有 RVM 或 Bundler)?
  2. Rubygems 和 RVM 是否已安装?
  3. Rubygems、RVM 和 Bundler 安装了吗?

请通过网络上的资源或您的详细回答帮助我理解这些内容.

Please help me understand this stuff with either resources on the web or by your detailed answers.

推荐答案

  1. 要了解 gem 的安装位置,请在终端中运行 echo $GEM_HOME.
  2. 使用 RVM 时,Gem 会安装到您的 RVM 安装中,因为它会更改 $GEM_HOME.现在运行 echo $GEM_HOME 将显示 RVM 安装的路径.
  3. 当 Bundler 添加到组合中时,gems 将安装在 $GEM_HOME 中,或者,如果您在运行时指定路径 bundle install 将安装到该路径小路.要通过 Bundler 找出 gem 的位置,您可以使用 bundle show gemname 来获取其完整路径.
  1. To find out where gems are being installed to, run echo $GEM_HOME in a terminal.
  2. When using RVM, gems are installed into your RVM install as it changes $GEM_HOME. Running echo $GEM_HOME now would show a path into your RVM install.
  3. When Bundler is added to the mix, gems will either be installed in $GEM_HOME, or, if you specify a path when running bundle install will be installed to that path. To find out where a gem is through Bundler you can use bundle show gemname to get its full path.

这篇关于Rubygems、Bundler 和 RVM 混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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