ZSH complains about RVM __rvm_cleanse_variables: function definition file not found

RubyMacosRvmZsh

Ruby Problem Overview


When using the latest ZSH and RVM on Mac OS X 10.7.4 ZSH complains about this:

__rvm_cleanse_variables: function definition file not found

Ruby Solutions


Solution 1 - Ruby

Running the following solved the problem:

rm ~/.zcompdump*

Note: The * is incase there are multiple .zcompdump files.

Solution 2 - Ruby

Sometime there is also ~/.zcompdump-<COMPUTER NAME>-<VERSION> file, so use:

rm -f ~/.zcompdump*

Solution 3 - Ruby

To disable the .zcompdump* file(s), you could look in your .zshrc (or /etc/zsh/* files) for compinit and add the -D flag.

This might be better than creating the files and deleting them at every login.

(source: http://www.csse.uwa.edu.au/programming/linux/zsh-doc/zsh_23.html)

Solution 4 - Ruby

My problem persisted even after the compinit -D and rm -f ~/.zcompdump*. I found this github issue and checked my .zplug directory and sure enough found some non-hidden zcompdump files (no preceding '.'). Deleted those and I was good to go. If you're using a zsh plugin manager like zgen or zplug, check their directories.

Solution 5 - Ruby

Add rm -f ~/.zcompdump{,.zwc} to .zlogin to automate it

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTyler BrockView Question on Stackoverflow
Solution 1 - RubyTyler BrockView Answer on Stackoverflow
Solution 2 - RubyheracekView Answer on Stackoverflow
Solution 3 - RubynomadView Answer on Stackoverflow
Solution 4 - RubyAndrew PrenticeView Answer on Stackoverflow
Solution 5 - RubyhanetzerView Answer on Stackoverflow