seed_dump icon indicating copy to clipboard operation
seed_dump copied to clipboard

NoMethodError when running rake db:seed:dump

Open ldanielw1 opened this issue 9 years ago • 3 comments

When running rake db:seed:dump, I see this error: NoMethodError: undefined methodexists?' for #Array:0x007fb2754070e8`

I traced the error, and it's because when env is empty, lib/seed_dump/environment.rb points to ActiveRecord::Base.descendants as models, and those don't have a .exists? method... is there something about this error that I'm missing?

ldanielw1 avatar Aug 22 '16 01:08 ldanielw1

@ldanielw1 I'm only watching this gem so I have not installed this gem as yet. Based on the error, I feel it's a bug as Arrays in Ruby don't have exists? method, instead Arrays uses includes?. Or.. have you changed anything? Try using a new rails app and see if your code is causing some conflict.

SylarRuby avatar Aug 22 '16 09:08 SylarRuby

I haven't changed anything in the gem, it was a clean install.

ldanielw1 avatar Aug 22 '16 11:08 ldanielw1

Then I smell bug. I'll try this later and see.

SylarRuby avatar Aug 22 '16 11:08 SylarRuby