我正在使用 RVM,使用捆绑安装和 rvm 捆绑安装有什么区别?
我想知道有什么区别?
我可以运行两者并安装它们,但实际区别是什么?
我正在制作 michael hart 的教程/截屏视频,他使用捆绑安装,这与使用 rvm 捆绑安装有何不同?
我还决定尝试一下“rubymine”IDE,我注意到在终端中运行捆绑安装然后打开IDE后,它告诉我我需要更新一些gems,所以我确信它不会在同一个目录中安装捆绑包地方。
我已经在其中加载了一个rvm项目。
I would like to know the difference?
I can run both and they install but what is the actual difference?
I'm doing a tutorial/screencast by michael hart and he uses bundle install, how does this differ from using rvm bundle install?
I also decided to try out a trial of the "rubymine" ide and I noticed after running bundle install in terminal then opening the ide it tells me I need to update some gems so I'm sure it doesn't install bundles in the same place.
I've loaded up an rvm project in it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为从这个问题来看,您还没有完全理解
rvm
和bundler
之间的区别以及它们的具体作用。我将尝试解释其中的差异。RVM 是 Ruby 环境(版本)管理器的缩写。它是一组命令行脚本,可帮助将一个项目或一组项目的 ruby 二进制文件和 gems 置于“沙箱”中。这样,如果您有一个项目需要 Ruby 1.8,而另一个项目需要使用 Ruby 1.9,您可以在两个 Ruby 安装之间轻松切换,避免严重的不兼容性或繁琐的配置。
您还可以为每个 ruby 版本安装不同的 gemset,因此,如果您需要使用 Ruby on Rails 2.3 开发一些应用程序,而需要使用 Ruby on Rails 3.0 开发一些应用程序,或者如果您想尝试新的 3.1 prelease,您可以这样做,而不会破坏其他应用程序的依赖关系。
Bundler 是一个 ruby gem,正如网站所说,它在应用程序的整个生命周期中系统地、可重复地管理应用程序的依赖关系。
Bundler 可以轻松地将一个应用程序的源代码从一台计算机复制到另一台计算机,并快速且(相对)轻松地安装该特定应用程序所需的所有 gem 和依赖项。
所以我理解这种混乱,因为有一些重叠。 RVM 宝石集类似于宝石束。不同之处在于,bundler 管理单个应用程序和跨多台机器的 gem 和依赖项。 rvm gemset 是一个沙箱,它将一组 gem 保存在一个地方,与一台机器上的特定 ruby 安装绑定在一起,有时用于多个应用程序。
因此,最后,当您说您在 IDE 中“加载了一个 rvm 项目”时,这并不是特别正确。 RVM 是一个沙箱,而不是一个框架。
I think from this question, that you've not quite grasped the difference between
rvm
andbundler
and what exactly each does. I'll try and explain the difference.RVM is an acronym for Ruby enVironment (Version) Manager. It's a set of command-line scripts to help "sandbox" ruby binaries and gems for a project or set of projects. This way if you have one project that requires Ruby 1.8 and another that uses Ruby 1.9, you can switch easily between the two ruby installations and avoid nasty incompatibilities or cumbersome configuration.
You can also install different gemsets with each ruby version, so if you need to develop some applications with Ruby on Rails 2.3 and some with 3.0, or if you want to try the new 3.1 prelease, you can do so without breaking other applications' dependencies.
Bundler is a ruby gem which, as the website says, manages an application's dependencies through its entire life across many machines systematically and repeatably.
Bundler makes it easy to copy one application's source from one machine to another and install all the gems and dependencies needed by that particular application quickly and (relatively) painlessly.
So I understand the confusion as there is a bit of overlap. RVM gemsets are similar to gem bundles. The difference is that bundler manages the gems and dependencies for a single application and across multiple machines. An rvm gemset is a sandbox that keeps a group of gems in one place, tied to a particular ruby installation on a single machine, sometimes used for multiple applications.
So to close, when you say you "loaded up an rvm project" in your IDE, that's not particularly true. RVM is a sandbox, not a framework.