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

"Warning! PATH is not properly set up" when using RVM with tmux #3929

Closed
srghma opened this issue Feb 19, 2017 · 5 comments
Closed

"Warning! PATH is not properly set up" when using RVM with tmux #3929

srghma opened this issue Feb 19, 2017 · 5 comments
Milestone

Comments

@srghma
Copy link

srghma commented Feb 19, 2017

set -g default-command "$SHELL -l"
set -g default-shell "$SHELL"

didnt work for me, what I do:
start without tmux

$ echo $PATH 
/home/bjorn/.rvm/gems/ruby-2.4.0/bin:/home/bjorn/.rvm/gems/ruby-2.4.0@global/bin:/home/bjorn/.rvm/rubies/ruby-2.4.0/bin:/home/bjorn/.cabal/bin:/usr/local/heroku/bin:/home/bjorn/.node_modules/bin:/home/bjorn/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/bjorn/.rvm/bin

$ tmux 
$ tmux show-options -g G def
default-command "/bin/zsh -l"
default-shell "/bin/zsh"
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
$ zsh
$ echo $PATH 
...all great again

My tmux and others dotfiles at that moment

temporal solution: in zshrc
[[ $TMUX != "" ]] && rvm use default > /dev/null 2>&1

rvm infos

@mpapis
Copy link
Member

mpapis commented Feb 19, 2017

can you show your zshrc?

@srghma
Copy link
Author

srghma commented Feb 19, 2017

Yes, it in my dotfiles, but without this line, its temporal solution as I have written

zshenv

@mpapis
Copy link
Member

mpapis commented Feb 19, 2017

zshenv file in which you load RVM (source "$HOME/.rvm/scripts/rvm") is the first sourced file in the process of initializing ZSH, you should move this line to zshrc after you finish setting up PATH and source'ing other files.

@srghma
Copy link
Author

srghma commented Feb 19, 2017

Ok, that indeed worked, I thought that my nvim will not find rvm after that, but no, thank you very much 🥇

@crivotz
Copy link

crivotz commented Aug 22, 2017

I had a bit of headaches also for this question (post update to Debian Stretch)

In my case, I use zprezto and I solved it with edit .zprofile

# Set the list of directories that Zsh searches for programs.
path=(
  $path:$home/.rvm/bin
  /usr/local/{bin,sbin}
  $path
)
# RVM
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

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