-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't import the seed.rb file : HABTM issues #130
Comments
I had a same issue. |
Same problem here.
|
yeah, seed_dump does not support HAS_AND_BELONGS_TO_MANY records :( |
I just ran into this. I guess I just have to do a db dump / restore huh? |
After I dumped the rails database to the seed.rb file, when I want to import the data with the command rails db:seed I get this error:
rails aborted! NameError: private constant # <Class:0x007f850e9f22a8>::HABTM_UStations referenced /Users/sven/CARGO/rails_5.1/cargo_beta/db/seeds.rb:1:in '<top (required)>' bin/rails:4:in 'require' bin/rails:4:in '<main>' Tasks: TOP => db:seed
The seed.rb file begins with these entries:
Dealer::HABTM_UStations.create!([ {ustation_id: 7, dealer_id: 2} ])
There is an issue to create the HAS_AND_BELONGS_TO_MANY records. I'm not really sure if seed_dump supports HABTM records.
The text was updated successfully, but these errors were encountered: