Path, /usr/bin/ and /usr/local/bin/
bash, command-line, linux, macos, watchr
Solution
The path to your command was cached with a bad value. Try to update the cached directory that bash has stored for the path.
hash -d watchr
I found the answer over here which ctags shows /usr/local/bin/ctags but when I run ctags it runs /usr/bin/ctags. How is this possible?
Problem
I installed watchr on OS X (10.8.3) using `gem install watchr`. And it's installed in /usr/bin/watchr ``` $ which watchr /usr/bin/watchr ``` However, when I tried to call it `$ watchr -v`, the system couldn't find it. ``` $ watchr -v -bash: /usr/local/bin/watchr: No such file or directory ``` I think this is related to how the path is set up on my machine. My questions: - What is the right way to fix it? - In general, what programs should go to `/usr/bin/` vs. `/usr/local/bin/`? - When I do e.g. `$ /usr/bin/watchr -e 'watch(./hello.txt) ...'`, are we looking at the hello.txt in the current directory or in /usr/bin/ i.e. the same directory as watchr?