One thing that most programmers will be aware of is that proponents of Ruby on Rails never STFU about how awesome and easy it is to use. But like just about every other open source thing I ever tried, something always screws up the moment I try to install it. According to the website, the only thing you need to get it installed on OS X is type a single command. Which for me results in….
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin aren't both writable. WARNING: You don't have /Users/mark/.gem/ruby/1.8/bin in your PATH, gem executables will not run. ERROR: Error installing rails: bundler requires RubyGems version >= 1.3.6 Gems updated: activesupport, builder, i18n, activemodel, rake, rack, rack-test, rack-mount, tzinfo, abstract, erubis, actionpack, arel, activerecord, activeresource, mime-types, polyglot, treetop, mail, actionmailer
Ok, so I guess I now have a broken install? WTF am I supposed to do now I wonder? Was I supposed to adjust some directory permissions? Was there an implied “sudo” at the beginning of that command? At least it was nice and fucking easy to cock up. Just what is the point of a package manager if it can’t even keep itself up to date?
BTW this is not actually a request for assistance, just an exasperated sigh at the tediousness of managing configurations and versions. This incredibly familiar speed bump sits squarely in my list of what I have always hated about software, and especially the open source variety. Nothing ever just works. Anything that fails is your own fault for not already knowing X, Y and Z, even though you’ve never needed to before.
After making a big mess and then starting over, I think I finally got it. I’m running OS X 10.6.x, and to get rails installed I typed the following commands at the Terminal.
sudo gem update --system sudo gem update rails
And that’s it (I think… I haven’t even started using it yet, but at least it seems to be present and not broken now). The first line updates the package manager, which is necessary because Rails won’t install otherwise. Running commands without the sudo installs stuff to your home folder where it just seems to break everything.