Home 使用mongoid后无法generatemigration(can'tinvolkrailsgmigration)
Post
Cancel

使用mongoid后无法generatemigration(can'tinvolkrailsgmigration)

看这里有解决方案: ( see this post:  http://stackoverflow.com/questions/6372626/using-active-record-generators-after-mongoid-installation)

$ rails g active_record:migration 

之所以会这样,是因为mongoid 一样会调用 rails g生成mongoid 需要的ORM MODEL.  ( this is caused by mongoid's ORM strategy which would generate a model for mongoid but not ActiveRecord ) 

This post is licensed under CC BY 4.0 by the author.