EC2にデプロイを終え、いざ、pumaを起動するために、
bundle exec puma
を実行したところ以下のエラーに遭遇しました。
ruby
1 sample git:(master) bundle exec puma 2Puma starting in single mode... 3* Version 3.7.0 (ruby 2.4.1-p111), codename: Snowy Sagebrush 4* Min threads: 5, max threads: 5 5* Environment: production 6/home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated 7/home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated 8/home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/core_ext/numeric/conversions.rb:138: warning: constant ::Fixnum is deprecated 9/home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activejob-5.0.1/lib/active_job/arguments.rb:38: warning: constant ::Fixnum is deprecated 10/home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activejob-5.0.1/lib/active_job/arguments.rb:38: warning: constant ::Bignum is deprecated 11* Listening on tcp://0.0.0.0:3000 12* Listening on unix:///var/www/rails/sample/tmp/sockets/puma.sock 13bundler: failed to load command: puma (/home/sample/.rbenv/versions/2.4.1/bin/puma) 14Errno::ENOENT: No such file or directory - connect(2) for /var/www/rails/sample/tmp/sockets/puma.sock 15 /home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.7.0/lib/puma/binder.rb:366:in `initialize' 16 /home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.7.0/lib/puma/binder.rb:366:in `new' 17 /home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.7.0/lib/puma/binder.rb:366:in `add_unix_listener' 18 /home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.7.0/lib/puma/binder.rb:141:in `block in parse' 19 /home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.7.0/lib/puma/binder.rb:88:in `each' 20 /home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.7.0/lib/puma/binder.rb:88:in `parse' 21 /home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.7.0/lib/puma/runner.rb:144:in `load_and_bind' 22 /home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.7.0/lib/puma/single.rb:87:in `run' 23 /home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.7.0/lib/puma/launcher.rb:171:in `run' 24 /home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.7.0/lib/puma/cli.rb:77:in `run' 25 /home/sample/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.7.0/bin/puma:10:in `<top (required)>' 26 /home/sample/.rbenv/versions/2.4.1/bin/puma:22:in `load' 27 /home/sample/.rbenv/versions/2.4.1/bin/puma:22:in `<top (required)>'
/config/puma.rbの設定は以下の通りです。
ruby
1threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i 2threads threads_count, threads_count 3 4# Specifies the `port` that Puma will listen on to receive requests, default is 3000. 5# 6port ENV.fetch("PORT") { 3000 } 7 8# Specifies the `environment` that Puma will run in. 9# 10environment ENV.fetch("RAILS_ENV") { "production" } 11 12# Allow puma to be restarted by `rails restart` command. 13plugin :tmp_restart 14 15app_root = File.expand_path("../..",__FILE__) 16bind "unix://#{app_root}/tmp/sockets/puma.sock" 17pidfile "#{app_root}/tmp/pids/puma.pid" 18state_path "#{app_root}/tmp/pids/puma.state" 19# daemonize true
エラーの通り、確かに、/var/www/rails/sample/tmp/socketsにpuma.sockというファイルが生成されていませんでした。
これは自分で手動で作成しなければいけないのでしょうか??
以前別のrailsアプリをデプロイした際には手動で作成した記憶がなく、何か他に問題があるのかな?とは思うのですが・・・。
お分かりになりましたら、教えて頂けると幸いです!
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。