Getting Warning! PATH is not properly set up when doing rvm use 2.0.0 --default
The answer was to put this:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Load RVM into a shell session *as a function*
**at the BOTTOM** (last line - important!) of my .bashrc file. I had it in my .bash_profile file (I am on Ubuntu) and that only partially worked leading to the confusing errors.
RVM list - Warning! PATH is not properly set up
Try this rvm reset
Then run: rvm version
Let me Know if it still not resolved
Thanks!
Warning! PATH is not properly set up, /Users/me/.rvm/gems/ruby-2.7.3/bin is not at first place
Solution
I found the solution here which states the following:
I encountered a similar error using Mac OS 10.14.6 and RVM 1.29.9.
For me the issue was resolved by moving the following code in my
.bash_profile
to the bottom of the file:# RVM can encounter errors if it's not the last thing in .bash_profile
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to path for scripting (to manage Ruby versions)
export PATH="$GEM_HOME/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
RVM PATH is not properly set up
Your PATH
does not start with /home/sam/.rvm/gems/ruby-2.2.1/bin
because you have a line prepending the Heroku toolbelt path.
You can check this is true by running this in your terminal:
PATH=/home/sam/.rvm/gems/ruby-2.2.1/bin:$PATH rvm info
It shouldn't complain.
The problem comes from Heroku toolbelt modifiying your env in ways rvm doesn't care for.
As per this post, the fix is to change your .bashrc
like so:
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
You can remove the rvm line from .bash_profile
Warning! PATH is not properly set up, usually this is caused by shell initialization files
This was a bug and was handled with https://github.com/wayneeseguin/rvm/issues/2050 and was released as rvm stable 1.21.15
at 2013-07-29 19:15:30 -0700
RVM - Warning! PATH is not properly set up
You are referencing two problems in your question: the first one is answered by @the-tin-man, the other is a permissions problem:
Permission denied - /Users/mbauer/.rvm/src/rvm/gems/ruby-2.0.0-p247@global/cache/gem-wrappers-1.2.1.gemERROR: While executing gem ... (Errno::EACCES)
You can fix it using:
rvm fix-permissions
Remember, always read the instructions/warnings/errors printed by RVM, they are there to help you.
Related Topics
How to Create a Class Instance from a String Name in Ruby
Confirmation About Pgrep Returning Itself
Can't Install Ruby Rvm on Ubuntu 16.04 Due to Gpg Bug
Is This the Best Way to Unescape Unicode Escape Sequences in Ruby
Execute a Sudo Command in Ruby on Rails App
Rvm Warning! Path Is Not Properly Set Up
Fork Child Process with Timeout and Capture Output
Are Crlf Lines Ok in a Rails Project Deployed on Linux
Error Sudo: Gem: Command Not Found
Has Anyone Tried Installing Ruby & Rubygems from Source on Ubuntu (Preferably Ubuntu 9)
Can't Install Rails on MAC Os Catalina
Rvm 'Not Found' After Successful Usage and a Few Days Later