Eric Boehs

Configuring Pow including SSL

Jan 20, 2015

I used pow in the past and didn’t like it. I’ve given it a second chance and it seems to be working out. I’d like to give Invoker a try though but I’ll save that for another day.

Pow is a daemon that runs your rack (Rails) apps in the background when you request them at a special domain. You don’t have to start your app manually anymore (e.g. rails s). If you don’t use your app for 15 minutes it kills your app’s process to free up memory (restarting it on the next request). It doesn’t run workers (I recommend inline que workers via ActiveJob) or other daemons such as those in your Procfile. It just looks for a and (presumably) does a rackup on it. It’s very simple to set up and it’s Mac OS X only.

Install Pow

echo 'export POW_DST_PORT=3300' >> ~/.powconfig
curl | sh
cd ~/.pow
ln -s ~/Code/example_co/example_app # Or where ever your repo is

Configure SSL with tunnelss

gem install tunnelss
tunnelss 4430 3300 # Change port 3300 if you changed DST_PORT (80 is default)

Adding the SSL certificate to iOS

Note: If you’re testing remotely you will need an SSH or VPN tunnel.

Logs, restarting, pry and misc

alias devlogs='tail -f ~/Code/*/*/log/development.log' # May need to change path
touch tmp/restart.txt # Will restart on next page load

As usual, Rails handles much of the code reloading for you so you won’t have to do this with every request. Just the typical reasons you’d need to restart the server for (modifying initializers, adding gems, modifying load paths, etc).

binding.remote_pry # In your code
pry-remote # In your shell