Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Circular reference #2

pvencill opened this Issue Aug 30, 2011 · 16 comments


None yet
4 participants

The described syntaxes do not work. With the structure:


I get a circular reference error when running rake db:seed

which states that

Tasks: TOP => db:seed => db:seed:common => db:seed:original

running rake db:seed:users works as advertised.


james2m commented Aug 30, 2011

Can you give me a gist of your Gemfile.lock, and the error and the rake version?

Sure. Gemfile.lock is here: https://gist.github.com/1180687

Error is here: https://gist.github.com/1180690

Rake is 0.9.2


I have the same problem.


james2m commented Nov 14, 2011

Hi rubyconvict,

Could you give me versions and Gemfile.lock. I haven't been able to reproduce it yet.


Rails 3.0.5
Rake 0.8.7


james2m commented Nov 21, 2011

@rubyconvict & @pvencill I'm still struggling to reproduce this. Can you both give me ruby version, your Gemfile and Rubygems version and the output from

$ rake -P
$ rake -vn db:seed


I gave you mine in gists above.

styx commented Jul 16, 2012

Same here.

$ rake db:seed
rake aborted!
Circular dependency detected: TOP => db:seed => db:seed:common => db:seed:original => db:seed:common

james2m commented Jul 16, 2012

@styx Can you give me your Gemfile.lock exact ruby and rake versions and a zip up of your seeds file. I've never had enough information to re-create this so anything that'll help me reproduce it would be great.


styx commented Jul 16, 2012

Sorry, but I can't provide a full state. Check out archive for details.

styx commented Jul 19, 2012

@james2m did that files helped you any way? I'd wish to remove them from my dropbox.


james2m commented Jul 19, 2012

@styx Thanks. I still can't reproduce the issue. I'm going to refactor the way some of the code related to the issue works. I don't need these files any more. Would you be prepared to test the refactored code when I push it?

styx commented Jul 20, 2012

Yep, I'll test it. Thanks for your work.


james2m commented Jul 23, 2012

@pvencill @rubyconvict @styx I've worked out what causes this. In your environments Rails is loading the seed tasks twice. I've re-factored the code to stop this happening. Would you mind testing this in your applications as I cannot reproduce it except in the test suite. By using the branch with the fix on it in your Gemfile;

gem 'seedbank', :git => 'git://github.com/james2m/seedbank.git', :branch => 'refactor-dsl'


@james2m james2m closed this in dc4f365 Jul 24, 2012

styx commented Sep 6, 2012

Check out Mikhail's photos on Facebook.

If you sign up for Facebook, you'll be able to stay connected with friends by seeing their photos and videos, staying up to date with their latest status updates, exchanging messages and more.

Join Mikhail on Facebook

Already have an account? Add this email address to your account:

This message was sent to reply@reply.github.com. If you don't want to receive these emails from Facebook in the future, please follow the link below to unsubscribe.
Facebook, Inc. Attention: Department 415 P.O Box 10005 Palo Alto CA 94303

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment