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

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

问题描述

我之前阅读过 Rubygems,Bundler和RVM之间的关系再问一次。

好吧,有很多这样的问题,但回答的人说他们使用Rubygems,RVM和Bundler,并且他们没有解释每个工作是如何独立工作的。

当我们安装gem时,我真的很困惑这三者是如何独立工作的。请不要告诉我你是如何工作的,这对我有帮助,但我不会了解我们在玩游戏时发生了什么。



我可以细分我的困惑进入这些问题。在什么时候安装了gem:


  1. 我只有Rubygems(没有RVM或Bundler)?

  2. 安装了Rubygems和RVM?

  3. 安装了Rubygems,RVM和Bundler?

请帮助我通过网络上的资源或详细的答案了解这些信息。

找出安装宝石的位置,在终端中运行 echo $ GEM_HOME
  • 使用RVM时,gem会安装到您的RVM安装,因为它改变了$ GEM_HOME。现在运行 echo $ GEM_HOME 会显示一条到你的RVM安装的路径。

  • 当捆绑器被添加到组合中时,安装在 $ GEM_HOME 中,或者,如果您在运行 bundle install 时指定路径将安装到该路径。要通过Bundler找到宝石的位置,您可以使用 bundle show gemname 来获取它的完整路径。


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

    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.

    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.

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

    1. I just have Rubygems (without RVM or Bundler)?
    2. Rubygems and RVM are installed?
    3. Rubygems, RVM and Bundler are installed?

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

    解决方案

    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天全站免登陆