Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue [unable to proceed]

后端 未结 7 1763
盖世英雄少女心
盖世英雄少女心 2020-12-23 14:52

I appear to have a circular issue in regards to Ruby on Rails migration procedure. I am following the introduction article and I have reached the point when I need to creat

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-23 15:30

    you can do

    bundle exec rake test:prepare 
    

    In Rails 4.1+, they deprecated db:test:prepare You can now just use:

    ActiveRecord::Migration.maintain_test_schema!
    

    If you need to do it manually

    rake db:schema:load RAILS_ENV=test
    

    and then

    bundle exec rake db:migrate
    

提交回复
热议问题