Puma дает ошибку, если у меня есть элемент head в приложении Rails - PullRequest
0 голосов
/ 25 октября 2019

Я использую Ruby на рельсах 5, а для сервера Puma. Если у меня есть HTML-раздел заголовка, я получаю ошибку. Даже если заголовок тега не имеет содержимого, я получаю эту ошибку.

Ошибка:

Puma caught this error: Failed to open TCP connection to localhost:35729 (Address family not supported by protocol - socket(2) for "localhost" port 35729) (Errno::EAFNOSUPPORT)
/home/cabox/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:939:in `rescue in block in connect'
/home/cabox/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:936:in `block in connect'
/home/cabox/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'
/home/cabox/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
/home/cabox/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:935:in `connect'
/home/cabox/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
/home/cabox/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:909:in `start'
/home/cabox/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:1455:in `request'
/home/cabox/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:1435:in `send_request'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-livereload-0.3.17/lib/rack/livereload/body_processor.rb:50:in `use_vendored?'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-livereload-0.3.17/lib/rack/livereload/body_processor.rb:101:in `livereload_source'
(erb):14:in `block (2 levels) in process!'
/home/cabox/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/erb.rb:876:in `eval'
/home/cabox/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/erb.rb:876:in `result'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-livereload-0.3.17/lib/rack/livereload/body_processor.rb:78:in `block (2 levels) in process!'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/core_ext/string/output_safety.rb:235:in `gsub!'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/core_ext/string/output_safety.rb:235:in `gsub!'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-livereload-0.3.17/lib/rack/livereload/body_processor.rb:78:in `block in process!'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-livereload-0.3.17/lib/rack/livereload/body_processor.rb:76:in `each'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-livereload-0.3.17/lib/rack/livereload/body_processor.rb:76:in `process!'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-livereload-0.3.17/lib/rack/livereload.rb:28:in `_call'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-livereload-0.3.17/lib/rack/livereload.rb:14:in `call'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/actionpack-5.2.2/lib/action_dispatch/middleware/static.rb:127:in `call'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/engine.rb:524:in `call'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/lib/puma/configuration.rb:225:in `call'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/lib/puma/server.rb:658:in `handle_request'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/lib/puma/server.rb:472:in `process_client'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/lib/puma/server.rb:332:in `block in run'
/home/cabox/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/lib/puma/thread_pool.rb:133:in `block in spawn_thread'

Вот мой раздел Голова:

<!DOCTYPE html>
<html>
  <head>
    <title>Rails Boilerplate</title>
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>

    <%= stylesheet_link_tag    'application', media: 'all' %>
    <%= javascript_include_tag 'application' %>
  </head>
  ...
...