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 3 years have passed since last update.

Herokuでpg:resetしてもErrorが消えなかったのをようやく解決した【初心者】

Posted at

よく見る記事に、Herokuでrails db:migrate:reset出来なかったら、

$ heroku login -i
$ heroku pg:reset

すればいいよ!って書かれているのですが、どうしてもundefined local variable or method `locked_at' for #<User:0x007f28a212345> Did you mean? lock_accessのエラーが治らず:sob:

そもそもpg:resetって何ぞや?と思い始めました。
結論分からなかったんですが、pgというSQLをリセットするだから、マイグレートファイルは変わっていないんじゃないか?と思いました(db:dropみたいな効果かなあと)

という訳でこれで解決しました。

どこ隠せばいいのかわかんなくてやみくもにペイントを使用(笑)
Herokuの管理画面のところからデータベースをリセットした後に、heroku run rails db:migrateheroku run rails db:seedしたら治りました~!やった~!

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?