puma / puma-dev

A tool to manage rack apps in development with puma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Puma-Dev not working at all

antarr opened this issue · comments

I'm trying to get puma-dev working on my MacBook Pro running Mojave. Whenever I visit my app at dev.community.me I get the error ERR_NAME_NOT_RESOLVED

I followed the these steps when setting up

brew install puma/puma/puma-dev
sudo puma-dev -setup
puma-dev -install
puma-dev link -n community ~/code/myrailsapp

When I tails ~/Library/Logs/puma-dev.log all I see is

* HTTPS Server port: inherited from launchd
! Puma dev listening on http and https
! Shutdown requested
* Directory for apps: /Users/antarrbyrd/.puma-dev
* Domains: dev
* DNS Server port: 9253
* HTTP Server port: inherited from launchd
* HTTPS Server port: inherited from launchd
! Puma dev listening on http and https
! Shutdown requested

that's from when I ran puma-dev -stop

Visiting the site doesn't modify the log at all.

commented

I can see by your * Domains: dev that your install is only working for .dev domains. You can try puma-dev -install -d me instead of puma-dev -install. However, because .me is a top-level domain you may need to look into dev-tld-resolver.

A lot of people are using .test or .localhost instead of .dev now because Google owns .dev and it won't work with http in Chrome 63+ (more on that here).

puma-dev -install -d me

That fixed it, thanks

@exactchange How do I fix it so it works with .com. The app needs to support dev.community.com and test.community.com. I was able to get this working using puma-dev -install -d community.com. However, this breaks my access to staging.community.com and staging2.community.com which are actually servers in the wild.

commented

@antarr I'm pretty new with puma, but can you try puma-dev -d com -http-port YOUR_HTTP_PORT -https-port YOUR_HTTPS_PORT? For example: puma-dev -d com -http-port 80 -https-port 443. When that's running, it should say * Domains: com along with your defined ports. This means it'll work for .com domains. Leave that running, open a new tab in Terminal and go to your app directory and do bundle exec puma -p YOUR_PRODUCTION_PORT.

Of course in production these services need to be started via a Procfile or something similar. These instructions are for how to do it on your own machine.

I honestly don't know how puma will affect subdomains (if at all). I have traditionally handled subdomain redirects a higher level.

How do I fix it so it works with .com. The app needs to support dev.community.com and test.community.com. I was able to get this working using puma-dev -install -d community.com. However, this breaks my access to staging.community.com and staging2.community.com which are actually servers in the wild.

This is a far cry from the title "Puma-dev not working at all"

What you're really saying might as well be "I want to use puma dev to serve my app on google.com but when I do that it break google"

The problem was with my router. I use DD-WRT and by default, it had dnsmasq enabled. Disabling that fixed everything.