1

在以前的应用程序中,当我们使用seed_dumper&rake db:seed:dump填充种子文件的每个人都需要相同的数据库数据时,然后rake db:seed.

对于这个应用程序,使用 Comfortable Mexican Sofa CMS gem 和 fortress 插件做同样的事情会很好。只有 seed_dumper 只会转储用户 - 仅此而已。

seed_dump(“父”宝石)给出以下错误:

rake aborted!
NameError: undefined local variable or method `cms_manageable' for Comfy::Cms::Page(Table doesn't exist):Class
/usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/activerecord-4.0.0/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
/path to my app/app/models/comfy/cms/page.rb:9:in `<class:Page>'

任何想法或替代方法将不胜感激。干杯。

4

1 回答 1

0

现在仅使用gem 'seed_dump'(not seed_dumper),运行该命令bundle exec rake db:seed:dump可用于导出种子数据。

于 2014-05-05T09:49:26.223 回答