Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

rvm load in .zshrc causes "cd" to takes several minutes #1142

pcragone opened this Issue Sep 26, 2012 · 17 comments


None yet
8 participants

With this line in my ~/.zshrc file:

[[ -s "/Users/pragone/.rvm/scripts/rvm" ]] && source "/Users/pragone/.rvm/scripts/rvm"

cd'ing into one of my projects with this .rvmrc:

rvm use 1.9.3-p194@myproject

takes several minutes.

This seems to be exclusive to zsh - I don't have this problem in bash. This also seems to be limited to this one directory and rvm gemset

ryansch commented Sep 26, 2012

I have the same problem.

ryansch commented Sep 26, 2012

Installing 1.15.10 (instead of 1.16.0) removes this issue.

@ghost ghost assigned mpapis Sep 26, 2012


mpapis commented Sep 26, 2012

can you make sure rvm is sourced in the proper file: ~/.zprofile in some cases ~/.zlogin could be an option too - but ~/.zprofile is the preferred location for sourcing rvm.

Had the same issue, and can confirm that downgrading to 1.15.10 "fixes" it

pftg commented Sep 27, 2012

The same problem for 1.6.4. Each run of rvm use take full memory.


mpapis commented Sep 27, 2012

ok anyone please provide a gist of this trace:

( export PS4="+ \${BASH_SOURCE##\${rvm_path:-}} : \${FUNCNAME[0]:+\${FUNCNAME[0]}()}  \${LINENO} > " ; set -x ; cd /path/to/project ; )

also if possible note the staled places ...

finally did someone tried sourcing RVM in proper place ~/.zprofile? this is quite essential, you can run this:

rvm get stable --auto

it will update *rc files to proper state, try in new terminal if this persists.

stask commented Sep 27, 2012

Had similar issue with 1.16.4 -- 'rvm use ' (or cd to a folder with .rvmrc) takes forever. Downgraded to 1.15.10.

stask commented Sep 27, 2012

Updated to 1.16.4, made sure that the RVM is sourced in ~/.zprofile, got the same problem i had -- seems like it enters some infinite loop.
The trace is huge, it generates over 52MB of text in just 3 seconds.


mpapis commented Sep 27, 2012

@stask give me first 100KB as a gist, there has to be a loop, reading the gist should tell me where.

stask commented Sep 27, 2012

@mpapis can't create 100kb gist (actually 50kb not working too). I uploaded it to my dropbox: https://dl.dropbox.com/u/153373/rvm-trace-100kb

fabn commented Sep 27, 2012

For me it's the same under zsh, downgraded to 1.15.10 to restore it.

Also having this problem. I see in the terminal window it repeatedly goes between "zsh" and "which" and sits there indefinitely.

I downgraded to 1.15.10 and the problem went away. I was on 1.16.1 this morning, upgraded to 1.16.4 to see if it fixed the problem and wound up downgrading to 1.15.10 to be able to work.

I also moved my RVM loader to the .zprofile file and re-upgraded to 1.16.4 with the --auto flag and the problem persists. Going back to 1.15.10 for now.

@mpapis mpapis closed this in 540c5f6 Sep 27, 2012


mpapis commented Sep 27, 2012

could someone test after:

rvm get head
rvm reload

I will push it to stable if it works

stask commented Sep 27, 2012

@mpapis Yep, works


mpapis commented Sep 27, 2012

pushed 1.16.5:

rvm get stable

should fix it

stask commented Sep 27, 2012

Updated to 1.16.5, all good again. Thanks.

Confirmed. 1.16.5 fixed it. Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment