I'm getting the following error even though I currently do have the Bundler gem installed (it appears when I run $gem list).
ERROR: Gem bundler is not installed, run `gem install bundler` first.
I'm using RVM and my $PATH is as follows:
/Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@rails3tutorial2ndEd/bin:
/Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@global/bin:
/Users/cjstingl/.rvm/rubies/ruby-1.9.2-p290/bin:
/Users/cjstingl/.rvm/bin:
/Users/cjstingl/.bin:
/usr/local/sbin:
/usr/local/Cellar/php/5.3.6/bin:
/usr/local/share/python:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/usr/local/bin:
/usr/X11/bin
Also this is my gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.15
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.2.0]
- INSTALLATION DIRECTORY: /Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@rails3tutorial2ndEd
- RUBY EXECUTABLE: /Users/cjstingl/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
- EXECUTABLE DIRECTORY: /Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@rails3tutorial2ndEd/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
- /Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@rails3tutorial2ndEd
- /Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => false
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "-n/usr/local/bin --no-ri --no-rdoc --no-user-install"
- REMOTE SOURCES:
- http://rubygems.org/
Also: Using the bundle -v command returns the same error
I've tried imploding RVM and reinstalling which doesn't seem to work. I'm stumped and any help would be appreciated.
After having RVM installed on multiple machines with the same setup and having problems with RVM on one but not having these problems on another one, I decided to look for something better, less error prone.
I found and switched to rbenv, which is much more simplistic than RVM.
And as the
README
of rbenv states:So if you ask me, dump RVM and switch to rbenv.
Ran into the same issue (where I kept on installing the bundler and rvm won't recognize it) on one of my laptops. I guessed I might have installed RVM wrong while I was still a rails noob. I tried the solution above but it didn't work for me. After messing around with it, I gave up and removed RVM and reinstall it. I figured it was due to some weird configuration issue deeply nested somewhere or . Here are the steps I took:
Remove RVM:
Install RVM again:
Since I am working on an old rails project for work, I had to install ree-1.8.7-2012.02
Of course, Murphy's Law still applies. I ran into another issue where my laptop could not find a Non-broken C compiler even though Xcode is installed along with gcc. My final steps were going to https://github.com/kennethreitz/osx-gcc-installer and install their package and reinstalling ree.
I hope this last resort solution helps someone. Good luck!
You know what, this is obviously your PATH variable's problem.
You should make sure that
which bundle
to be like/usr/local/rvm/gems/ruby-1.9.3-p194/bin/bundle
instead of something like/usr/local/rvm/bin/bundle
.hint:
Did you just use PATH=some explicit list in your .zshrc file?
Then you should change that to PATH=$PATH:some list
I had this problem, too. I fixed my issue by specifying a gemset.
I ran into the same problem earlier today. The approach I used to resolve the issue was this:
1) Run
on the same machine you would normally run cap deploy. Then execute
This runs the command on the remote server. Copy and paste the output into a local text file, e.g. capenv.txt
2) SSH into the same remote server, and do the same command, namely env | sort. Save this locally as a text file, e.g. sshenv.txt
3) Diff the two files and see what is in sshenv.txt that is not in capenv.txt - this is most likely where your problem lies.
4) I immediately noticed that the shell interpreter was not set to bash. This can be fixed by adding
to your deploy.rb file. This resolved my problem
Try this : https://rvm.io/integration/gnome-terminal/
it says about profiles run on startup, i am running ubuntu 12.10 and it work. Only thing you have to do is set "Run command as a login shell" in terminal profile preferences (tab title and command).
Hope it saves some time to someone.