From: matt@... (matt neuburg) Date: 2006-10-27T12:25:05+09:00 Subject: Re: -bash: rails: command not found Matt wrote: > I know lots of people seem to have this problem...I've been through the > posts and have followed the advice, but I'm still having trouble. > > Terminal isn't recognizing the rails command. > > When I do a locate on rails, then echo $PATH, I'm told, > > /bin:/sbin:/usr/bin:/usr/sbin > > However, when I go through these directories in Terminal, rails is not > there. Instead, it's in usr/local/bin. My bash_login file reads > > export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" > > Why is echo $PATH telling me that rails is in a different directory > than it actually is? And how can I get terminal to recognize the > command? locate has nothing to do with $PATH, and echo $PATH doesn't tell you anything about where rails is; it tells you the value of your shell's $PATH variable. To find out where your shell thinks rails is, say: which rails If rails is not in your $PATH, the reply will be something like: no rails in /usr/local/bin /usr/local/sbin /usr/local/mysql/bin /bin /sbin /usr/bin /usr/sbin To find out where rails really is, say: find /usr -name "rails" I suspect you need to sort out your $PATH. The fact that $PATH knows nothing of, say, mysql suggests to me that whatever file it is you've edited, it's the wrong file. OMM, the thing to edit is .bash_profile (but of course YMMV)... m. -- matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/ Tiger - http://www.takecontrolbooks.com/tiger-customizing.html AppleScript - http://www.amazon.com/gp/product/0596102119 Read TidBITS! It's free and smart. http://www.tidbits.com