
AWS Unicornを使ってRailsアプリケーションの動作確認
★★unicornをGemfileに追加★★
vim GemfileでGemfile編集
「i」で入力モード
developmentのとこに「gem 'unicorn'」を入力
「Escボタン」押して「:wq」と入力しEnterで保存して出れる

pwdで今触っているRailsアプリケーションのフォルダの配置場所(現在のディレクトリ)を調べる

現在のディレクトリは「/home/ec2-user~」と分かったので、
nano config/unicorn.rbでファイルを編集

bundle exec unicorn_rails -c config/unicorn.rb -E development -D
で実行
ps -ef | grep unicorn | grep -v grep
でプロセスが起動してるか確認

Unixドメインソケットを使用してアクセスする場合は、
curl --unix-socket /home/ec2-user/アプリ名/tmp/unicorn.sock http://localhost/

pkill -f "unicorn_rails master -c config/unicorn.rb -E development -D"で一旦unicorn停止ps -ef | grep unicorn | grep -v grepでプロセス確認して何も出なければ正しく停止できています。

・コンピューターはフォルダ毎に異なる権限をもっていること
・用途別にファイルやフォルダを配置する場所(フォルダ、ディレクトリ)は考えて決めないといけないこと
を前提において進めることが大切です。

Thank you!!