I checked out the blog (yeah, the one you're reading) today, and what do you know? I was greeted with Passenger's generic "Rails just spewed chunks all over your good tablecloth" message. Nothing works. Awesome.
Why does nothing work? Considering I've been too busy with Real Life for about the past six months to even think about blogging (not exactly true; I manage to at least think about it a couple of times a day), I wanted to know the same thing!
So, straight into an SSH session, which promptly warned me that the host's RSA keys had changed, and I was probably being hacked. It was a false alarm, of course; I'm on a shared host, and that means more likely than not, they must have upgraded something.
Now, something as minor as a shared host installing an upgrade or two shouldn't normally bring down your server in a catastrophic way. Unfortunately, I've been kind of busy lately. The Rails app running this blog isn't the newest. It's running Rails 2.3.8, to be exact.
For the record, checking the production logs indicated the last request before downtime was received around December 18th. At least that's not too ancient, but it's been almost a month so I imagine Google's already scoured me from the face of the Net. Too bad, that.
This was just the beginning of my headache, unfortunately. Passenger was claiming I was missing all kinds of gems, but I wasn't. Something had screwed with the run environment. That was when I got an amazing, groundbreaking idea. Why not take the opportunity to actually update something?
I started with Bundler. Yeah, my app predates Bundler! I did some googling and promptly turned up the "how to use Bundler with Rails 2.3" article. I copied and pasted the source code from there into its relevant destinations, and then the server started!
But now there's something else going on. The app itself is failing -- I'm getting nil errors in weird places, and my RDoc formatter (I like to use RDoc behind the scenes) seems to not be working at all now, so I've dropped down to pure HTML in this post. I guess, most likely, one or more of the freshly-installed gems is too new.
But the blog is online, at least.
Now that my content is again available, I'm going to go back to what I was doing before all this madness started: writing a brand-spanking-new blog engine to replace this one! If I can just keep this one barely running a bit longer, I should be able to push up a its successor, Mist, which takes the form of a Rails engine that can be dropped into any Rails 3 project.
Mist isn't finished yet, but as soon as it's release-worthy I'll be swapping this blog for Mist and migrating the content.
Mist brings some really cool features to the table. First of all, it's powered by git instead of MySQL, so can run with no database at all (if that's your thing). Also, because it runs via git commits, it will be able to clone a git repository from anywhere and immediately start blogging to it, and pushing up to the repository's remote (for instance, sitting on GitHub) will effectively produce instantaneous, ongoing, distributed backups of the entire blog!
As if that wasn't cool enough, Mist also processes each commit using Markdown, and replaces each code snippet with an embedded Gist. Using Gists for code examples is really sweet, because it means that if your actual blog post doesn't come up in Google (or if your blog is down like mine...), then maybe the relevant source code (and a convenient link back to the article!) will instead!
Mist isn't completely dumb about Gists, though. If a Gist can't be loaded (you delete it by mistake, for instance), it'll fall back to the standard Markdown code examples instead. The drawback to this is no syntax highlighting, but the benefit is that your code still looks like code. Fair trade. :)
I haven't even finished brainstorming all of the cool possibilities that Mist is going to offer. Somehow I'm sure the ability to diff, fork and branch the blog itself are going to produce some very awesome features indeed -- but for now, my primary objective is getting the core component online, so I can say goodbye to this obsolete code base!