0

Anyone have idea how to fix this one. i almost try everything here.

after i type brew doctor here the error

Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

phar
phar.phar
php
php-config
phpize

Consider setting your PATH so that /usr/local/bin
occurs before /usr/bin. Here is a one-liner:
echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile

and here my ~/.bash_profile

[[ -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*
echo $PATH /usr/local/bin:/usr/local/sbin:/Users/ericsonluciano/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
export PATH=/usr/local/bin:/Users/ericsonluciano/.rvm/gems/ruby-2.1.2@rails4.1/bin:/Users/ericsonluciano/.rvm/gems/ruby-2.1.2@global/bin:/Users/ericsonluciano/.rvm/rubies/ruby-2.1.2/bin:/usr/bin:/bin$
export PATH=/usr/local/bin:$PATH

Thanks everyone for help :)

Eric Luciano
  • 35
  • 1
  • 9
  • 1
    I can't reproduce this on my system using that .bash_profile. However, your fourth line doesn't do anything to the path (it just displays the current path followed by the text `/usr/local/bin:/usr/local/sbin:/Users/ericsonluciano/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin`; and your fifth line has a `$` at the end which it shouldn't; and it's not recommended to hard-code all those RVM paths into your path like that (sourcing RVM as in line 3 should take care of it). I would cut out lines 4 and 5 and change the last one to `export PATH=/usr/local/sbin:/usr/local/bin:$PATH`. – echristopherson Jun 16 '14 at 17:54
  • still not working i think it's because of mamp – Eric Luciano Jun 19 '14 at 18:05
  • See http://stackoverflow.com/a/27191389/766289 – Francisco Dec 02 '14 at 13:23

1 Answers1

1

The right thing to do is to do any path settings inside a configuration file that is sourced by both non-interactive and interactive shells.

Likely you have code in your ˜/.bashrc (meant for only interactive settings) mucking with your path.

See this answer https://stackoverflow.com/a/27191389/766289 and just use bash in place of zsh.

Community
  • 1
  • 1
Francisco
  • 3,980
  • 1
  • 23
  • 27