Rubygems,Bundler和RVM混淆 [英] Rubygems, Bundler and RVM confusion
问题描述
我之前阅读过 Rubygems,Bundler和RVM之间的关系再问一次。
好吧,有很多这样的问题,但回答的人说他们使用Rubygems,RVM和Bundler,并且他们没有解释每个工作是如何独立工作的。
当我们安装gem时,我真的很困惑这三者是如何独立工作的。请不要告诉我你是如何工作的,这对我有帮助,但我不会了解我们在玩游戏时发生了什么。
我可以细分我的困惑进入这些问题。在什么时候安装了gem:
- 我只有Rubygems(没有RVM或Bundler)?
- 安装了Rubygems和RVM?
- 安装了Rubygems,RVM和Bundler?
请帮助我通过网络上的资源或详细的答案了解这些信息。
找出安装宝石的位置,在终端中运行 echo $ 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:
- I just have Rubygems (without RVM or Bundler)?
- Rubygems and RVM are installed?
- Rubygems, RVM and Bundler are installed?
Please help me understand this stuff with either resources on the web or by your detailed answers.
- To find out where gems are being installed to, run
echo $GEM_HOME
in a terminal. - 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. - When Bundler is added to the mix, gems will either be installed in
$GEM_HOME
, or, if you specify a path when runningbundle install
will be installed to that path. To find out where a gem is through Bundler you can usebundle show gemname
to get its full path.
这篇关于Rubygems,Bundler和RVM混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!