I've recently run into the following error from rvm when trying to upgrade my ruby version.
Warning! PATH is not properly set up, '/home/sam/.rvm/gems/ruby-2.2.1/bin' is not at first place,
My echo $PATH
is as follows:
/usr/local/heroku/bin:/home/sam/.rvm/gems/ruby-2.2.1/bin:/home/sam/.rvm/gems/ruby-2.2.1@global/bin:/home/sam/.rvm/rubies/ruby-2.2.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/sam/.rvm/bin:/home/sam/.rvm/bin:/home/sam/.rvm/bin:/home/sam/.rvm/bin
My .bashrc has the following lines in it
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
And .bash_profile has:
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
And my rvm info
is as follows
Warning! PATH is not properly set up, '/home/sam/.rvm/gems/ruby-2.2.1/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.2.1'.
ruby-2.2.1:
system:
uname: "Linux bitey0asus 3.13.0-77-generic #121-Ubuntu SMP Wed Jan 20 10:50:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux"
system: "ubuntu/14.04/x86_64"
bash: "/bin/bash => GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated: "10 minutes 55 seconds ago"
path: "/home/sam/.rvm"
ruby:
interpreter: "ruby"
version: "2.2.1p85"
date: "2015-02-26"
platform: "x86_64-linux"
patchlevel: "2015-02-26 revision 49769"
full_version: "ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]"
homes:
gem: "/home/sam/.rvm/gems/ruby-2.2.1"
ruby: "/home/sam/.rvm/rubies/ruby-2.2.1"
binaries:
ruby: "/home/sam/.rvm/rubies/ruby-2.2.1/bin/ruby"
irb: "/home/sam/.rvm/rubies/ruby-2.2.1/bin/irb"
gem: "/home/sam/.rvm/rubies/ruby-2.2.1/bin/gem"
rake: "/home/sam/.rvm/rubies/ruby-2.2.1/bin/rake"
environment:
PATH: "/usr/local/heroku/bin:/home/sam/.rvm/gems/ruby-2.2.1/bin:/home/sam/.rvm/gems/ruby-2.2.1@global/bin:/home/sam/.rvm/rubies/ruby-2.2.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/sam/.rvm/bin:/home/sam/.rvm/bin:/home/sam/.rvm/bin:/home/sam/.rvm/bin"
GEM_HOME: "/home/sam/.rvm/gems/ruby-2.2.1"
GEM_PATH: "/home/sam/.rvm/gems/ruby-2.2.1:/home/sam/.rvm/gems/ruby-2.2.1@global"
MY_RUBY_HOME: "/home/sam/.rvm/rubies/ruby-2.2.1"
IRBRC: "/home/sam/.rvm/rubies/ruby-2.2.1/.irbrc"
RUBYOPT: ""
gemset: ""
I found a solution to a similar problem here. But apparently not close enough (the proposed solution had no effect).
Anyway if anyone has any ideas, I'd appreciate it. I'm a little clueless on the ins and outs of rvm so I'm a bit in the dark here. Thanks in advance
Edit:
I tried reversing the order of the two rvm lines in my .bashrc
but this did not help the error, nor did it change the order shown by echo $PATH
.