Jrinard
Jrinard

Reputation: 155

RVM warning on install?

I have been using ruby globally on my macOSX 10.14.6 with homebrew and chruby and that has been causing issues when different apps and gem updates. A friend pointed me to RVM so I can isolate my projects.

Would someone mind explaining if this warning needs to fixed? I'm not entirely familiar with why or how?

I installed RVM with \curl -sSL https://get.rvm.io | bash -s stable and added "source ~/.rvm/scripts/rvm" to my bash_profile

Then ran rvm install 2.5.1

I got this in my log:

Warning! PATH is not properly set up, /Users/MYNAME/.gem/ruby/2.5.1/bin is not at first place.
         Usually this is caused by shell initialization files. Search for PATH=... entries.
         You can also re-add RVM to your profile by running: rvm get stable --auto-dotfiles
         To fix it temporarily in this shell session run: rvm use 2.5.1
         To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.14/x86_64/ruby-2.5.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.

Would someone mind explaining if this warning needs to fixed? I'm not entirely familiar with why or how?

Thank you for the help

Upvotes: 0

Views: 211

Answers (1)

Danish Ali
Danish Ali

Reputation: 294

You need to execute

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile

you shouldn't need to do it again. That line appends the necessary file inclusion information RVM into your .bash_profile. If you are using bash (as opposed to zsh, ksh, csh, tcsh or any other shell), then RVM will be accessible each time you open a new session. If you are using a different shell, that line may need to be in a different startup file. For example, if you are using zsh, then you'll probably want to append it to your ~/.zshrc file.

Having done this, simply running rvm --default use 2.5.1 once should ensure that you have the desired version of Ruby by default. Note, you should not need to add this line to your .bash_profile or similar.

Upvotes: 1

Related Questions