-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'rbenv rehash' creating shim for uninstalled gem (vagrant) #388
Comments
Mmmh, I have vendorized gems in few places with bundler. It seems that rbenv is parsing vendor/ directories it's aware of and installs shims for gems found. |
I'm having the same problem and don't even have vagrant installed $ vagrant
rbenv: vagrant: command not found
$ gem list | ack "vagrant"
$ gem uninstall vagrant # for paranoia's sake
$ rbenv rehash
$ vagrant
rbenv: vagrant: command not found
$ which vagrant
/Users/tonchis/.rbenv/shims/vagrant
$ rm -rf /Users/tonchis/.rbenv/shims/vagrant
$ vagrant
zsh: command not found: vagrant
$ rbenv rehash
$ vagrant
rbenv: vagrant: command not found Let me know if I can help you any further by including more information! |
rbenv makes shims for files found in
|
Here you go: $ ls /Users/tonchis/.rbenv/versions/*/bin
coderay erb gem irb rake rdoc ri ruby testrb Also, I only have one ruby version at the moment. |
Any plugins? |
Yup, two: $ ls /Users/tonchis/.rbenv/plugins
rbenv-gemset ruby-build
$ rbenv hooks rehash
/Users/tonchis/.rbenv/plugins/rbenv-gemset/etc/rbenv.d/rehash/gemset.bash
$ vagrant
rbenv: vagrant: command not found
# also in case you might need it
$ gem env path
/Users/tonchis/.rbenv/versions/1.9.3-p392/gemsets/global |
Ok, so I think I found the culprit: $ ls .rbenv/versions/*/gemsets/*/bin/* | ack "vagrant"
.rbenv/versions/1.9.3-p392/gemsets/api-server/bin/vagrant |
Solved! Heads up @leucos. $ cd <api-server dir>
$ gem env path
/Users/tonchis/.rbenv/versions/1.9.3-p392/gemsets/api-server:/Users/tonchis/.rbenv/versions/1.9.3-p392/gemsets/global
$ gem uninstall vagrant
Remove executables:
vagrant
in addition to the gem? [Yn] Y
Removing vagrant
Successfully uninstalled vagrant-1.0.0
$ rbenv rehash
$ vagrant
zsh: command not found: vagrant So basically if I'm using Thanks a lot @mislav! |
Boom! Resolved. Nice work |
I'm sorry, it is not solved.
TL;DR : I have nothing containing 'vagrant' in it's name under ~/.rbenv besides the shim itself, that The only place I have it is in some vendorized gems (see second comment #388 (comment)). Thanks ! |
@leucos Any plugins? |
@mislav / @tonchis : thanks for the heads up. I think you nailed it :
I seems that bundler.bash keeps a list of Gemfile it was invoked for, and rebuilds shims for them. Since I use bundler and vendorized a project which had the vagrant gem, it was rebuilding a shim everytime. So it's solved too here. Thanks ! EDIT: And sorry for blaming rbenv in the first place :( |
@leucos No prob! Glad to have this solved. |
@mislav thx, helped me a lot. had a similar issue with heroku binary |
I had a similar issue where The issue in my case was due to the Related: the feature in |
Since this is the only place where people talk about this issue, I add my experience.
and so on... |
Same problem here but I can't get rid of it. Here's what I have found so far:
I can't get rid of Please someone can explain what I've missed? |
Ohhh... reading all the comments again, I have found that @leucos solution was precisely what I needed:
No more automatic shims/heroku for me:
|
Since vagrant is not a gem anymore (sigh :|), I tried to remove the gem and use the installer (Archlinux/AUR) :
Everytime I run
rbenv rehash
, thevagrant
shim is created. However, the vagrant gem is not installed.Any clue on what's going wrong here ?
The text was updated successfully, but these errors were encountered: