I am working on some Ruby development, and I installed RVM on my Mac. I regularly use TMUX. I have Oh My ZSH configured to show the Ruby version in my prompt. When I am in TMUX it shows my ruby version in the prompt. When i'm out of TMUX it doesn't show the version.

Also, when I enter ZSH again (type zsh after i'm in my terminal) the ruby version does show. It does NOT show upon initial login.

  • ZSH Version: 5.0.2

1 Answer 1


You need to make sure to source rvm scripts before sourcing oh-my-zsh scripts in your .zshrc file. This ensures that rvm is defined when oh-my-zsh configures the prompt.

[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm

source $ZSH/oh-my-zsh.sh
  • that fixed it during that session, when I logged out then logged back in, it is now doing the same thing @mshalaby Jun 5, 2014 at 16:23
  • Can you check whether the .zshrc file is actually loaded on login?
    – mshalaby
    Jun 10, 2014 at 9:42
  • I had the exact issue on ubuntu. Having them load in that order fixed it for me. Can you please check whether the .zshrc file is actually loaded on login? e.g. place echo 'loaded rvm' after the rvm sourcing line and place echo 'loaded oh-my-zsh' after the oh-my-zsh sourcing line, and check if you see them when you open the terminal. @ZachRussell
    – mshalaby
    Jun 10, 2014 at 9:48
  • Added it in, it's loading both oh-my-zsh and rvm. Also note that this error occurs in both iTerm2 and mac's native terminal. @mshalaby Jun 11, 2014 at 0:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .