luca
luca

Reputation: 12601

rvm doesn't set default ruby with zsh

I'm using zsh in OSX with rvm, but it doesn't load the default ruby at login:

in my .zshrc I have

source $ZSH/oh-my-zsh.sh
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

I've tried to swap those two lines, but still it doesn't work..

(of course in bash it works..)

Upvotes: 3

Views: 3367

Answers (1)

mpapis
mpapis

Reputation: 53158

The issue is that OMZ generated ~/.zshrc with hardcoded PATH, this makes the shell overwrite it every time this file is read.

There is also a bug in ZSH or some mysterious power that makes ZSH read ~/.zshrc after ~/.zprofile - this leads to resetting PATH.

Just comment out the PATH=... line in ~/.zshrc and it should work.

As for the mentioned error - it is supposed to be fixed already, update RVM - rvm get head - and open a new terminal ... if it still appears - open a new issue for RVM.

Upvotes: 12

Related Questions