Conversation
|
Will this cause issues for folks who are pre-Yosemite? |
On Mac OS X, there is a bug where `/etc/zshenv`'s `path_helper` forces `/usr/bin` to the front of the `$PATH`: rbenv/rbenv#369 # system-wide environment settings for zsh(1) if [ -x /usr/libexec/path_helper ]; then eval `/usr/libexec/path_helper -s` fi This breaks rbenv by always using the system Ruby. We have fixed this in the past in our Laptop script by moving `/etc/zshenv` to `/etc/zprofile`: thoughtbot/laptop@c64806e And more recently, to `/etc/zshrc`: https://github.com/thoughtbot/laptop/blame/master/mac On Yosemite with the version of thoughtbot/dotfiles before this commit, with rbenv being initialized in `~/.zshenv`, the problem returned. Moving rbenv initialization back to `~/.zshrc` fixed the problem. The official documentation for rbenv also recommends initializing in `~/.zshrc`. https://github.com/sstephenson/rbenv#basic-github-checkout It also recommends: export PATH="$HOME/.rbenv/bin:$PATH"
|
I think it might break rbenv for Tmux users: https://pgib.me/blog/2013/10/11/macosx-tmux-zsh-rbenv/ They'll want to edit their |
|
This re-introduces the problem with Alfred scripts not having access to rbenv that I mentioned in #289. Does anyone know of a good workaround for that? |
|
Does this also mean the path, etc won't be set correctly from MacVim? |
|
I don't think we should be making any changes right now for the sake of users of an unreleased OS if its going to break use cases for users of the released OS. Can we support both uses with some conditional loading in the various initialization scripts? |
|
Actually, I just pulled the latest dotfiles and also restarted my computer (and thus my terminal that spawns all other terminals) for the first time in a long while only to find that rbenv is not loaded. Something is still sticking /usr/bin on the front. This did work at one point. I noticed that /etc/zshenv was back, so I tried moving that to /etc/zprofile again and sure enough still broken. Whatever it is is definitely path_helper related because when I So I pulled down this branch of the dotfiles, reinstated path_helper as executable and restarted. rbenv is loaded. My path is sane. rbenv works inside tmux. pbcopy works inside tmux. There's one exception: |
|
It might just be best then to revert 6a1bd18. |
|
Yes, I think that is for the best. See also #303. |
|
Opened #307 to revert, which I think is our best course of action for now. |
|
Closing in favor of #307 |
On Mac OS X, there is a bug where
/etc/zshenv'spath_helperforces/usr/binto the front of the$PATH:rbenv/rbenv#369
This breaks rbenv by always using the system Ruby.
We have fixed this in the past in our Laptop script by moving
/etc/zshenvto/etc/zprofile:thoughtbot/laptop@c64806e
And more recently, to
/etc/zshrc:https://github.com/thoughtbot/laptop/blame/master/mac
On Yosemite with the version of thoughtbot/dotfiles before this commit, with
rbenv being initialized in
~/.zshenv, the problem returned.Moving rbenv initialization back to
~/.zshrcfixed the problem.The official documentation for rbenv also recommends initializing in
~/.zshrc.https://github.com/sstephenson/rbenv#basic-github-checkout
It also recommends: