Bundler通过RVM提供什么? [英] What does Bundler offer over RVM?

查看:67
本文介绍了Bundler通过RVM提供什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这两个工具之间有什么区别。似乎有很大的重叠,但是我一直在使用RVM并遇到一些不兼容的问题。

I am not sure what the differences are between these two tools. There seems to be a big overlap, but I have been using RVM and facing some miss-compatibility issues.

Bundler做什么RVM不会做的?

What does Bundler do that RVM does not?

推荐答案

它们具有不同的用途。 RVM创建一个沙箱来管理您的Ruby安装。作为其一部分,它还允许您定义宝石集。

They serve different purposes. RVM creates a sandbox to manage your Ruby installations. As a part of that, it also lets you define gemsets.

Bundler不能管理您的红宝石,它可以与当前选择的Ruby一起使用。

Bundler doesn't manage your Rubies, it works with the currently selected Ruby.

因此,我认为您应该将RVM视为开发环境的配置管理器,并考虑将BVM作为应用程序的gem管理器。

So, I think you should consider RVM as the configuration manager for your development environment, and Bundler the gem manager for an application.

编辑:其他想法-

无论我们是否使用RVM,通常我们都必须对于要使用的每个宝石,使用 gem install blah 手动加载我们将要用于应用程序的所有宝石。

Whether we use RVM or not, typically we'd have to load all the gems we're going to use for an app by hand, using gem install blah, for every gem we want to use.

我最终要手工管理多个红宝石中的宝石。安装完宝石后,我可以使用RVM创建宝石集,但是RVM不会自动检索特定版本的宝石(如果未安装的话),或者无法再次获取它(如果已移除)。由于RVM更关心您的Ruby环境,因此大部分将gem的版本控制留给 gem 交给我们。

I end up managing my gems across multiple Rubies by hand. Once they're installed I can create gemsets using RVM, but RVM won't automatically retrieve a particular version of a gem if it's not installed, or go get it again if it was removed. Because RVM is more concerned with your Ruby environment, it mostly leaves the versioning of gems to gem and to us.

bundle install ,其余的工作将完成。

Bundler, on the other hand, does care about those missing parts in RVM. When you create the Gemfile for bundler, it will retrieve the necessary gems and specific versions if specified. So, the task of installing a Ruby app on a different machine becomes much simpler. Push the files to the other machine, then run bundle install and it'll do the rest.

它与Rails配合良好,是我的生产文件的明智解决方案。这比我必须处理Perl发行版才能在同一主机上运行Perl应用程序要简单得多。

It works nicely with Rails and is a sensible solution for my production files. It will be much simpler than how I have to handle Perl distributions in order to run Perl apps on the same hosts.

这篇关于Bundler通过RVM提供什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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