Skip to content
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

Bundler does not work correctly without rbenv exec under OS X El Capitan #831

Closed
twei55 opened this issue Nov 26, 2015 · 11 comments
Closed

Comments

@twei55
Copy link

twei55 commented Nov 26, 2015

After I updated to OS X El Capitan, bundler does not install gems to the right place anymore when I don't use rbenv exec. This was definitely not necessary under Yosemite.

$ rbenv version
2.1.2 (set by /Users/myuser/myapp/.ruby-version)

$ rbenv --version
rbenv 0.4.0 (Installed via Homebrew)

$ which bundle
/Users/myuser/.rbenv/shims/bundle

$ rbenv which bundle
/Users/myuser/.rbenv/versions/2.1.2/bin/bundle

$ bundle install
$ bundle show anygem
/Library/Ruby/Gems/2.0.0/gems/anygem

$ rbenv exec bundle install
$ rbenv exec bundle show anygem
/Users/myuser/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/anygem

Any thoughts on how to get rid of this?

@twei55 twei55 changed the title Bundler just works correctly with rbenv exec under OS X El Capitan Bundler does not work correctly without rbenv exec under OS X El Capitandi Nov 26, 2015
@twei55 twei55 changed the title Bundler does not work correctly without rbenv exec under OS X El Capitandi Bundler does not work correctly without rbenv exec under OS X El Capitan Nov 26, 2015
@mislav
Copy link
Member

mislav commented Nov 26, 2015

Are you using some bundler-related rbenv plugins? Check rbenv hooks exec

@twei55
Copy link
Author

twei55 commented Nov 30, 2015

@mislav: Thanks for your answer.

No, rbenv hooks exec does not provide any output.

@mislav
Copy link
Member

mislav commented Nov 30, 2015

I am stumped. Everything from your initial comment looks correct. bundle should run Bundler as installed in the Ruby 2.1.2 version.

@tpihl
Copy link

tpihl commented Dec 23, 2015

Did you install rbenv-bundler?

@mislav
Copy link
Member

mislav commented Dec 23, 2015

@tpihl I don't think @twei55 has rbenv-bundler plugin installed (and they shouldn't have, because that plugin can cause breakage), because if they did, rbenv hooks exec would report that there is a "bundler" hook.

@mislav
Copy link
Member

mislav commented Dec 23, 2015

@twei55 Is this still an issue for you?

@twei55
Copy link
Author

twei55 commented Dec 23, 2015

@tpihl @mislav

rbenv-bundler was not installed on machine. I installed it via brew but it didn't solve my issue, so I uninstalled it after the trial.

@mislav Yep, still have to run rbenv exec bundle in order to install gems to the right place :(

@mislav
Copy link
Member

mislav commented Dec 23, 2015

rbenv-bundler was not installed on machine. I installed it via brew but it didn't solve my issue, so I uninstalled it after the trial.

Hmm, this might be the key, though. rbenv-bundler was known to keep messing up things even after it gets uninstalled.

  1. Are there any rbenv hooks rehash hooks?
  2. Can you try nuking the shims directory with rm -rf rbenv root/shims, running rbenv rehash again, and using bundle install without rbenv exec?

@twei55
Copy link
Author

twei55 commented Dec 23, 2015

Can you try nuking the shims directory with rm -rfrbenv root/shims, running rbenv rehash again, and using bundle install without rbenv exec?

This one did the job! 👍

Great, thanks a lot. And Happy Holidays!

BTW: No hooks detected with rbenv hooks rehash.

@mislav
Copy link
Member

mislav commented Dec 23, 2015

Yay! Closing as solved.

@mislav mislav closed this as completed Dec 23, 2015
@thesecretmaster
Copy link

thesecretmaster commented Jan 18, 2017

Just wanted to add, I had the same issue, I solved it by running rm -rf rbenv root /shims then running rbenv rehash. Didn't happen on my mac, but it did happen on my linux mint install after migrating from rvm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants