Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 1.36 KB

README_PUMA_DEV_INSTALL.md

File metadata and controls

18 lines (15 loc) · 1.36 KB

Install puma-dev for a local development environment

Puma-dev provides an SSL and domain name for the local environment, making it more like production.

Linux & MacOS instructions

  • Stop your local rails server, if it's running
  • Run brew install puma/puma/puma-dev
  • Check OS specific further installation and setup.
    • On MacOS, it's very simple
      • sudo puma-dev -setup
      • puma-dev -install
    • Linux is a bit more involved, but not too.
      • It seems to be worth setting up a systemd service to run it in the background.
  • Run puma-dev link -n mushroomobserver ~/path-to-your-local-mushroom-observer-repo-folder. This simply sets up a symlink from your new ~/.puma-dev directory, to your directory for MO. Puma-dev will resolve any symlinks in that directory, using the name of the link as a domain. The first arg ("mushroomobserver") means it will resolve URLs at that domain, plus puma-dev's default TLD ("test"), to the given directory: it will serve MO (with or without SSL) at that address. (With further configuration, we could have it refuse or re-route non HTTPS requests, for testing.)
  • Restart your machine
  • Start rails s as you normally would
  • In another window, run ping mushroomobserver.test. You should get responses every second.