Not working at all on macOS 10.14.5
juni0r opened this issue · comments
Puma-dev is not working at all on macOS Mojave. I did
brew install puma/puma/puma-dev
sudo puma-dev -setup
puma-dev -install
puma-dev link -n myproject ~/andreas/Projects/myproject
The app has puma gem installed as a dependency, puma-dev
process is running, but myproject.dev
will neither load in Chrome nor Safari (Site can't be reached).
tail on ~/Library/Logs/puma-dev.log
gives me
* Directory for apps: /Users/andreas/.puma-dev
* Domains: test
* DNS Server port: 9253
* HTTP Server port: inherited from launchd
* HTTPS Server port: inherited from launchd
! Puma dev listening on http and https
When I do curl -H "Host: puma-dev" localhost/status
as suggested in the docs, it gives
curl: (7) Failed to connect to localhost port 80: Connection refused
Any help for troubleshooting appreciated!
+1
@juni0r here's what I did to finally fix the issue:
puma-dev -uninstall
sudo puma-dev -setup
sudo puma-dev -cleanup
puma-dev -install
Everything should come back to normal after.
I think what was most important was this line:
sudo puma-dev -cleanup
Hope it helps.
LP
Thanks @lpdahito! That did the trick.
Also, since I had Pow installed previously I needed to remove a few config files according to Andi Croll's post Clean up broken .dev domains.
$ puma-del -install
* Use '/usr/local/Cellar/puma-dev/0.12/bin/puma-dev' as the location of puma-dev * Installed puma-dev on ports: http 80, https 443
responds "OK" but it didn't work.
I've changed ownership log file.
$ sudo chown user_name ~/Library/Logs/puam-dev.log
and then it works!
$ sudo lsof -I :80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME launchd 1 root 39u IPv4 0xXXXXXXXX 0t0 TCP *:http (LISTEN) ..... puma-dev 815 user_name 5u IPv4 0xXXXXXXXX 0t0 TCP *:http (LISTEN) puma-dev 815 user_name 6u IPv4 0xXXXXXXXX 0t0 TCP *:http (LISTEN)
$ tail -f ~/Library/Logs/puma-dev.log
... * HTTP Server port: inherited from launchd * HTTPS Server port: inherited from launchd ! Puma dev listening on http and https ! Booting app 'appname' on socket /Users/user_name/.puma-dev/appname/tmp/puma-dev-815.sock appname[982]: Puma starting in single mode... appname[982]: * Version 3.7.1 (ruby 2.3.4-p301), codename: Snowy Sagebrush appname[982]: * Min threads: 0, max threads: 5 appname[982]: * Environment: development appname[982]: DEPRECATION WARNING: alias_method_chain is deprecated. Please, use ... ... appname[982]: * Listening on unix:/Users/user_name/.puma-dev/appname/tmp/puma-dev-815.sock appname[982]: Use Ctrl-C to stop ! App 'appname' booted
This doesn't look like a puma-dev bug, and more something wack that MacOS is doing when you upgrade. Please LMK if I'm wrong.
👋 Hi, just to let people know that I somehow ended up with the same issue, the wrong permissions on the log file that prevented puma-dev to run but without any useful error messages about it. It was done on a clean Catalina install, so not an upgrade issue.
It might be worth adding this in a troubleshooting section or somewhere else in the readme; had I not found this issue I probably would still have been looking.
Fair to say that a number of GitHub issues are, in their own right, documentation. I wish GitHub supported something like "Accepted Answer" a la Stack Overflow. I'm considering making a solved
label to call attention to closed issues.
$
puma-del -install
- Use '/usr/local/Cellar/puma-dev/0.12/bin/puma-dev' as the location of puma-dev
- Installed puma-dev on ports: http 80, https 443
responds "OK" but it didn't work. I've changed ownership log file. $sudo chown user_name ~/Library/Logs/puam-dev.log
and then it works! $sudo lsof -I :80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
launchd 1 root 39u IPv4 0xXXXXXXXX 0t0 TCP *:http (LISTEN)
.....
puma-dev 815 user_name 5u IPv4 0xXXXXXXXX 0t0 TCP *:http (LISTEN)
puma-dev 815 user_name 6u IPv4 0xXXXXXXXX 0t0 TCP *:http (LISTEN)
$tail -f ~/Library/Logs/puma-dev.log
...
- HTTP Server port: inherited from launchd
- HTTPS Server port: inherited from launchd
! Puma dev listening on http and https
! Booting app 'appname' on socket /Users/user_name/.puma-dev/appname/tmp/puma-dev-815.sock
appname[982]: Puma starting in single mode...
appname[982]: * Version 3.7.1 (ruby 2.3.4-p301), codename: Snowy Sagebrush
appname[982]: * Min threads: 0, max threads: 5
appname[982]: * Environment: development
appname[982]: DEPRECATION WARNING: alias_method_chain is deprecated. Please, use ...
...
appname[982]: * Listening on unix:/Users/user_name/.puma-dev/appname/tmp/puma-dev-815.sock
appname[982]: Use Ctrl-C to stop
! App 'appname' booted
THIS did the trick for me!!
sudo chown [username] ~/Library/Logs/puma-dev.log