As others mentioned before, rails db:seed
is a built-in feature backed by ActiveRecord
. Assuming you are using neo4jrb without ActiveRecord
, you won't be able to use this command to seed database any more.
However, you can use seedbank gem to recover this ability.
It does not depend on ActiveRecord
like seed_fu
and other seeding gems do. So it will work just fine with neo4jrb.
The process is rather simple.
- put seedbank in your Gemfile and bundle install.
- create directory
db/seeds/
- create a seeds file under the
db/seeds/
directory
for example
#db/seeds/show.seeds.rb
Show.create(name: "Better Call Saul", producer: "Vince Gilligan")
- run rake db:seed:show