Reputation: 3852
I'm not looking to keyword spam here, and this question is in the least tangential to a previous question of mine that's currently pending. Caveat emptor.
Most references to Ruby on the Mac have things set up with the conventions mentioned in this question. Stored in /Library/, that is. My whole setup is somehow stored like this:
I'd like to understand the differences here and what on earth I did to end up with things stored in /opt/. Did it have anything to do with installing MacPorts?
And if there's not a good reason for this setup, I'd love to move in a more conventional direction. I'm pretty sure I have extra copies of at least some things lying around with things organized in this manner. And I know some important things are stored in /Library/ (my Less.CSS gem for one).
Thanks so much for any insights you can give.
Upvotes: 2
Views: 475
Reputation: 410602
MacPorts installs itself, as well as its ports, under /opt/local
, to avoid "polluting" /usr
, /usr/local
, etc. If you installed RubyGems via MacPorts, it'll exist under /opt/local
; likewise, any gem you install (globally) will also be under /opt/local
.
If you install RubyGems manually, or use the version that ships with OS X, it'll install gems under /Library
instead. That's why some tutorials reference /Library
instead of /opt/local
.
If you use a version of Ruby provided by MacPorts, it's probably easier and better to store gems under /opt/local
; conversely, if you use the Ruby that ships with OS X, or you installed your own version, it might be better to keep gems under /Library
. But it doesn't matter which place you keep them, or whether you have gems spread across both directories.
Upvotes: 4