前提・実現したいこと
railsで、webアプリケーションを作っています。
新しいmodelを作るため、
rails g model Comment user_id:integer post_id:integer comment:text
rails db:migrate
を実行するとエラーが起きました。
発生している問題・エラーメッセージ
ActiveRecord::PendingMigrationError Migrations are pending. To resolve this issue, run: bin/rails db:migrate RAILS_ENV=development
該当のソースコード
Ruby
1 # Raises <tt>ActiveRecord::PendingMigrationError</tt> error if any migrations are pending. 2 def check_pending!(connection = Base.connection) 3 raise ActiveRecord::PendingMigrationError if ActiveRecord::Migrator.needs_migration?(connection) 4 end 5 6 def load_schema_if_pending!
試したこと
補足情報(FW/ツールのバージョンなど)
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/02/28 11:48