Ruby Hate

I very nearly ended up using Octopress for this blog, instead of rolling my own with Flask+FlatPages+Frozen-Flask. It’s a great piece of software but everytime I interact with Ruby, or more accurately, Ruby’s tools and ecosystem, I end up crying and gnashing my teeth.

rbenv + bundler ended up being a little less magical than rvm, but rbenv wasn’t quite doing the right thing with my zsh config, so I had to mess with my paths for the right thing to happen.

(Sidebar: I fully appreciate that it’s almost definitely my lack of experience with rubygems, bundler, rvm, rbenv and on-my-zsh that are at fault, and not the tools themselves. I’ve internalised so much of how pip and virtualenv work that I’ve forgotten that those tools also have their quirks that someone less Pythonic might find equally as frustrating PLEASE DON’T EMAIL ME ANGRY COMMENTS, thanks).

If anyone is doing this again, on Mac OS X 10.8 with Xcode and Homebrew installed:

brew install rbenv
brew install ruby-build
rbenv install 1.9.3-p125
rbenv 1.9.3-p125

The Octopress docs recommend building 1.9.3-p0 but ruby-build complains that my version of GCC is wrong, as it’s actually LLVM in GCC’s clothing. It then recommended installing GCC from Homebrew-Dupes and a life of heavy drinking, so I took the coward’s way out and built 1.9.3-p125 which is actually LLVM compatible.

That trickery with PATH is intended to put the 1.9.3 version of gem, rake and ruby first on the path. I think rbenv is supposed to handle this by adding a fake path to your PATH, but that didn’t happen for me, and this works, so shrug.

Now you can switch to the Octopress directory, gem install bundler, bundle install and bundle exec rake to your heart’s content.

Shameful Self Promotion

I put myself through this gauntlet of hate after working with Andrew McCombe to get forced local Exim delivery working. We both thought “that would make a good blog post”.

Finally, ICYMI, here are some articles of a technical nature I’ve written for the iWeb Hosting Blog and for iWeb FTP:

  • Moving Varnish Caching Logic Into PHP… – I wouldn’t even remotely recommend doing this anymore, and we never did in production, but the technical details are still kind of neat, I think.
  • Diagnosing Magento Speed Issues With Strace and gdb, too. This needs expanding, as I’ve spent the 6 months inbetween getting progressively better at debugging PHP scripts by poking around the runtime.
  • Apache Space Core Module. An introduction into writing your own Apache module that I decided to completely ignore when Darren, Ed and I wrote a new Apache module for internal use last week. I followed someone else’s example instead. No comment.
  • Using BGP to Serve High-Availability DNS. If you have a BGP hammer, everything looks like a routing problem … nail … thing. Regardless of the analogy, this approach has been rock solid, and I’m very proud of it. We’ve extended its use to active-passive fail-over of HTTP proxy servers, with similar, great, results. If you already have BGP in your life, adding this means not having to learn Pacemaker.
  • Six Reasons not to Run your own FTP Server – my first listicle! Okay, it’s a bit salesy, but there’s no word of a lie in there.