ruby rbenv、rvm 和 chruby 有什么区别?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22153521/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-06 06:24:23  来源:igfitidea点击:

What are the differences between rbenv, rvm, and chruby?

rubyrvmrbenvchruby

提问by Jordan

I'm new-ish to Ruby and Rails. I am looking for a purely objective list of features and advantages/disadvantages of each. In an effort to keep preference out of this, please refrain from answering unless you have used all 3 systems.

我是 Ruby 和 Rails 的新手。我正在寻找一个纯粹客观的功能和优点/缺点列表。为了尽量避免这种情况,除非您已经使用了所有 3 个系统,否则请不要回答。

回答by tadman

There's three main options available today:

今天提供三个主要选项:

  • rvmwhich is the most established, but also the most intrusive in terms of shell modifications.
  • rbenvwhich is lower impact, and still works as well.
  • chrubywhich purports to be even lighter than rbenv.
  • rvm这是最成熟的,但在 shell 修改方面也是最具侵入性的。
  • rbenv影响较小,并且仍然有效。
  • chruby 据称rbenv.

Personally I prefer rbenvbecause it works well with Homebrewand doesn't mangle the shell environment as much, but tend to use rvmon servers where that doesn't matter because they're set up for a very specific purpose.

我个人更喜欢rbenv它,因为它与Homebrew配合得很好,并且不会破坏 shell 环境,但倾向于rvm在无关紧要的服务器上使用,因为它们是为非常特定的目的而设置的。