Open mhenrixon opened 3 years ago
Same here. Rails 6.1.1 Ruby 3.0.0p0 seed_sump 3.3.1
ActionText::RichText.create!([ {name: "content", body: #<ActionText::Content "<div class=\"trix-conte...">, record_type: "Post", record_id: 377}, {name: "content", body: #<ActionText::Content "<div class=\"trix-conte...">, record_type: "Post", record_id: 254}, {name: "content", body: #<ActionText::Content "<div class=\"trix-conte...">, record_type: "Post", record_id: 255}, {name: "content", body: #<ActionText::Content "<div class=\"trix-conte...">, record_type: "Post", record_id: 256}, {name: "content", body: #<ActionText::Content "<div class=\"trix-conte...">, record_type: "Post", record_id: 257}, ...
You can try this branch: https://github.com/Spone/seed_dump/tree/actiontext-support
It's not working with ActionText. Even if I pass the models with the data I want to export, for example:
rails db:seed:dump models=Category,City,State --trace
None of these models have has_rich_text
. It returns the error:
** Invoke db:seed:dump (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:seed:dump
bin/rails aborted!
ActiveRecord::Encryption::Errors::Configuration: Missing Active Record encryption credential: active_record_encryption.primary_key (ActiveRecord::Encryption::Errors::Configuration)
And by the way, my encryption credentials are OK. My seeds.rb file gets stuck like this:
These are the values generated from
db:seed:dump
. It seems like the ActionText::Content isn't dumped correctly.