I have had rails up and running for about 2 years now, but while
troubleshooting an arduino problem, I inadvertently changed something
related to my path variable that caused scrip/server to no longer run,
after a reinstalling the basics... ruby-gems, etc... everything seemed
to run smoothly but now i cannot run rake.
I obviously have two versions of almost every gem on my system, but I
have no clue how to start cleaning up my machine. I want to point
everything to a single copy of my correct resources. Can anyone recomend
some good material on troubleshooting path/gem install issues, or just
some good solid resources on OS X/Unix architecture. I understand what a
path is, and what it does, but until now i've been mostly just doing
rather than understanding.
I would first remove '/usr/local/lib/ruby/gems/1.8' -- there shouldn't be
any executables in that directory. Also, you've got duplicate directories
in that PATH statement.
Then this:
richard-s-macbook-pro:restapp richard$ which ruby
/usr/local/bin/ruby
richard-s-macbook-pro:restapp richard$ which rails
/usr/bin/rails
richard-s-macbook-pro:restapp richard$ which rake
/usr/bin/rake
If you type `ruby -v` is it the version you want?
If so, I suspect you have a /usr/local/bin/rails, /usr/local/bin/rake, etc.
but because /usr/bin is first in your PATH, they are not being used.
Open a new shell and set your PATH to
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/git/bin/:/opt/local/bin:/Users/richard/bin/bin
(is that last "bin/bin" correct?)
Everything works again, thanks! Besides the 'profile', 'bashrc', and
'bash_profile' are there any other common locations where the PATH
variable would be set? A few of those declarations could not be
accounted for in those three files.
Nothing comes immediately to my mind, but I suppose some errant
installer could do it, especially if you decided to CTRL-C out of the
middle of an install.