Fixtures Max Size? SystemStackError: stack level too deep


I have a table of zipcodes that I am using in my application, so there
are approximately 50,000 rows in this table. I have dumped the table to
a fixture yaml file to represent this data, but when I try to load it, I
get this error: SystemStackError: stack level too deep

Is there a max size allowed for a fixture file…?

Here is the --trace output:
rake db:fixtures:load --trace
** Invoke db:fixtures:load (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:fixtures:load
rake aborted!
a YAML error occured parsing test/fixtures/zipcodes.yml. Please note
that YAML must be consistently indented using spaces. Tabs are not
allowed. Please have a look at
The exact error was:
SystemStackError: stack level too deep
read_fixture_files' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/fixtures.rb:279:ininitialize’
create_fixtures' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/fixtures.rb:250:increate_fixtures’
silence' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/fixtures.rb:248:increate_fixtures’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:202:in invoke' /usr/lib/ruby/1.8/thread.rb:135:insynchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:195:in invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1719:inrun’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1719:in `run’

Any help would be greatly appreciated.
Thank you.
Donnie Jones

I’m sure its too late for you, but if anyone else has this problem, one
solution is to increase the max stacksize you’ll allow your process. If
you’re running bash, you can use ulimit like this:

check your current stack size

ulimit -s

set your current stack size

ulimit -s 16384

I doubled my stack size to 16K, and was able to load up 33K rows of
data, with about 200b of data each.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs