Resources For Rails Development in Vim

While most programming languages seem to take steps toward big, full-featured graphical IDEs, Rails development seems to have gone the reverse: back to the command line, command line editors, and minimalist interfaces. Today, I’d like to share with you several resources that I’ve used to streamline my development process.

TextMate (€39) — Considered the definitive text editor for OS X, TextMate is a worthwhile purchase for any developer using any language. It’s extensible, powerful, and, Rails-specifically, allows for easy navigation between your MVC layers with easy hotkeys. If you code on OS X, you owe it to yourself to buy this.

The Playbook (free/$15/$50) — If you’re looking for tips on how to start a web design firm, set up your development environment, do proper project management, and more, consider picking up a copy of The Playbook, an eBook written by the geniuses at ThoughtBot. ThoughtBot is known for several of their Ruby gems that have been released into the public domain, including high_voltage, clearance, suspenders, and more. They are also known for some of their hugely popular applications, including Airbrake and Trajectory. They offer a few free snippets, a single user license, and a group license.

Rails.vim (free) — While Vim is an amazing editor on its own, it thankfully allows for plugins to be written to extend the functionality. Written by Tim Pope (Twitter/GitHub), Rails.vim is an amazing plugin that adds a whole host of commands to the editor, allowing for more fluid Rails development. Best of all, it’s free, open source, and readily available on our favourite source control repository, GitHub.

Vim for Rails Developers ($15/$50) — Vim is considered one of the most powerful text editors out there, and it’s available on virtually every platform. That being said, it’s a dauntingly steep learning curve (although I wrote a guide on getting started with it), and every bit of help you can get is worth it. This 34 minute video gives you the rundown of using rails.vim along with your Vim install. As with The Playbook, a single user and group license is available.

RailsCasts (free/$9 per mo) — Probably the go-to for most Rails podcasts, Ryan Bates (Twitter/GitHub) has been churning out 2 podcasts about Ruby on Rails for years now. He explains topics clearly, pushes the limits of what gems can do, and always offers comparisons between similar gems. Most of his content is free, but Pro users ($9/month) get access to Pro episodes which cover more content and new gems.

GNU Screen and Byobu Made Easy

For the *nix elitist, no graphical tool comes close to the power that the command line provides. While this may strike some people as odd, particularly those who only have experience with Windows, it’s a pretty well known fact that the Linux command line provides a method of controlling every aspect of your computer activity; this is so much the case that most GUI applications on Linux are just command line “wrappers”, hiding you from what’s actually happening behind the scenes.

GNU ScreenWhile this is all fine and dandy, things like development and multi-tasking can prove to be a little frustrating when connecting to a remote location and requiring more than one window open. Although a typical command line pretty much prevents this from happening, using GNU Screen or Byobu can make things a lot smoother. One window, multiple command lines.

As most developers will tell you, having multiple windows available to you is a godsend. It’s particularly useful when you have scripts to run in the background that generate output, but you don’t want to fork them as a daemon. Now, with GNU Screen and Byobu, you can do this easily, and even make your screen look snazzy as well. The only drawback to these utilities is that they are a little hard to get used to. In this post, I will quickly outline some of the key combinations which I use regularly.

GNU Screen and Byobu Simplified

The number one thing to remember about every command you use is Ctrl+A, which will be written as C-a. This is picked up by screen and will tell the utility that the next characters typed will be commands for screen to interpret. Keeping in mind that all keys are case-sensitive (as most things are in Linux), take a look at some of the commands below:

C-a c - Create a new screen window

C-a A - Rename the screen

C-a C-a - Go back to the previous window

C-a <0-9> - Switch to screen #0-9 (quick toggle)

C-a " - View a list of the current screens, which will allow you to select one from the list

C-a ' - Enter a screen number to switch to (slower version of C-a <0-9>)

C-a d - Detach the whole screen session and fork to the background. Very useful for remote sessions you want to leave open. The command "screen -r" will resume your screen session.

C-a <Escape> - Scroll up through your command line "history" and see what output you previously got. Hitting <Escape> again cancels it.

With the introduction of Byobu in Ubuntu 9.10, you can also get some statistics added to the bottom of your command line window to help keep you informed about the state of the system you are running on. Hitting F9 in session will bring up the menu for customization, which can make your screen session look pretty awesome. Instead of using screen to start your screen session, simply use byobu instead. Easy as pie.

If you have any questions about GNU Screen or Byobu, let me know and I’ll see what I can do to answer them. Stay tuned on Friday for another issue of “Five Things” (hopefully).

Ubuntu’s Koala Has Good Karma

It’s not like me to gush over operating systems. Particularly looking at what we’ve dealt with in the past. If we’re lucky, we got stability in an OS, but usually at the expense of it looking terrible. This year seems to have caused things to change, however. With the release of the Windows 7 RC, Microsoft has restored a good amount of the faith that it lost after churning out the load of crap that it called Vista.

The open source community is never far behind, and Canonical’s Ubuntu 9.10 operating system is a work of art. Seriously. I would frame it and mount it on my wall if I could. Unfortunately I can’t, so all I can do is gush about it and tell people about all of it’s amazing features. Non-techies: just smile-and-nod your way through this post :).

Ubuntu One

Cloud computing is all the rage these days, and Ubuntu has jumped on the bandwagon by presenting One, a personal cloud for the synchronization of files across multiple Ubuntu computers. Set up your account, get your 2 gigs of free space, move files into the Ubuntu One folder, and let them sync. Easy as pie.

ext4 Filesystem

Following in Fedora’s footsteps, Ubuntu has set ext4 as 9.10’s default filesystem. Although you won’t make the switch if you upgrade, fresh installs will feel the warm glow of ext4 during their install.

Uncomplicated Firewall

One of my main complaints with Ubuntu’s previous setups is that it fails to include a firewall by default, and that has been remedied in 9.10, with the introduction of ufw, the uncomplicated firewall. No more sifting through the iptables’s man pages to figure out how to add a simple allow rule; ufw makes firewall management easy.

Faster Load Times with Upstart

Another popular trend recently has been the goal of reducing boot times as much as possible. Fedora Project made waves as they aimed for a 20 second boot time from BIOS to login page. Although they were a little short of their goal, they made some important headway, showing that not every single scrap needs to be loaded and cached on boot. Ubuntu has carried this forward and has made a similar goal. Although they don’t mention any specific time-related goals, they made the switch to Upstart, which makes the loading page look smooth and cuts the boot time significantly.

Overall, I’m really happy with the progress Ubuntu has made. Although a lot of previous versions have fallen a bit behind on the times in exchange for having a stable system, they are catching up with the times and even pushing the envelope with new ideas. If you were looking for a reason to switch to Linux, put this one at the top of your list. If you’re not convinced, download the LiveCD and try it out without installing (although your performance will suffer since it’s loading from a CD…duh…).

Thanks for giving this a read, everyone. If you like what you see, or have any suggestions for further writings, drop me a line in the comments section below and give me a vote on Reddit or Digg. I read each and every one of your comments: I promise :)

Testing Out Fedora 11

A few years ago, I made the switch on my laptop from Windows to Linux. If I had to summarize the experience, I’d say it’s been…well…an experience. It’s had its ups and downs as I tinkered around with more distributions than I can remember (I can think of 7, not including different architectures). I initially made the switch because the recovery disks I had burned for my Windows installation weren’t working, and I needed a suitable alternative, preferably one that wouldn’t bust the bank and would be easy to use. Linux satisfied (and in some cases, excelled) in both of these.

After much deliberation and testing, I finally decided on the Fedora distribution, which I am still with to this day. Ten days ago, they released their newest distribution, Fedora 11 (Codename Leonidas), which added a whole slew of new features. Although I only have a day or so with the new distribution, I’ve tested a lot of the new features. They are nicely separated into both Technical and Non-Technical.


20-Second Boot Time

The first problem anyone seems to have with computers is that they take too long to boot up. Fedora 11 helps a lot with this by aiming for a 20-second boot time, from the time you start your computer until the time you log in. It was about 35 seconds for me on a 3 year old laptop, but regardless, that’s a huge improvement over, say, Vista’s 2-minute boot. If 35 seconds isn’t fast enough for you, you might want to loosen up your schedule a little.

Improved Touchpad Support/Features

The one complaint I always here about touchpads on laptops is that people accidentally click on things while they’re typing, moving the position of the cursor and inadvertently typing in the middle of a previous paragraph. The newest upgrades to the touchpad drivers are amazing. You have the option of disabling the touchpad while typing, and enabling or disabling mouse clicks by tapping on the touchpad.

My personal favorite, however, it the addition of Multi-Touch scrolling. Rather than having to run your finger along the side of the touchpad, two fingers can be used to scroll. You also have the option of enabling horizontal scrolling. The best part is you don’t need a touchpad specifically designed for multi-touch; it works great on mine without any problems.

Nice Graphics

Ok, although a little technical, I’m still putting it in here because who doesn’t like smooth-looking graphics with direct acceleration? Enabled from the kernel level, direct acceleration worked right out of the box for me, which means desktop effects work without any configuration. Those who are a little more tech-savvy can obviously look into the coveted Compiz installation.



Yeah, that’s right: the ext4 filesystem is now standard on Fedora. The filesystem now supports filesystems over 1 exabyte and files up to 16 terabytes in size. If you’re going to be creating filesystems or files that large, you don’t need to read this review. There are a whole slew of improvements made over ext3, which should make for an overall more reliable experience.

2.6.29 Kernel

The new kernel runs great for me. There’s been a lot of new features added, and far more than I can go into depth with. I have yet to have a crash yet, so that is always a good sign.

GNOME 2.26.1 and KDE 4.2.2

Those that have seen the older versions of KDE (ie. pre-4.0) I’m sure remember how “immature” it looked. I always got the impression that it was geared for pre-teens. KDE 4 changes all of that, and makes me seriously reconsider using it. Not only does it look nicer, but everything is well laid out in the menu, and the desktop widgets are integrated into the Desktop Environment. GNOME looks as regular as it always has, but makes some good strides in menu locations and the included applications.

Firefox 3.5b4 and Thunderbird 3

I have been waiting quite a while for both of these to appear in a distribution. Firefox 3.5 is great so far, and Thunderbird looks very promising as well.

Smaller Footprint

Gone are the days of yonder when a Fedora installation was a 3.5GB DVD download with the inability to test it out beforehand. Fedora has reduced the size of the installation media to a staggering 690MB LiveCD, reducing bandwidth usage and and letting you try the distro out before installing. This is one of the best things Fedora has done, and I’m really glad they made the switch.


I’m so far really happy with this new release. It’s been stable and a lot of new features have been added which helps affirm my decision to stick with Fedora. If you happen to be considering making the switch from Windows, I recommend checking it out. The LiveCD allows you to try things out before installation, which will let you test the waters before plunging in to the deep end.