0

Trying to bundle a rails project my company has set up for me, just installed everything onto a new computer. But keep running into this error:

Warning! PATH is not properly set up, '/Users/Name/.rvm/gems/ruby-2.1.0/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.1.0'.

Doing which -a ruby gives me this:

/Users/Name/.rvm/rubies/ruby-2.1.0/bin/ruby

And

/usr/bin/ruby

And when I echo my $PATH I get this:

/usr/local/bin:/usr/local/sbin:~/bin:/Users/Name/.rvm/gems/ruby2.1.0/bin:/Users/Name/.rvm/gems/ruby2.1.0@global/bin:/Users/Name/.rvm/rubies/ruby2.1.0/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/Name/.rvm/bin

Could anyone help me figure this issue out? I've looked online quite a bit and have yet to find a walkthrough or real in-depth explanation on how to fix this issue.

Andrew Ice
  • 831
  • 4
  • 16
  • What shell are you using? – jonahb Jan 19 '14 at 23:25
  • 2
    somewhere in your **.bash...* init files the PATH is changed o become `/usr/local/bin:/usr/local/sbin:~/bin` on the first place, please see them – Малъ Скрылевъ Jan 20 '14 at 06:08
  • @maijoa My path apparently applied multiple versions of itself to the my $PATH variable. Therefore /usr/local/bin:/usr/local/sbin:~/bin became: /usr/local/bin:/usr/local/sbin:~/bin/usr/local/bin:/usr/local/sbin:~/bin Needless to say I had to go in and remove the multiple versions. Very strange. Unable, and Unwilling to replicate this issue. – Andrew Ice Jan 21 '14 at 16:45

1 Answers1

0

See this answer to a similar question. You need to go through your terminal's config files (.bash_profile, .bashrc, .zshrc, etc).

Replace this line: export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting With this line: export PATH="$HOME/.rvm/bin:$PATH" # Add RVM to PATH for scripting

To make sure the RVM code is always at the start of $PATH

Community
  • 1
  • 1
Mirror318
  • 11,875
  • 14
  • 64
  • 106