rails s -p 3001
=> Booting Puma
=> Rails 6.1.4.4 application starting in development
=> Run `bin/rails server --help` for more startup options
Puma starting in single mode...
* Puma version: 5.6.0 (ruby 2.6.9-p207) ("Birdie's Version")
* Min threads: 5
* Max threads: 5
* Environment: development
* PID: 86165
* Listening on http://127.0.0.1:3001
* Listening on http://[::1]:3001
Exiting
/Users/kadri/.rvm/gems/ruby-2.6.9/gems/puma-5.6.0/lib/puma/launcher.rb:248:in `write': No such file or directory # rb_sysopen - /var/run/puma/my_app.sock (Errno::ENOENT)
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/puma-5.6.0/lib/puma/launcher.rb:248:in `write_pid'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/puma-5.6.0/lib/puma/launcher.rb:112:in `write_state'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/puma-5.6.0/lib/puma/single.rb:48:in `run'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/puma-5.6.0/lib/puma/launcher.rb:182:in `run'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/puma-5.6.0/lib/rack/handler/puma.rb:72:in `run'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/rack-2.2.3/lib/rack/server.rb:327:in `start'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/railties-6.1.4.4/lib/rails/commands/server/server_command.rb:39:in `start'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/railties-6.1.4.4/lib/rails/commands/server/server_command.rb:144:in `block in perform'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/railties-6.1.4.4/lib/rails/commands/server/server_command.rb:135:in `tap'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/railties-6.1.4.4/lib/rails/commands/server/server_command.rb:135:in `perform'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/railties-6.1.4.4/lib/rails/command/base.rb:69:in `perform'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/railties-6.1.4.4/lib/rails/command.rb:48:in `invoke'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/railties-6.1.4.4/lib/rails/commands.rb:18:in `<main>'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /Users/kadri/code/goconf-api/bin/rails:5:in `<top (required)>'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/spring-3.1.1/lib/spring/client/rails.rb:30:in `load'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/spring-3.1.1/lib/spring/client/rails.rb:30:in `call'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/spring-3.1.1/lib/spring/client/command.rb:7:in `call'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/spring-3.1.1/lib/spring/client.rb:30:in `run'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/spring-3.1.1/bin/spring:49:in `<top (required)>'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/spring-3.1.1/lib/spring/binstub.rb:11:in `load'
from /Users/kadri/.rvm/gems/ruby-2.6.9/gems/spring-3.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/kadri/code/goconf-api/bin/spring:10:in `require'
from /Users/kadri/code/goconf-api/bin/spring:10:in `block in <top (required)>'
from /Users/kadri/code/goconf-api/bin/spring:7:in `tap'
from /Users/kadri/code/goconf-api/bin/spring:7:in `<top (required)>'
from bin/rails:2:in `load'
from bin/rails:2:in `<main>'
It seems you have configured in your config/puma.rb file that the Puma application server should listed to a UNIX socket in /var/run/puma/my_app.sock
However, the directory /var/run/puma likely doesn't exist on your Mac (and if it doesn't you likely have no permissions to write there).
As such, you could edit your config/puma.rb file and remove the unix socket bind there or adapt it to a "normal" TCP bind. Possibly, you could also use environment variables instead depending on your actual code in that file.
Related
Here are my specs: Ruby 2.4.0, Rails 5.1.3, postgres 9.6, windows 10 running rails with Bash Ubuntu. Whenever I try running rails server it exits me, I'm at the root of the project. It wasn't happening before. Here are the gems I recently installed: boostrap-sass, devise, toastr-rails, omniauth, omniauth-facebook
rails server
=> Booting Puma
=> Rails 5.1.3 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Exiting
/home/mark/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:228:in `mkdir': File exists # dir_s_mkdir - /mnt/c/Users/xxxxx/Desktop/xxxxx/tmp/pids (Errno::EEXIST)
from /home/mark/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:228:in `fu_mkdir'
from /home/mark/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:206:in `block (2 levels) in mkdir_p'
from /home/mark/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:204:in `reverse_each'
from /home/mark/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:204:in `block in mkdir_p'
from /home/mark/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:190:in `each'
from /home/mark/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:190:in `mkdir_p'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.1.3/lib/rails/commands/server/server_command.rb:75:in `block in create_tmp_directories'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.1.3/lib/rails/commands/server/server_command.rb:74:in `each'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.1.3/lib/rails/commands/server/server_command.rb:74:in `create_tmp_directories'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.1.3/lib/rails/commands/server/server_command.rb:40:in `start'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.1.3/lib/rails/commands/server/server_command.rb:131:in `block in perform'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.1.3/lib/rails/commands/server/server_command.rb:126:in `tap'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.1.3/lib/rails/commands/server/server_command.rb:126:in `perform'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.1.3/lib/rails/command/base.rb:63:in `perform'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.1.3/lib/rails/command.rb:44:in `invoke'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.1.3/lib/rails/commands.rb:16:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Remove the folder or file /mnt/c/Users/xxxxx/Desktop/xxxxx/tmp/pids and try again?
I am attempting to set up a new Rails app and keep getting the following stack trace:
=> Booting Puma
=> Rails 5.1.0.rc1 application starting in development on http://linux-my4o:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.8.2 (ruby 2.4.0-p0), codename: Sassy Salamander
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://linux-my4o:9292
Exiting
/home/chris/.rvm/gems/ruby-2.4.0/gems/puma-3.8.2/lib/puma/binder.rb:269:in `initialize': getaddrinfo: Name or service not known (SocketError)
from /home/chris/.rvm/gems/ruby-2.4.0/gems/puma-3.8.2/lib/puma/binder.rb:269:in `new'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/puma-3.8.2/lib/puma/binder.rb:269:in `add_tcp_listener'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/puma-3.8.2/lib/puma/binder.rb:105:in `block in parse'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/puma-3.8.2/lib/puma/binder.rb:88:in `each'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/puma-3.8.2/lib/puma/binder.rb:88:in `parse'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/puma-3.8.2/lib/puma/runner.rb:144:in `load_and_bind'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/puma-3.8.2/lib/puma/single.rb:87:in `run'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/puma-3.8.2/lib/puma/launcher.rb:172:in `run'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/puma-3.8.2/lib/rack/handler/puma.rb:64:in `run'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/rack-2.0.1/lib/rack/server.rb:296:in `start'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/railties-5.1.0.rc1/lib/rails/commands/server/server_command.rb:44:in `start'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/railties-5.1.0.rc1/lib/rails/commands/server/server_command.rb:130:in `block in perform'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/railties-5.1.0.rc1/lib/rails/commands/server/server_command.rb:125:in `tap'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/railties-5.1.0.rc1/lib/rails/commands/server/server_command.rb:125:in `perform'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/railties-5.1.0.rc1/lib/rails/command/base.rb:63:in `perform'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/railties-5.1.0.rc1/lib/rails/command.rb:44:in `invoke'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/railties-5.1.0.rc1/lib/rails/commands.rb:16:in `<top (required)>'
from /home/chris/Projects/cwatsondev-api/bin/rails:9:in `require'
from /home/chris/Projects/cwatsondev-api/bin/rails:9:in `<top (required)>'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/spring-2.0.1/lib/spring/client/rails.rb:28:in `load'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/spring-2.0.1/lib/spring/client/rails.rb:28:in `call'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/spring-2.0.1/lib/spring/client/command.rb:7:in `call'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/spring-2.0.1/lib/spring/client.rb:30:in `run'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/spring-2.0.1/bin/spring:49:in `<top (required)>'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/spring-2.0.1/lib/spring/binstub.rb:31:in `load'
from /home/chris/.rvm/gems/ruby-2.4.0/gems/spring-2.0.1/lib/spring/binstub.rb:31:in `<top (required)>'
from /home/chris/Projects/cwatsondev-api/bin/spring:15:in `require'
from /home/chris/Projects/cwatsondev-api/bin/spring:15:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I've never seen an error like this when running a rails server before. I'm using Rails 5.1.0.rc1 on OpenSuse Tumbleweed. It looks to me like it's having an issue with the hostname linux-my4o.
I figured it out. Just had to add a new line to my etc/hosts file.
127.0.0.1 linux-my4o
I fixed mine by adding the following lines to my environment variables. For linux i added the following line
export HOST="localhost"
if this does not work especially because rails is complaining that the HOST envvar will be depreciated, use this instead
export BINDING="localhost"
I'm really new to ruby and rails and I was trying to follow the odin project's installfest but couldn't seem to get past thru the install phase. I tried running rails server but it keeps exiting and giving me this error. Can anyone help? Thank you very much.
=> Booting Puma
=> Rails 5.0.2 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.8.2 (ruby 2.3.3-p222), codename: Sassy Salamander
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Exiting
/Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/puma-3.8.2/lib/puma/binder.rb:249:in `gethostbyname': getaddrinfo: nodename nor servname provided, or not known (SocketError)
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/puma-3.8.2/lib/puma/binder.rb:249:in `localhost_addresses'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/puma-3.8.2/lib/puma/binder.rb:262:in `add_tcp_listener'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/puma-3.8.2/lib/puma/binder.rb:105:in `block in parse'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/puma-3.8.2/lib/puma/binder.rb:88:in `each'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/puma-3.8.2/lib/puma/binder.rb:88:in `parse'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/puma-3.8.2/lib/puma/runner.rb:144:in `load_and_bind'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/puma-3.8.2/lib/puma/single.rb:87:in `run'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/puma-3.8.2/lib/puma/launcher.rb:172:in `run'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/puma-3.8.2/lib/rack/handler/puma.rb:64:in `run'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/rack-2.0.1/lib/rack/server.rb:296:in `start'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/railties-5.0.2/lib/rails/commands/server.rb:79:in `start'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:90:in `block in server'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `server'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
from /Users/macbookpro/railsbridge/test_app/bin/rails:9:in `require'
from /Users/macbookpro/railsbridge/test_app/bin/rails:9:in `<top (required)>'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/client/rails.rb:28:in `load'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/client/rails.rb:28:in `call'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/client/command.rb:7:in `call'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/client.rb:30:in `run'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/bin/spring:49:in `<top (required)>'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/binstub.rb:31:in `load'
from /Users/macbookpro/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/binstub.rb:31:in `<top (required)>'
from /Users/macbookpro/railsbridge/test_app/bin/spring:15:in `require'
from /Users/macbookpro/railsbridge/test_app/bin/spring:15:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
you can try to delete server.pid that is in tmp/pids path. it is probably you have already started the server in another terminal tab or window.
So I've been running this rails server for about a month now and after rebooting the computer (I was trying to add global environment variables on my mac) the server now kicks out this error when I run "rails s". I've made sure that both localhost and the virtual domain are pointing to 127.0.0.1 as well. As I said, before rebooting, this was working fine, but afterwards is when the error popped up.
=> Booting Unicorn
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn- 4.8.3/lib/unicorn/configurator.rb:604:in `pack_sockaddr_in': getaddrinfo: nodename nor servname provided, or not known (SocketError)
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:604:in `canonicalize_tcp'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:590:in `expand_addr'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:236:in `listen'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:809:in `block in bind_new_listeners!'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:809:in `each'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:809:in `bind_new_listeners!'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:138:in `start'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-rails-2.2.0/lib/unicorn_rails.rb:33:in `run'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/server.rb:286:in `start'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/chris/bbplm/bin/rails:8:in `require'
from /Users/chris/bbplm/bin/rails:8:in `<top (required)>'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-1.2.0/lib/spring/client/rails.rb:27:in `load'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-1.2.0/lib/spring/client/rails.rb:27:in `call'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-1.2.0/lib/spring/client/command.rb:7:in `call'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-1.2.0/lib/spring/client.rb:26:in `run'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-1.2.0/bin/spring:48:in `<top (required)>'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-1.2.0/lib/spring/binstub.rb:11:in `load'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-1.2.0/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/chris/bbplm/bin/spring:16:in `require'
from /Users/chris/bbplm/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
After removing spring from the gemfile, I bundle installed and tried re-running the server. This is the error I received.
=> Booting Unicorn
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:604:in `pack_sockaddr_in': getaddrinfo: nodename nor servname provided, or not known (SocketError)
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:604:in `canonicalize_tcp'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:590:in `expand_addr'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:236:in `listen'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:809:in `block in bind_new_listeners!'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:809:in `each'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:809:in `bind_new_listeners!'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:138:in `start'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/unicorn-rails-2.2.0/lib/unicorn_rails.rb:33:in `run'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/server.rb:286:in `start'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/chris/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:8:in `require'
from bin/rails:8:in `<main>'
check etc/hostshas 127.0.0.1 localhost
This was my issue, although where and how it went i have no idea!
here's the error I get:
iMac:raddit Keith$ rails s
=> Booting WEBrick
=> Rails 4.2.3 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2015-07-09 10:35:43] INFO WEBrick 1.3.1
[2015-07-09 10:35:43] INFO ruby 2.2.2 (2015-04-13) [x86_64-darwin14]
Exiting
/Users/Keith/.rbenv/versions/2.2.2/lib/ruby/2.2.0/socket.rb:232:in `getaddrinfo': getaddrinfo: nodename nor servname provided, or not known (SocketError)
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/2.2.0/socket.rb:232:in `foreach'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/2.2.0/socket.rb:459:in `tcp_server_sockets'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/utils.rb:70:in `create_listeners'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:133:in `listen'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:114:in `initialize'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:45:in `initialize'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:31:in `new'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:31:in `run'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:286:in `start'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/server.rb:80:in `start'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/Keith/Documents/0Coding/Rails/raddit/bin/rails:8:in `require'
from /Users/Keith/Documents/0Coding/Rails/raddit/bin/rails:8:in `<top (required)>'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/client/rails.rb:28:in `load'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/client/rails.rb:28:in `call'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/client/command.rb:7:in `call'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/client.rb:26:in `run'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/bin/spring:48:in `<top (required)>'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `load'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/Keith/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/Keith/Documents/0Coding/rails/raddit/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I have tried updating all gems, rails, ruby, specific gems listed here (spring, railties, etc), i bundle installed, rake db:migrate.. I'm not too adept at rails, so any help is appreciated.
Thanks!
++kb
Check your /etc/hosts file, it's default configuration for 'localhost' needs to be -
if not try with this.
127.0.0.1 localhost