Daniel Strunk

Nerding out: setting up Ubuntu for Ruby development

Over the last couple of days, I’ve been setting up my Macbook Air to dual boot into Ubuntu for development. Why do that, when OS X is perfectly fine for Ruby / Rails development? Because I’m a nerd. There’s also the fringe benefit of working on a similar development environment as your production environment… Because if you’re using, say, Digital Ocean, they give you the option of running Ubuntu Server for your production environment. So there’s that. For those unfamiliar, Ubuntu is a very popular, user-friendly distribution of Linux. I chose to install Ubuntu over Debian or Fedora because I didn’t want to fuss around too much with configurations, but feel free to choose whichever distro you like. I’m not going to go into installing Ubuntu on your computer; depending on your need, you could do something as simple as allowing Ubuntu to automate that process via its live install process to something more involved like setting up your own partitions and using rEFInd to dual boot (I did the latter). In fact, I won’t even be going into my whole setup. Why do that, when it’s documented perfectly well in my GitHub Dotfiles? Check them out: dstrunk Dotfiles I suppose I could touch on the particulars a bit. See, up until recently, I was using forks of other peoples’ dotfiles, which resulted in a ton of really cool terminal configurations that I never really used. My development environment was also a bit messy, often installing things ad-hoc. Instead of going that route for my new partition, I decided to write everything “from scratch”; borrowing from other dotfiles, but never copying directly. There’s a ton of influence from Thoughtbot’s dotfiles, and some from Mathias Bynen’s, but mostly my focus was on only adding things if I used them regularly. Hence a tiny repository containing only Vim and bash configurations. Here’s a quick summary:

  • Install Homebrew, rbenv, and any databases that need installing (usually Mysql / Postgresql).
  • Symlink .vim, .vimrc, .vimrc.bundles, and .bash_profile into the home directory.
  • Open up Vim and run :PluginInstall.

As stated in the dotfiles under Future plans, I’d eventually like to streamline this processes to decouple my setup from totally overwriting system files. However, even without that, I’m more inclined to this method over, say, using Thoughtbot’s rc file manager. While Thoughtbot’s way of automatically setting up your system is nice (and I especially understand when it comes to setting up multiple computers for a mid-sized business where environments must be similar), I rather enjoy manually setting up my system and understanding the why behind the what.