rails s して ローカル表示しようとしたらこんなのがでた
error
ActiveRecord::NoEnvironmentInSchemaError:
Environment data not found in the schema. To resolve this issue,
run:bin/rails db:environment:set RAILS_ENV=development
が、rails db:environment:set RAILS_ENV=developmentすると
== 20190328182436 ChangeContextToContent: migrating ===========================
-- add_column(:posts, :content, :text)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
その下の方を見ていくと
SQLite3::SQLException: duplicate column name: content: ALTER TABLE "posts" ADD "content" text
postsテーブルにcontentカラムが存在している?
同じ定義が複数あるのではないかということらしい。
migrationファイルを見直して、なんか丸々一ついらないmigrationファイルがあったので削除、なんで。。
違う箇所にも同じような Caused by: SQLite3::SQLException: duplicate column name: content というのが出ていたし、よ〜く読んで考えるようにしよ。。