以下の内容はhttps://geniusium.hatenablog.com/entry/2021/02/18/205915より取得しました。


Railsのエラーと解決手順メモ

railsのエラーと解決手順のメモです。

環境

作業ログ

rails new myapp --database=postgresql をして、 rails s をするとエラーが出た;

ActiveRecord::ConnectionNotEstablished (could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
):

略

この記事通り以下のコマンドを実行したら、治ったのかはわからないが、少なくともエラーメッセージは変わった;

brew services start postgresql
brew services stop postgresql
brew services restart postgresql

もう一度 rails s をしたら、別のエラーメッセージが出た;

ActiveRecord::NoDatabaseError (FATAL:  database "deepl_helper_development" does not exist
):

略

この記事通り以下のコマンドを実行したら、エラーはもう出なくなった;

rails db:create

http://127.0.0.1:3000 にアクセスするとちゃんとrailsの初期ページが表示された。

参考

qiita.com

rails-ambassador.herokuapp.com




以上の内容はhttps://geniusium.hatenablog.com/entry/2021/02/18/205915より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14