Jun 08
Problem:
You are trying to run Ruby on Rails on OS X, and all you ever get is
Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org
When you check gem --version you find that you already have RubyGems 1.1.1, or some other version higher than 0.9.4 that Rails ought to be happy with.
Possible explanation:
At some point you installed MacPorts. MacPorts built and/or installed a redundant version of ruby, even though you didn’t ask it to.
To confirm that this is the problem, type which ruby and see if the answer has /opt in it. If so, yes, MacPorts hosed your Rails/RubyGems. Solution: sudo port uninstall ruby
(I’m pretty confident that MacPorts is at fault here because I installed it for the first time this evening to build bzr, which involves no Ruby, and indeed is from a bunch of Python programmers who would probably sooner drink raw sewage than require Ruby for anything. So thanks, MacPorts.)
Mar 31
Rails 1.1 broke typo. My web host suggested a fix to freeze the Rails version at 1.0, but that didn’t fix the problem. It did, however, break rake so I couldn’t un-freeze.
I decided to migrate to the trunk version of typo, which works with Rails 1.1. So I downloaded that using svn, and set it up with a clean database to reduce the number of possible sources of error. It didn’t work, but creating a new blank rails app and copying over the dispatch scripts and .htaccess file fixed it.
Next problem was to migrate my data. There’s a rake migrate command which is supposed to do this. Hey, guess what, it didn’t work! So, I ended up typing in raw SQL directly to psql to update the schema of the old database to something compatible with the new one.
That done, I dumped the old data with pg_sql --attribute-inserts, and imported it back into the new database.
After learning how to reset serial numbers, I was up and running again.
Jan 22
I decided it was way, way past time I got my web site in better order. It was getting embarrassing that my ‘content management system’ (CMS) was a bunch of text files in folders, and that whenever I wanted to find something I’d written I had to resort to find . -exec grep.
For a while I entertained the idea of building my own CMS. However, I finally decided that there were much more creative and enjoyable things I could be doing than bringing work home, so I went with something someone else wrote. I may do a new site design; right now I’m using a standard template.
Getting all my existing data into the new system was a Simple Matter Of Programming. The CMS is built on Ruby On Rails, so I was able to write some code to run through the filesystem, find all the existing data, patch it up appropriately, and store it in the relational database. I implemented some heuristics to guess the missing time zone information based on the date and where I typically was at that time, so timestamps should mostly be accurate to within an hour or so. (I wasn’t totally precise about DST.)
Aside from search, pings, flickr integration, easy editing, an API for handy software, and other stuff that’s fun for me, the new system also brings the much-requested return of comments. Be good.