Skip to content

Instantly share code, notes, and snippets.

@nevans
Created November 4, 2009 16:48
Show Gist options
  • Save nevans/226201 to your computer and use it in GitHub Desktop.
Save nevans/226201 to your computer and use it in GitHub Desktop.
Why is rvm re-ordering my $PATH?
Why is rvm re-ordering my $PATH?
I can understand it placing its own dirs
on the front of the path... but why have
items 1-7 been shuffled below items 8-13?
(And no, I don't know why the /opt/local
dirs are there both with and without the
trailing slash. I'll clean that up.)
Last login: Wed Nov 4 11:44:38 on ttys015
== (nick@caladan) [Wed Nov 04]-(11:46:12) ==
~ $ echo $PATH | awk -F : '{print "PATH is set to"} {for (i=1;i<=NF;i++) {print "["i"]",$i}}'
PATH is set to
[1] /Users/nick/.gem/bin
[2] /Users/nick/.gem/ruby/1.8/bin
[3] /Users/nick/bin
[4] /opt/local/sbin/
[5] /opt/local/bin/
[6] /opt/local/bin
[7] /opt/local/sbin
[8] /usr/bin
[9] /bin
[10] /usr/sbin
[11] /sbin
[12] /usr/local/bin
[13] /usr/X11/bin
== (nick@caladan) [Wed Nov 04]-(11:46:15) ==
~ $ rvm use 1.8.6
== (nick@caladan) [Wed Nov 04]-(11:46:18) ==
~ $ echo $PATH | awk -F : '{print "PATH is set to"} {for (i=1;i<=NF;i++) {print "["i"]",$i}}'
PATH is set to
[1] /Users/nick/.rvm/ruby-1.8.6-p383/bin
[2] /Users/nick/.rvm/gems/ruby/1.8.6/bin
[3] /Users/nick/.rvm/bin
[4] /usr/bin
[5] /bin
[6] /usr/sbin
[7] /sbin
[8] /usr/local/bin
[9] /usr/X11/bin
[10] /Users/nick/.gem/bin
[11] /Users/nick/.gem/ruby/1.8/bin
[12] /Users/nick/bin
[13] /opt/local/sbin/
[14] /opt/local/bin/
[15] /opt/local/bin
[16] /opt/local/sbin
== (nick@caladan) [Wed Nov 04]-(11:46:19) ==
~ $ gem list rvm
*** LOCAL GEMS ***
rvm (0.0.74, 0.0.37)
== (nick@caladan) [Wed Nov 04]-(11:46:29) ==
~ $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment