RSpec failure: could not find table after migration…?

后端 未结 3 1097
感情败类
感情败类 2021-01-30 11:12

I have a naked rails 3 app with one model, generated using rails g model User.

I\'ve added a factory (using factory_girl_rails):



        
3条回答
  •  既然无缘
    2021-01-30 11:46

    try this out:

    For rails version > 4.1+ this solution will work as the current scenario.
    
    but in Rails 4.1+, rake db:test:prepare is deprecated.
    

    try using

    rake db:migrate RAILS_ENV=test (it will work for all version of rails)
    

提交回复
热议问题