Alex
Alex

Reputation: 81

Fail to start Rails project address incompatible with the requested protocol

I am failing to run a Rails project.

The project was developed on Mac OS and I am trying to run it on Windows 10

Getting the error:

C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/em/pure_ruby.rb:1054:in `bind': An address incompatible with the requested protocol was used. - bind(2) for [::1]:3000 (Errno::EAFNOSUPPORT)

Using:

Traceback (most recent call last):
31: from bin/rails:4:in `<main>'
30: from bin/rails:4:in `require'
29: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/commands.rb:18:in `<top (required)>'
28: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/command.rb:46:in `invoke'
27: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/command/base.rb:65:in `perform'
26: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
25: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
24: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
23: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `perform'
22: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `tap'
21: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:147:in `block in perform'
20: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:53:in `start'
19: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/server.rb:297:in `start'
18: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/handler/thin.rb:22:in `run'
17: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/thin-1.7.2/lib/thin/server.rb:162:in `start'
16: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/thin-1.7.2/lib/thin/backends/base.rb:73:in `start'
15: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/eventmachine.rb:196:in `run'
14: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/em/pure_ruby.rb:144:in `run_machine'
13: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/em/pure_ruby.rb:547:in `run'
12: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/em/pure_ruby.rb:547:in `loop'
11: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/em/pure_ruby.rb:551:in `block in run'
10: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/em/pure_ruby.rb:568:in `run_timers'
 9: from C:/Ruby25/lib/ruby/2.5.0/set.rb:774:in `each'
 8: from C:/Ruby25/lib/ruby/2.5.0/set.rb:774:in `each'
 7: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/em/pure_ruby.rb:571:in `block in run_timers'
 6: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/eventmachine.rb:1546:in `event_callback'
 5: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/thin1.7.2/lib/thin/backends/base.rb:63:in `block in start'
 4: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/thin1.7.2/lib/thin/backends/tcp_server.rb:16:in `connect'
 3: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/eventmachine.rb:532:in `start_server'
 2: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/em/pure_ruby.rb:185:in `start_tcp_server'
 1: from C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/em/pure_ruby.rb:1054:in `start_server' C:/Ruby25/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x86-mingw32/lib/em/pure_ruby.rb:1054:in `bind': An address incompatible with the requested protocol was used. - bind(2) for [::1]:3000 (Errno::EAFNOSUPPORT)

Upvotes: 0

Views: 293

Answers (1)

Alex
Alex

Reputation: 81

SOLVED: In order to run the app on windows 10 the running server has to be switched to Puma and forcing it to IPv6 

  • gem 'puma'
  • bundle
  • bundle install
  • rails s -b[::]

Upvotes: 1

Related Questions