Description
I am still getting the warning given below when I run rvm -v
.
Warning! PATH is not properly set up, /Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3/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 ruby-2.7.3
To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
rvm 1.29.12-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
Although it seemed to me that RVM was successfully installed after type rvm | head -1
returned rvm is a function
.
Steps to reproduce
I am using OS X for Apple Silicon - Mac M1, with bash as the default shell. So, I installed default Ruby and installed Git, to reinstall them with homebrew.
.bash_profile
source ~/.profile
export PATH=$PATH:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
export PATH=$PATH:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3/bin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3@global/bin:/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sarvarkhalimov/.rvm/bin:/Users/sarvarkhalimov/.rvm/bin
export PATH=$PATH:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3/bin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3@global/bin:/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sarvarkhalimov/.rvm/bin:/Users/sarvarkhalimov/.rvm/bin
export PATH=$PATH:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3/bin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3@global/bin:/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sarvarkhalimov/.rvm/bin:/Users/sarvarkhalimov/.rvm/bin
export PATH="/usr/local/bin:$PATH"
export PATH="/opt/homebrew/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
.zshrc if required.
eval "$(rbenv init -)"
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="/opt/homebrew/bin:$PATH"
export PATH="/usr/local/bin:$PATH"
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
.bashrc
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
and trying to install RVM following the steps listed below:
Install gpg using Homebrew to verify the integrity of the RVM installer.
brew install gpg
brew doctor
And gotYour system is ready to brew.
which seems that I successfully added it.Download the public key for the RVM installer.
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
and I am not getting any error, also seems to be successful.To install RVM and the latest version of ruby and rails, which is probably a good idea, use the following command.
\curl -sSL https://get.rvm.io | bash -s stable --autolibs=enable
which is returning the following (seems to be OK):
Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
gpg: Signature made Fri Jan 15 23:46:22 2021 +05
gpg: using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: Good signature from "Piotr Kuczynski <piotr.kuczynski@gmail.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB
GPG verified '/Users/sarvarkhalimov/.rvm/archives/rvm-1.29.12.tgz'
Upgrading the RVM installation in /Users/sarvarkhalimov/.rvm/
RVM PATH line found in /Users/sarvarkhalimov/.mkshrc /Users/sarvarkhalimov/.profile /Users/sarvarkhalimov/.bashrc /Users/sarvarkhalimov/.zshrc.
RVM sourcing line found in /Users/sarvarkhalimov/.profile /Users/sarvarkhalimov/.bash_profile /Users/sarvarkhalimov/.zlogin.
Upgrade of RVM in /Users/sarvarkhalimov/.rvm/ is complete.
Thanks for installing RVM
Please consider donating to our open collective to help us maintain RVM.
Donate: https://opencollective.com/rvm/donate
- As a final step to verify that everything went well.
type rvm | head -1
which is returningrvm is a function
. And this confirms that installation was successful as per rvm.oi documentation.
Expected behavior
When I run rvm -v
, at least, I was expecting that there will not be the warning shown on the top Description section, which also briefly given below:
Warning! PATH is not properly set up, /Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3/bin is not at first place.
Actual behavior
I think I included it above in Steps to reproduce section.
Debug mode:
I have tried the solutions given in this issue or stackoverflow, but I still couldn't resolve this $PATH warning
.
Environment info
Running rvm info
returns:
Warning! PATH is not properly set up, /Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3/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 ruby-2.7.3
To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
ruby-2.7.3:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
system:
uname: "Darwin Sarvars-MacBook-Air.local 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:38 PDT 2021; root:xnu-7195.141.8~1/RELEASE_ARM64_T8101 arm64"
name: "OSX"
version: "11.6"
architecture: "arm64"
bash: "/bin/bash => GNU bash, version 3.2.57(1)-release (arm64-apple-darwin20)"
zsh: "/bin/zsh => zsh 5.8 (x86_64-apple-darwin20.0)"
remote_path: "osx/11.6/arm64"
xcode: ""
rvm:
version: "1.29.12 (latest)"
updated: "13 minutes 4 seconds ago"
path: "/Users/sarvarkhalimov/.rvm"
autolibs: "[enable] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."
ruby:
interpreter: "ruby"
version: "2.7.3p183"
date: "2021-04-05"
platform: "arm64-darwin20"
patchlevel: "2021-04-05 revision 6847ee089d"
full_version: "ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [arm64-darwin20]"
homes:
gem: "/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3"
ruby: "/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3"
binaries:
ruby: "/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3/bin/ruby"
irb: "/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3/bin/irb"
gem: "/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3/bin/gem"
rake: "/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3/bin/rake"
environment:
PATH: "/opt/homebrew/bin:/usr/local/bin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3/bin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3@global/bin:/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sarvarkhalimov/.rvm/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3/bin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3@global/bin:/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sarvarkhalimov/.rvm/bin:/Users/sarvarkhalimov/.rvm/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3/bin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3@global/bin:/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sarvarkhalimov/.rvm/bin:/Users/sarvarkhalimov/.rvm/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3/bin:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3@global/bin:/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sarvarkhalimov/.rvm/bin:/Users/sarvarkhalimov/.rvm/bin"
GEM_HOME: "/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3"
GEM_PATH: "/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3:/Users/sarvarkhalimov/.rvm/gems/ruby-2.7.3@global"
MY_RUBY_HOME: "/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3"
IRBRC: "/Users/sarvarkhalimov/.rvm/rubies/ruby-2.7.3/.irbrc"
RUBYOPT: ""
gemset: ""
Thanks in advance! I had created an issue on rvm repo as well.