Online Help
You can find the RVM team on IRC in
#rvm on irc.freenode.net
If we do not respond right away, leave a message and a contact to you like email or twitter.
Sponsors
Carbon Ads

Bundler

Install the bundler gem:

gem install bundler

There is no need to do anything to make bundler work with RVM, but there is one thing about bundler that makes it harder to use. By default, bundler does not generate wrappers for gem binaries. To make use of the proper version of a gem binary, users are forced to prefix every command with bundle exec. This makes working in the console rather painful. Fortunately, there are solutions that allow us to just write binary names; the binary from 'gem' specified in the Gemfile will be used.

  1. rubygems-bundler gem
  2. RVM cd hook
  3. Global executables
  4. Rubygems 2.0

rubygems-bundler gem (default from rvm 1.11.0)

One of the solutions for this problem is a gem which makes bundler and rubygems generate binary wrappers that are aware of bundler. Michal Papis is working with bundler and rubygems team to integrate this gem so that no extra actions would be needed to avoid bundle exec.

Starting with 1.11.0 new RVM installations has it enabled by default, you can still install it with:

gem install rubygems-bundler

For more information visit rubygems-bundler @ github. When this gem is already installed here is basic instruction:

To make all the executables bundler compatible run:

gem regenerate_binstubs # only once

To prevent loading bundle exec:

NOEXEC_DISABLE=1 rake ...

For more information read: https://github.com/mpapis/rubygems-bundler

You can add/remove installation of this gem from default by adding/removing the line

rubygems-bundler

in this files in:

RVM hook

Thanks to Rick DeNatale, we now have a hook that automatically will append BUNDLE_BIN path to the PATH when changing directories.

Enabling hook

rvm get head && rvm reload
chmod +x $rvm_path/hooks/after_cd_bundler

Generating bundler stubs (binaries wrappers)

cd /path/to/project
bundle install --binstubs=./bundler_stubs

From now on, any project which was generated this way will automatically add $PWD/bundler_stubs to the PATH.

Global executables

Install all executables into single location

bundle config --global bin ~/.bundler_binstubs

And add it to PATH:

export PATH="~/.bundler_binstubs:$PATH"

Community Resources