2

I just wanted to install the bundler gem.

I have no problems installing it. But when I install it and hit "bundle ", I get "command 'bundle' not found". When I then enter again "gem install bundler" it installs bundler again, without saying it'd be already installed.

I can install it again and again and again, but cannot use/access it.

I have no clue what's up with rubygems.

Yours, Joern.

Joern Akkermann
  • 3,542
  • 8
  • 33
  • 41

2 Answers2

2

Joe, that happens when gem installs the binary file in a folder that it's not in the path. try doing this to know where it was installed (it might take a few minutes)

find . | egrep "/bundle$"

and then add that folder to your path.

Augusto
  • 28,839
  • 5
  • 58
  • 88
  • Why would `gem install bundle` not be installing it to a location in the path? How can you fix it so that it *does* do that? – Andrew Feb 15 '11 at 16:54
  • rubygems installs all gems the right way, except this (important) one – Joern Akkermann Feb 15 '11 at 16:55
  • the command you told me brings nothing... this tells me rubygems fails completely installing bundler, I'm used to get it install while installing rails 3, strangely this time it hasn't – Joern Akkermann Feb 15 '11 at 16:57
  • @Andrew, unfortunately, I don't know the answer :(. I've hit this problem before, and the only solution was to add the folder to the path. – Augusto Feb 15 '11 at 16:58
  • `find / . | egrep "/bundle$"` does the trick... "/var/lib/gems/1.8/bin/bundle" is the location (this is right and usual, isn't it?) – Joern Akkermann Feb 15 '11 at 16:59
  • not really, it should install the executables in one of the usual places, such as /usr/bin, /usr/local/bin (this doesn't apply if you're using rvm). Open you .profile, .bash_rc or .bash_profile and add that folder to your path. – Augusto Feb 15 '11 at 17:04
0

I just tracked down my solution to the same problem above not referenced elsewhere so I'm putting it here. In addition to adding the path to bundler gem, on Ubuntu 10.10 I had to use the shell command $ export RUBYOPT=rubygems in order for this to work.