Help us understand the problem. What is going on with this article?

We're sorry, but something went wrong.

We're sorry, but something went wrong.

image.png

このエラーはサーバーのエラーが多いのでエラーコードを見にいきましょう。
まず、サーバーにログインしましょう。
スクリーンショット 2020-02-20 11.34.30.png

実行してるフォルダにいきましょう

 cd /var/www/レポジトリ名/

ls コマンドで中身をみてみましょう。

[ec2-user@ip-000-00-00-000 レポジトリ名]$ ls
Gemfile  Gemfile.lock  README.md  Rakefile  app  bin  config  config.ru  current  db  lib  log  package.json  public  releases  repo  revisions.log  shared  storage  test  tmp  vendor

この中にあるcurrentを参照します。

[ec2-user@ip-000-00-00-000 レポジトリ名]$ cd current
[ec2-user@ip-000-00-00-000 current]$

こうなればOK!
また中身をみていきましょう。

[ec2-user@ip-000-00-00-000 current]$ ls
Capfile  Gemfile  Gemfile.lock  README.md  REVISION  Rakefile  app  assets_manifest_backup  bin  config  config.ru  db  lib  log  package.json  public  spec  storage  test  tmp  vendor

次は logをみていきましょう!

[ec2-user@ip-000-00-00-000 current]$ cd log

次はlogの中をみましょう

[ec2-user@ip-172-31-38-129 log]$ ls
production.log  show  unicorn.stderr.log  unicorn.stdout.log

この中にある、'production.log''unicorn.stderr.log'を'less'で参照しましょう

[ec2-user@ip-172-31-38-129 log]$ less production.log
[ec2-user@ip-172-31-38-129 log]$ less unicorn.stderr.log

で中を見てエラーコードをみましょう!

今回はDB内のエラーでviewが表示できなくて起こったエラーでした。
本番環境DBの中を削除する方法
https://qiita.com/QgqKZmHUkJv26pG/items/654c68e090db58c01964

以前はこのエラーでした。
https://qiita.com/QgqKZmHUkJv26pG/items/6f1bf5ec3e1a7c7f3b9d

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした