ERROR: Gem bundler is not installed, run `gem install bundler` first

Add the following line to ~/.bashrc file

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function

then reload the file:

$ source ~/.bashrc

Sometimes it is just that you are not sourcing rvm correctly, because you are not in a login shell (using screen?). Type

    source ~/.rvm/scripts/rvm

And use any bundle command.


I think this is the problem: You have bundler installed to a specific gemset, which is why it's only available when you're in your app's directory (I'm assuming there's a .rvmrc file in there).

You have a few options:

  1. Install bundler to a global gemset. rvm gemset use global && gem install bundler
  2. If you have Homebrew installed, just do brew install ruby and avoid rvm altogether. (There's also rbenv and ry as alternatives to rvm, but I just use 1.9.3 across all my apps, so Homebrew is fine.)

For reference, $PATH is a shell environmental variable containing a list of directories that hold executables (e.g., echo, ls, vim, etc.). It's intrinsic to shells.

Tags:

Ruby

Gem