From: John Joyce Date: 2007-10-04T00:43:13+09:00 Subject: Re: problem with ruby installation On Oct 3, 2007, at 7:24 AM, Rick DeNatale wrote: > On 10/2/07, Sean Cahoon wrote: >> Thanks! That did the trick. But what's the difference between usr/lib >> and usr/local/lib? What is the local directory supposed to be for? > > Brief answer > > It's to separate code which you've installed to customize your system > from the 'stock' installed code. Updating the system won't touch it. > > Possibly boring expansion > > There's a standard called the Filesystem Hierarchy Standard or FHS > which maps out how POSIX filesystems are 'supposed' to be laid out. > Various *nix and *nix-like systems follow this standard to varying > degrees. OSX follows it less than, say debian linux, but the concepts > of FHS are still instructive. Actually in some ways it might be more > accurate to say that the different distributions interpret the FHS > somewhat differently. From a ruby point of view, debians particular > interpretation of the FHS is why debian isn't completely comfortable > with gems http://pkg-ruby-extras.alioth.debian.org/rubygems.html > > You might find other **/local directories and they probably serve the > same purpose. > > And on OSX (which I'm just learning*) I've found less consistency in > where software is installed compared to my debian/ubuntu systems. For > example some of the software I've installed got put in /usr/local by > default and other sw went to /opt/local > > * I'd been away from the Mac for some time (my last Mac ran OS 8.x). > OSX feels like a foreign beast when I look at it from my old Mac > experience, so many things have changed. I'm finding that my linux > experience is much more useful in adapting. Rick, opt is the MacPorts ( formerly DarwinPorts ) directory. It's the apt-get for OS X. It's not a default directory. MacPorts doesn't come with OS X. Most stuff you compile and install will by default in the makefile get put in the standard directories. Just always be careful, some people like futz the PATH variable by adding a different dot file. So after installing (say.. Python stuff? ) You always need to check your home directory for any new dot files or changes to your PATH. Their logic is sensible from one angle: they go with the OS X default path. Their logic is bad from another angle: they don't respect the path set by the user! In the last few months I've seen people have this same path trouble many times after installing something. Another option is to read the make file, but those things can be pretty long and hairy, but if the README isn't helpful, it's Russian Roullette... Bottom line is: getting familiar with unixy stuff is a very good idea, and is not so painful as it seems at first. Most of it carries over to other *nix's !