I installed Ruby with Homebrew:
brew install ruby
Under "Caveats" it said:
NOTE: By default, gem installed binaries will be placed into:
/usr/local/Cellar/ruby/1.9.3-p194/binYou may want to add this to your PATH.
What does that mean and how can I add it to my "path"? Assuming it has to do with a bash_profile but new to this.
Install ruby:
I'd recommend setting $PATH, $GEM_PATH and $GEM_HOME. For latest Ruby it's:
Put them in something like
~/.bash_profile
.And then to verify:
in
~/.bash_profile
add the following lineWhen you're done, close your terminal and re-open it. You should be fine.
Alternatively, you can execute the follwing in each open shell instead of closing/re-opening:
Note: I highly recommend installing ruby via rvm or rbenv so you can manage multiple ruby versions and use gemsets.
Add this line to your .profile (or .bash_profile, .bashrc, .zshrc, etc):
This is an up-to-date version of Kyle's answer. As of May 2014,
brew info ruby
prints:By default, gem installed executables will be placed into:
You may want to add this to your PATH. After upgrades, you can run
...to restore binstubs for installed gems.
Quick fix:
Open /etc/paths.