Problem: I want to migrate minter state from a minter statefile to the database, but keep getting errors like:
NoMethodError (private method `select' called for nil:NilClass):
and
NoMethodError (method `update_attributes' called for nil:NilClass):
Solution: Generate a new seed and then migrate the minter state to the database
-
manually delete the invalid seed
psql -U dbuser -W -h dbhost -c 'delete from minter_states;' dbname
-
generate a new seed
RAILS_ENV=staging bundle exec rails generate active_fedora:noid:seed
-
migrate the minter state from a file to the database
RAILS_ENV=staging bundle exec rake active_fedora:noid:migrate_file_to_database