Ever needed to store some secrets in Rails that you don’t want to share with the world? Yeah, same! In this post, I’m going to outline a really simple way to store your application’s secrets in a file called config/secrets.yml. Rails configuration and you First of all, let’s discuss exactly how this is going to work. If you’ve even configured...
I’ll be the first to admit that I’m not that great at design, especially typography and detailed elements. I’m just one of those people who can see what they want in their heads just fine, but something just goes…wrong…between the head and the page. In this post, I’m going to explain some of the lessons I learned while focussing on...
Often in the Rails projects I build, I have a need to store configuration that I don’t really want to have in my code. The most obvious way to do this is to either store the configuration in a YAML file (e.g. config/settings.yml), or in environment variables. Foreman is Heroku’s answer to these types of configuration challenges. It is used...
About the Application The idea behind On the Spot was to allow everyone in the office at work to control the playlist, so that there was some semblence of fairness about what we listen to. Probably the simplest way of showing you what it is is to see some pictures, right? Part 1: You can search for music Open Full-Size...
I get stung by this one all the time, and I can never remember how I fix it. I’m noting it down here, in the hope that next time I’m googling for a fix I’ll stumble across my own blog post. Adding network adapters (or refreshing the MAC address) of a virtual machine running a Debian-based OS on VirtualBox causes...
Introduction I’ve spent the last week translating Latter (really badly) into Māori using Rails’ I18n support. Since this is the first time I’ve done a full site translation, I wanted to detail how I did this here. First, I’ll quickly explain how Rails I18n support works. Essentially, it’s a key-value store - you specify a ‘key’ which represents a bit...
I’m a big fan of not installing XCode on new Macs. I just don’t think it’s necessary, unless you’re genuinely building OS X or iOS applications. Instead, I prefer to download the [Apple Command Line Tools] straight from Apple’s Developer Center, and install everything else I need to with Homebrew. Here’s how to do that. First of all, download and...
For quite some time now, I’ve been using alloy’s fork of Macvim as my primary editor, along with janus, and it’s been working out really well. I’ve just started trying out Sublime Text 2 though, and it’s been pretty nice (although I still have reservations). Something I can’t stand in a developer application though, is for an application to re-open...
Documentation in Ruby on Rails apps tends to be somewhat of a hit-and-miss affair, particularly within non-product organizations. In this blog post, I’ll run through how Tomdoc has helped my code become clearer and easier to maintain, with very little overhead. First, a small explanation about Tomdoc. It is effectively a spec that dictates a way of writing inline documentation...
This morning I wrote a quick script that I found quite handy - it takes a CSV file, and adds cards to Trello from it’s contents. At 3months, we quite regularly get long spreadsheets with requirements, so this script saves us a lot of time when we need to import these lists into cards so we can estimate and expand...