初めてAWSでデプロイをしているのですが、unicornの起動ができません。
ログを見ても解決方法がわかりません。
環境
Ruby 2.7.1
Rails 6.0.3
Unicorn 5.7.0
お力を貸していただけると嬉しいです。
$bundle exec unicorn_rails -c /var/www/rails/アプリ名l/config/unicorn.conf.rb -D -E production I, [2020-11-01T06:59:24.017597 #13245] INFO -- : Refreshing Gem list bundler: failed to load command: unicorn_rails (/home/ec2-user/.rbenv/versions/2.7.1/bin/unicorn_rails) NoMethodError: undefined method `join' for nil:NilClass /var/www/rails/smile-mail/app/models/message.rb:2:in `<class:Message>' /var/www/rails/smile-mail/app/models/message.rb:1:in `<main>' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/kernel.rb:27:in `require' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/loader.rb:392:in `const_get' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/loader.rb:392:in `block (2 levels) in eager_load' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/loader.rb:742:in `block in ls' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/loader.rb:734:in `foreach' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/loader.rb:734:in `ls' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/loader.rb:387:in `block in eager_load' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/loader.rb:376:in `synchronize' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/loader.rb:376:in `eager_load' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/loader.rb:494:in `each' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/loader.rb:494:in `eager_load_all' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/railties-6.0.3.3/lib/rails/application/finisher.rb:122:in `block in <module:Finisher>' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/railties-6.0.3.3/lib/rails/initializable.rb:32:in `instance_exec' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/railties-6.0.3.3/lib/rails/initializable.rb:32:in `run' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/railties-6.0.3.3/lib/rails/initializable.rb:61:in `block in run_initializers' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/2.7.0/tsort.rb:347:in `each' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/2.7.0/tsort.rb:347:in `call' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/railties-6.0.3.3/lib/rails/initializable.rb:60:in `run_initializers' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/railties-6.0.3.3/lib/rails/application.rb:363:in `initialize!' /var/www/rails/smile-mail/config/environment.rb:5:in `<top (required)>' config.ru:4:in `require_relative' config.ru:4:in `block in <main>' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in `instance_eval' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in `initialize' config.ru:1:in `new' config.ru:1:in `<main>' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/unicorn-5.7.0/lib/unicorn.rb:54:in `eval' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/unicorn-5.7.0/lib/unicorn.rb:54:in `block in builder' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/unicorn-5.7.0/bin/unicorn_rails:139:in `block in rails_builder' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/unicorn-5.7.0/lib/unicorn/http_server.rb:822:in `build_app!' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/unicorn-5.7.0/lib/unicorn/http_server.rb:141:in `start' /home/ec2-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/unicorn-5.7.0/bin/unicorn_rails:209:in `<top (required)>' /home/ec2-user/.rbenv/versions/2.7.1/bin/unicorn_rails:23:in `load' /home/ec2-user/.rbenv/versions/2.7.1/bin/unicorn_rails:23:in `<top (required)>'
何卒よろしくお願いいたします
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。