Hi,
I'm using docker.
Launching puma with webpack-dev-server within foreman give me the following error:
/usr/local/bundle/gems/puma-3.8.0/lib/puma/binder.rb:269:in 'initialize': getaddrinfo: Name or service not known (SocketError)
I let all the default with a fresh install.
0) I have a docker-compose with port 3000 and 3035 open.
1) Fresh rails install rails new app
2) adding gems:
gem 'foreman'
gem 'webpacker'
3) changing hosts with 0.0.0.0 (docker specific, I think):
Procfile for rails:rails: bin/rails server -b 0.0.0.0 -p 3000webpack: bin/webpack-dev-serverwebpacker.yml for dev_server:host: 0.0.0.0public 0.0.0.0:30354) Starting the server with foreman start got following output:
https://gist.github.com/sanjibukai/bdf4094baf9ce40422ac71c0efc262e0
By default (at this moment) without giving a version for the puma gem I got puma v3.12.
I know that there are many involving parts and the problem could be many things, however I tried that exact same process just by changing the version for puma gem (gem 'puma', '3.11' for example).
I tried down to puma v3.7 which worked!
I get the following output in that case:
https://gist.github.com/sanjibukai/b765418c0a2049a45c5e4e6eed001ab7
For the reference here is the output for 3.8 (but I got errors from 3.8 to 3.12):
https://gist.github.com/sanjibukai/a1c194dcbd61cfcfcdeaab212e3d78d3
Ruby version: 2.5.1
Rails version: 5.2.1
Puma version: 3.8 -> 3.12
I had the same issue and I fixed it by adding my hostname to my hosts file in /etc/hosts. Not exactly sure _why_ that fixed it or why Puma was having an issue with it.
Basically added 127.0.0.1 workstation to my hosts file, where workstation is your host name.
I had the same issue and I fixed it by adding my hostname to my hosts file in
/etc/hosts. Not exactly sure _why_ that fixed it or why Puma was having an issue with it.Basically added
127.0.0.1 workstationto my hosts file, where workstation is your host name.
It worked.
Thank you. You made my day.
On my MacBook Pro, macOS Catalina, I did sudo vim /etc/hosts and added 127.0.0.1 localhost to this (previously empty) file. (In vim, type i to edit, then use escape to stop editing, then type :wq to write and quit.)
Most helpful comment
I had the same issue and I fixed it by adding my hostname to my hosts file in
/etc/hosts. Not exactly sure _why_ that fixed it or why Puma was having an issue with it.Basically added
127.0.0.1 workstationto my hosts file, where workstation is your host name.