Skip to content
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

Stack level too deep in development environment #179

Closed
scho opened this issue Jan 31, 2013 · 3 comments
Closed

Stack level too deep in development environment #179

scho opened this issue Jan 31, 2013 · 3 comments

Comments

@scho
Copy link

scho commented Jan 31, 2013

Hi folks,

I wanted to use database_cleaner in development environment in order to clear out all my seed data (I can't use rake db:reset). But I get a strange stack level too deeperror:

1.9.3p327 :001 > require 'database_cleaner'
 => true 
1.9.3p327 :002 > DatabaseCleaner.strategy = :truncation
 => :truncation 
1.9.3p327 :003 > DatabaseCleaner.clean
SystemStackError: stack level too deep
    from /home/vagrant/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/irb/workspace.rb:80
Maybe IRB bug!

The same happens in a rake task, but all works find in test environment!
I use Ubuntu Server 12.04. My version of database_cleaner is 0.9.1.

Any ideas, why this doesn't work?

cheers,
Georg

@bmabey
Copy link
Contributor

bmabey commented Jan 31, 2013

I don't have any ideas on why this is happening without looking at the stack trace. Try just using DatabaseCleaner.clean_with :truncation instead though.

@scho
Copy link
Author

scho commented Jan 31, 2013

I tried DatabaseCleaner.clean_with :truncation, but I got the same error.
The strange thing is, that the stacktrace I posted is all I get.

I'll try to investigate this better.

@scho
Copy link
Author

scho commented Jan 31, 2013

I'll close this. There is an issue with rails_sql_views, which is the following:
activewarehouse/rails_sql_views#11
database cleaner does it's job, until it calls connection.disable_referential_integrity in https://github.com/bmabey/database_cleaner/blob/master/lib/database_cleaner/active_record/truncation.rb#L244

Still strange, that this happens only in development environment.

@scho scho closed this as completed Jan 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants