Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rvm keeps ignoring my .rvmrc

Tags:

ruby

zsh

rvm

rvmrc

I'm having some problems with my project. I keep an .rvmrc in my project's directory with the following config:

rvm use 1.9.2

and I put the following lines into my ~/.zshrc:

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

Yet whenever I cd into my project's directory, ruby -v shows ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0].

What am I missing here?

like image 251
pkazmierczak Avatar asked Feb 18 '12 12:02

pkazmierczak


2 Answers

Are you sure rvm is loaded correctly? According to the docs

type rvm | head -1

should show

rvm is a function

The rvm script referenced in you ~/.zshrc is only executed if it exists. Otherwise it's skipped silently.

like image 126
iltempo Avatar answered Nov 16 '22 20:11

iltempo


After an update, RVM seemed to be ignoring all my .rvmrc files. I eventually got it to work by running

rvm reload
like image 9
KurtPreston Avatar answered Nov 16 '22 21:11

KurtPreston