0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【自分用】Webアプリ開発記録

Last updated at Posted at 2023-04-29

ローカル環境にRuby、Railsをインストール
horror_review_app生成
DBを変更 rails db:system:change --to=postgresql
githubにpush
gemfile書き足し
ブランチ作成、移動
テスト失敗DB作成失敗
brew services restart postgresqlの後にrails db:createでDBを作成し、 rails testで出来た
参考:https://qiita.com/tamakiiii/items/ef4bc9c1aa10cdcd5b6b
aboutページとそれのテスト作成
vscode拡張機能追加

rails testが失敗するように
原因はpostgresql
postmaster.pidを削除することで再び動くようになった
解決に役立ったもの(https://techracho.bpsinc.jp/hachi8833/2017_12_21/48661)
(https://hacknote.jp/archives/30385/)

railsチュートリアルを復習しながら進める

本番環境renderにデプロイするときに発生したエラーと解決法
https://qiita.com/sajiki09/items/e25bba9b716865203ba5
bundle lock --add-platform x86_64-linux

ActiveRecord::Fixture::FixtureErrorが発生したとき
.ymlを修正した
https://teratail.com/questions/135301

ActiveRecord::ConnectionNotEstablished: could not translate host name "dpg-cibstjt9aq03rjh34d9g-a" to address: Name or service not known
PG::ConnectionBad: could not translate host name "" to address: Name or service not known
原因:アプリとデータベースのregionが異なっていた
https://community.render.com/t/where-does-render-get-the-host-name-from/3560

ページネートの表示件数変更
https://qiita.com/chocode/items/57852db2eb6a1ed5e973

カラムの変更、修正、追加
https://qiita.com/iverson3kobe0824/items/6dfce930d57dcc5dd482

レビュー投稿時に
ActionController::ParameterMissing (param is missing or the value is emptyエラー
params.requireを削除したら解消された

Unpermitted parameters: :_method, :authenticity_token, :movie_review, :commit, :id. Context:
レビューの編集機能実装中に発生したエラー
def movie_review_params
params.require(:movie_review).permit(:content, :rating)
end
params.requireを設定したら解消された

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?