Ruby on Rails 5のAPIモードで作成したアプリケーションをUnicorn + nginxでデプロイしようと考えております。
以下の参考サイトを見て、同じ手順を踏みましたが、404 Not Foundが表示されてしまいます。
http://qiita.com/naoki_mochizuki/items/5a1757d222806cbe0cd1
エラーが出てないか、log/nginx.error.logを確認したところ、
connect() to unix:/home/*********/tmp/sockets/.unicorn.sock failed (2: No such file or directory) while connecting to upstream,
と出てました。
この .unicorn.sock とは、何か、
また、どうやって作るのか、教えてください。
【追記】
unicornが起動していなかったみたいです。
unicorn_rails -c /home/ubuntu/(アプリの名前)/config/unicorn.conf.rb -D -E production
とコマンドをうって起動させようとしましたが、今度は
master failed to start, check stderr log for details
とでました。
log/unicorn.logには以下のようなメッセージが出ていました。
/home/ubuntu/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:317:in `check_for_activated_spec!': You have already activated rack 2.0.3, but your Gemfile requires rack 2.0.1. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。