RBenv not being detected inside tmux
# rbenv versions
system
1.8.7
1.8.7-p358
1.9.2
1.9.2-p320
1.9.3
1.9.3-p327
1.9.3-p392
* 1.9.3-p429 (set by /opt/boxen/rbenv/version)
2.0.0
2.0.0-p0
2.0.0-p247
2.1.1
2.1.2
# ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]
First possible problem was found on rbenv/rbenv#369 tried the solution proposed on rbenv/rbenv#369 (comment) for PATH being overriden, but didn't work
Second possible problem was found http://pgib.me/blog/2013/10/11/macosx-tmux-zsh-rbenv/ and it worked
Changed file /etc/zshenv
# system-wide environment settings for zsh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
to
# system-wide environment settings for zsh(1)
if [ -x /usr/libexec/path_helper ]; then
if [ -z "$TMUX" ]; then
eval `/usr/libexec/path_helper -s`
fi
fi
Honestly I didn't like this approach once it touchs system files, but didn't find any other solution to the problem.