Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
pcragone opened this Issue · 17 comments

8 participants

@pcragone

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

I have the same problem.

@ryansch

Installing 1.15.10 (instead of 1.16.0) removes this issue.

@mpapis mpapis was assigned
@mpapis
Owner

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.

@staugaard

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

@pftg

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

@mpapis
Owner

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

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

@stask

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
Owner

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

@stask

@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

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

@PatrickTulskie

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.

Edit...
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
@mpapis
Owner

could someone test after:

rvm get head
rvm reload

I will push it to stable if it works

@stask

@mpapis Yep, works

@mpapis
Owner

pushed 1.16.5:

rvm get stable

should fix it

@stask

Updated to 1.16.5, all good again. Thanks.

@PatrickTulskie

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
Something went wrong with that request. Please try again.