rbenv文档指出,如果你不使用bundler,你可以使用gemsets插件来沙箱你的gem:
Manage gemsets. Bundler is a better way to manage application dependencies. If you have projects that are not yet using Bundler you can install the rbenv-gemset plugin.但是,我使用的是bundler,当我在具有不同gemsets的项目之间切换时,我需要重新绑定。当我使用rvm时,由于有.gemsets文件,所以这很简单。
bundler中有没有我不知道的沙箱功能,或者我误解了文档?
发布于 2012-01-15 06:09:26
在essense中,bundler使用中的Gemfile和Gemfile.lock文件为您通过以bundle exec为前缀的命令访问的特定项目创建“gemset
发布于 2012-08-08 22:55:23
我发现了这个清晰的、有充分文档记录的解决方案:
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler
现在当你安装gem的时候(参见下面的“捆绑器”部分),它会转到你的helloset gem区域。
您可以使用它来组合使用多个gemsets。
这种设置的最大好处是允许每个项目使用一组不同版本的gem。
请阅读标题为Enable RVM-style “gemsets” (optional)的部分。
它使用rbenv插件来实现gemsets:https://github.com/jamis/rbenv-gemset。
更新8/12/2012
我使用它来管理两个具有不同版本的Ruby的项目,以及不同的gem集。它工作得很好。
发布于 2012-01-15 08:22:37
这可能与rbevn使用垫片的方式有关。您可能想要查看https://github.com/carsomyr/rbenv-bundler
https://stackoverflow.com/questions/8865724
复制相似问题