rubygems - How can I use an older version of Bundler for a Ruby project? -
...without uninstalling latest version.
i'm working on project uses bundler 1.10, use bundler 1.11 other projects. since project on 1.10, whenever run bundle
commands, gemfile.lock
changes due different formatting introduced bundler 1.11.
the solution i've found far running commands so:
bundle _1.10.6_ [command]
(from answer here: https://stackoverflow.com/a/4373478/1612744)
is there better way? i'm using rbenv, not rvm.
you use the rbenv-gemset plugin. since older version of gem in rbenv gemset doesn't override newer version in default gemset, you'd need install bundler each project, rather cumbersome.
- install plugin (
cd ~/.rbenv/plugins; git clone git://github.com/jf/rbenv-gemset.git
) or, if use homebrew,brew install rbenv-gemset
gem uninstall -xi bundler
- for each project can use bundler 1.11,
cd
projectecho bundler-1.11 > .rbenv-gemsets
("bundler-1.11" name of gemset)
- in 1 of projects,
gem install bundler
current version, 1.11.* - for project needs bundler 1.10,
cd
projectecho bundler-1.10 > .rbenv-gemsets
("bundler-1.10" name of gemset)gem install bundler -v 1.10.6
Comments
Post a Comment