Switching to Puma-dev from Pow for a macOS Rails Environment

Last week, I posted my notes on dropping MAMP in favor of a native environment for my local web development setup. Since I run Rails apps on my local machine, I covered the process for making Apache and pow work side by side.

Well, of course things change. And pretty fast.

That change is the removal of pow and the installation of Puma-dev, a more recent and better maintained Rack server for Rails. Puma-dev even self-describes as, “the emotional successor to pow.” Who am I to argue with that?

Below are my field notes on making the switch. All in all, it was a painless process. The biggest advantage to Puma-dev I’ve noticed so far is its SSL support, getting around the annoying Chrome .dev https issue.

Switching from pow to Puma-dev on macOS

Remove pow

curl get.pow.cx/uninstall.sh | sh

Install Puma-dev

brew install puma/puma/puma-dev

Verify it’s installed

which puma-dev

Setup and configure Puma-dev

sudo puma-dev -setup

Add SSL certificate to appropriate location

security add-trusted-cert -k login.keychain-db ~/Library/Application\ Support/io.puma.dev/cert.pem

Create Puma-dev application directory

mkdir -p ~/.puma-dev

Link your application(s) in the new Puma-dev directory

ln -s /your/app/path

Or, with a dev domain different from the application’s name:

ln -s /your/app/path customdomain

Start Puma-dev

puma-dev

Configure Puma-dev for Apache (optional)

puma-dev -install -install-port 9280 -install-https-port 9283

Open your application in the browser

http://rails-app.dev

https://rails-app.dev

Or, if you have Apache running:

http://rails-app.dev:9280

https://rails-app.dev:9283

If Puma-dev fails to run in the background

launchctl load /Users/[your_username]/Library/LaunchAgents/io.puma.dev.plist

See more posts