Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command not found: __rvm_cleanse_variables (again?) #770

Closed
mysteriouspants opened this issue Feb 20, 2012 · 25 comments
Closed

command not found: __rvm_cleanse_variables (again?) #770

mysteriouspants opened this issue Feb 20, 2012 · 25 comments
Assignees
Milestone

Comments

@mysteriouspants
Copy link

I see #662 is closed, but I'm getting the same problem with MRI 1.9.3-p125:

/Users/cmiller/.rvm/scripts/initialize:40: __rvm_cleanse_variables: function definition file not found

I'm using ZSH (zsh 4.3.11 (i386-apple-darwin11.0)) on OS 10.7.3 with oh-my-zsh. I tried reverting back to stable, upgrading to head, and reinstalling RVM (by moving the old .rvm to .rvm-backup and then installing again), but it still gives me this error. I'm also experiencing issues where Rails is loosing its head and refusing to run the server (the rails s command tells me "no Ruby script found in input (LoadError)"). RVM version says it's at 1.10.2.

> rvm -v

rvm 1.10.2 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]

I'm a little interested in why it's doing this. I think it's plenty possible that I did something wrong. Sorry if this is a duplicate!

@mpapis
Copy link
Member

mpapis commented Feb 21, 2012

please show me the output of rvm get head --auto and restart your computer - please include output of uptime just in case.

@ghost ghost assigned mpapis Feb 21, 2012
@mysteriouspants
Copy link
Author

So what I did was blow away everything in RVM (I'm a fairly religious bundler user, so it's not a big deal to me).

I reinstalled RVM about a million times, and then this (of all the brain-dead things) worked:

  1. I installed ZSH 4.3.15 via Homebrew
  2. I installed RVM head (after having removed all mention of it from all my dotfiles).
  3. RVM added things to .zshenv and .zlogin
  4. At this point, I had the same error.
  5. I switched to ZSH 4.3.11 (bundled with the system)
  6. The error went away.

I can't explain it, but it does work now. If I catch it again I'll run through all the diagnostics I can to try and nail it down. For now I'm closing the issue.

Thanks!

@mpapis
Copy link
Member

mpapis commented Feb 21, 2012

ZSH 4.3.15 has bugs related to arrays in early stages of loading shell, only ZSH 4.3.12 has proven to work good with RVM (full use of shell scripting).

@mysteriouspants
Copy link
Author

It's a little funky because I ran rvm get stable because I wanted 1.9.3-p125, but this caused it to blow up and give me that error. I spent a few hours thunking around and I only tried changing ZSH versions at the end. So it went wonky while using 4.3.11. Who knows? My ZSH is a little tortured between Oh-My-ZSH and all the other weird things I've done to it. I took the opportunity to clean out some cruft, so it's anybody's guess what was gumming up the works.

@xenocid
Copy link

xenocid commented Mar 22, 2012

I have this issue and can't get rid of it, despite the numerous attempts to re-install zsh and rvm in different configurations (4.3.11 and 4.3.17 for zsh; stable and head for rvm). I would really appreciate some help.

@mpapis
Copy link
Member

mpapis commented Mar 22, 2012

I was providing one more fix few hours ago, when did you updated rvm last time ? can you try again ? also if it does not work please join #rvm irc channel on freenode servers so we can debug & fix it in real-time.

@shigeya
Copy link
Contributor

shigeya commented Apr 6, 2012

I hit by this issue too, on FreeBSD 8.2, zsh 4.3.17. Which branch I need to try?

and one thing I'm sure is: enabling static link when building zsh with FreeBSD ports break regex module linking, cause rvm to totally useless.

@shigeya
Copy link
Contributor

shigeya commented Apr 6, 2012

I tried master branch. no luck.

@mpapis mpapis reopened this Apr 6, 2012
@shigeya
Copy link
Contributor

shigeya commented Apr 6, 2012

I happen to have FreeBSD 9.0 environment which installed almost nothing. Tested with the env, with zsh 4.3.17 cause no issues I mentioned above.

Will test again, on the environment I had issue. At this moment, I solved the issue by installing zsh 4.3.12 on alternate path from FreeBSD ports

@mpapis
Copy link
Member

mpapis commented Apr 6, 2012

that would mean that the previous version of zsh was loading limited shell, you can verify that with:

[[ ":$SHELLOPTS:" =~ ":posix:" ]] && echo "limited shell;" || echo "shell: $SHELL;"

@shigeya
Copy link
Contributor

shigeya commented Apr 6, 2012

Thanks.
now, I logged in same account, change the shell back, the issue gone!
I have no idea on the difference. Very weird.
I'm sure it was not restricted zsh. (since I installed new binary on /opt/local and the component of the path I change was
'usr' to 'opt' using vi, I'm sure)

Anyway, for now, please close. If I encounter same issue again, I will try to figure out.

@mpapis
Copy link
Member

mpapis commented Apr 6, 2012

I think we will get the same error few more times, it's just bug in the update, i think I solved all the obvious paths that could lead to this problem ... but who knows

@mpapis mpapis closed this as completed Apr 6, 2012
@beneggett
Copy link

This answer on SO solved it for me: http://stackoverflow.com/questions/10585002/zsh-complains-about-rvm-rvm-cleanse-variables-function-definition-file-not-fo

@Jeweller-Tsai
Copy link

I just removed the __rvm_cleanse_variables in ~/.zcompdump , is that ok ?

@mpapis
Copy link
Member

mpapis commented Jul 15, 2012

@Jeweller-Tsai if that worked then it should be fine

@hanetzer
Copy link

Had same issue, googling led me to this issue. Following @Jeweller-Tsai 's example I added
rm -f ~/.zcompdump{,.zwc}

to ~/.zlogin just before

{

Compile the completion dump to increase startup speed.

zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
zcompile "$zcompdump"
fi
} &!

which totally removes the issue for me.

Using arch linux kernel 3.11.4-1, rvm 1.22.17 and zsh 5.0.2 with zprezto (oh-my-zsh fork or something of the like)

Just realized this was old as heck and closed, but I suppose putting this here will help others.

@tamvm
Copy link

tamvm commented Dec 9, 2013

This tip may help you out: http://stackoverflow.com/questions/10585002/zsh-complains-about-rvm-rvm-cleanse-variables-function-definition-file-not-fo

@sc68cal
Copy link

sc68cal commented Dec 19, 2013

Deleting the zcompdump files cleared up this error for me - thanks for the tip @Tam-Vo

@chancez
Copy link

chancez commented May 5, 2014

I ran into this error and deleted my zcompdump files and it also worked. Figured comment here might help someone else out as well.

@shifu
Copy link

shifu commented May 21, 2014

This tip helped me too!

@zlx
Copy link

zlx commented Oct 27, 2014

👍 Good tip

@dwcaraway
Copy link

the rm -f ~/.zcompdump* command to clear zcompdump worked for me as well, thanks @Tam-Vo

@johnwatsondev
Copy link

@Tam-Vo Thanks for share.

@casatwy
Copy link

casatwy commented Sep 7, 2017

rm -f ~/.zcompdump* does not work for me because I don't event have these files in my home path.

I checked the ~/.zlogin and modfied the rvm script path, so the content of new .zlogin is:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

and it works.

I think you should check wether there is rvm in ~/.rvm/scripts

@wesson-yi
Copy link

@Jeweller-Tsai, you are very clever。I don't know why, but I can avoid him.( ̄. ̄)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests