Accidental Technologist

Musings about Entrepreneurship, Technology and Software Development

  • Home
  • About
  • Still River Software
  • Privacy Policy

Powered by Genesis

Fixing Your Puma-dev SSL Problems on Google Chrome

February 2, 2018 by Rob Bazinet Leave a Comment

Tweet

Ruby on Rails developers have it made in many ways. We rely on and take advantage of great software created by the community. Puma-dev is just one of those great pieces of software.

Puma-dev has some nice improvements over Pow, which Basecamp had promoted for years but has seemed to stop development.

Puma-dev allows developers to better mirror their local development environment to that of production. Prior to Puma-dev or Pow, developer would have to access their Ruby on Rails applications with something like localhost:3000 in their browsers. It works but having a real URL to visit, like mygreatapp.dev is better.

This worked well until a recent update to Google’s Chrome browser:

A lot of (web) developers use a local.dev TLD for their own development. Either by adding records to their/etc/hosts file or by using a system like Laravel Valet, which runs a dnsmasq service on your system to translate *.dev to 127.0.0.1.

In those cases, if you browse to http://site.dev, you’ll be redirect to https://site.dev, the HTTPS variant.

That means your local development machine needs to;

  • Be able to serve HTTPs
  • Have self-signed certificates in place to handle that
  • Have that self-signed certificate added to your local trust store (you can’t dismiss self-signed certificates with HSTS, they need to be ‘trusted’ by your computer)

I’ve faced this myself and Chrome refuses to serve the site, only showing security errors.

When trying to fix this problem I search a lot around the web and came up with very little. There were plenty of acknowledgements that since .dev is now a top-level domain (TLD) and Chrome 63 treats it as such and forces SSL, it looked like moving away from .dev would be needed.

This was my assumption until I discovered a recent post from Barry Woolgar of Storm demonstrating setting up Puma-dev. He addresses troubleshooting .dev TLD issues specifically:

If your browser complains about an untrusted root certificate, please do the following:

  1. Open Keychain Access
  2. Click the login keychain in the left pane, then find the Puma-dev CA certificate in the right pane
  3. Double-click it and expand the Trust section, and make sure it says Always Trust
  4. Drag it into the System keychain in the left pane
  5. Restart your computer
  6. Try https://my-project.dev again!

Although I didn’t need to restart my Mac, this worked perfectly! I can now serve .dev domains in Chrome and latest Firefox.

Share this:

  • LinkedIn
  • Twitter
  • Facebook
  • Email
  • More
  • Pinterest
  • Tumblr
  • Pocket
  • Reddit

Filed Under: Ruby on Rails Tagged With: Chrome, Firefox, Puma-dev, Ruby on Rails

Recent Posts

  • Overcoming the Mimemagic Fiasco
  • Redis::CommandError – MISCONF Redis is configured to save RDB snapshots
  • frozen_string_literal: the not so magical comment
  • Status Bar in iTerm2
  • Supporting Multiple SSH Keys on macOS

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet
@rbazinet

  • Apple’s trade-in program is a joke. I’ve heard multiple people saying their value lowered for made up reasons - https://t.co/bZK4rqvUpW
    about 13 hours ago
  • I didn’t realize so many Pragmatic Programers titles were available to read online - https://t.co/OrLr01QCip
    about 3 days ago
  • Starts Monday. https://t.co/BkmcjnMRZS
    about 5 days ago
  • This years @railsconf line up of talks looks so good this year - https://t.co/eOwq9qlxs4. I wish it was in-person t… https://t.co/nt7nxV35OH
    about 1 week ago
  • RSS - Posts
  • RSS - Comments
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.