RVM PATH is not properly set up
<p>I've recently run into the following error from rvm when trying to upgrade my ruby version.</p>

<pre><code>Warning! PATH is not properly set up, '/home/sam/.rvm/gems/ruby-2.2.1/bin' is not at first place,
</code></pre>

<p>My <code>echo $PATH</code> is as follows:</p>

<pre><code>/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
</code></pre>

<p>My .bashrc has the following lines in it</p>

<pre><code>export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting

### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
</code></pre>

<p>And .bash_profile has:</p>

<pre><code>[[ -s "$HOME/.profile" ]] &amp;&amp; source "$HOME/.profile" # Load the default .profile


[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
</code></pre>

<p>And my <code>rvm info</code> is as follows</p>

<pre><code>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 =&gt; GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)"
    zsh:         " =&gt; not installed"

  rvm:
    version:      "rvm 1.26.11 (latest) by Wayne E. Seguin &lt;wayneeseguin@gmail.com&gt;, Michal Papis &lt;mpapis@gmail.com&gt; [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:       ""
</code></pre>

<p>I found a solution to a similar problem <a href="https://stackoverflow.com/questions/35098490/how-do-i-set-path">here.</a>  But apparently not close enough (the proposed solution had no effect).</p>

<p>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</p>

<p><strong>Edit:</strong></p>

<p>I tried reversing the order of the two rvm lines in my <code>.bashrc</code> but this did not help the error, nor did it change the order shown by <code>echo $PATH</code>.</p>