This article was published on May 8th 2014 and takes about 3 minutes to read.
Use it with caution — it is probably still valid, but it has not been updated for over a year.
Having useful helpers at hand speeds up development and eases otherwise daunting tasks. Following these 4 simple steps does not take more than a few minutes and will make your local Rails development more productive.
This is not a tutorial - it is a guide on how to get these tools up and running as fast as possible. All of them have excellent documentation, so you really should be digging deeper to find out what else they can do for you.
Homebrew is a package manager for Mac OS X (kind of like
apt-get if you've ever been on a Linux machine). Install it along with 2 packages which will be needed for compiling Ruby versions:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" brew install openssl autoconf
As I prefer rbenv, I recommend you install it along with ruby-build (a plugin which lets you compile and install Ruby versions with one simple command):
brew update brew install rbenv ruby-build
Now installing Ruby 2.1.0 is as simple as
rbenv install 2.1.0. To make this version your default, use the command
rbenv global 2.1.0.
pow is a zero-configuration Rack server, which means that running your local Rails applications will be made ridiculously easy. Install it with
curl get.pow.cx | sh and every time you create a new Rails application, simply symlink it to your .pow-directory:
cd ~/.pow ln -s /path/to/myapp
This will make your application available at
http://www.myapp.dev - without firing up Webrick or messing around with ports. If you make any changes to your app which require a restart, simply
touch /path/to/myapp/tmp/restart.txt and pow will restart this project's server before the next request.
xip.io runs a custom DNS server on the internet which provides wildcard DNS for any IP address. Sounds hacky but makes testing your app from different machines a breeze:
Assuming your local IP is 192.168.0.10, grab your iOS or Android device, make sure you're in your WLAN and access your application at
This even works with subdomains (
http://subdomain.192.168.0.10.xip.io) and natively joins forces with pow (see step 3), so you can prepend the URL with your application's name (
http://subdomain.myapp.192.168.0.10.xip.io), which makes testing multiple apps simultaneously very easy.