Hi everyone
If you don't install gems with sudo
on a mac, by default they will be placed in a directory like
.gem/ruby/1.8/gems/
If you DO install by with sudo
, my understanding is they are normally placed in the system directories, like so:
/usr/local/lib/ruby/gems/1.8/gems/
Is there a good reason you should install gems with sudo
instead, other than simply letting others share them with you? *
I'm under the impression that you'd sudo install gems because if you as user bob install the gems inside bob's directory, then a user like www-data (used by Passenger/Apache on Ubuntu Linux when serving files), to use them - is this the only reason you'd use them like this?
Or is best practice now to use something like Ruby Version Manager instead now?
I'd really appreciate hearing from some more experienced ruby developers about where you store yours and why.