#399 ✓resolved
Bryan Larsen

big_integer fails migration

Reported by Bryan Larsen | April 6th, 2009 @ 06:23 PM | in Hobo 1.0 - Final

If you try and add a big_integer to your fields definition:

$ script/generate hobo_migration
uninitialized constant String::COLUMN_TYPE

I hacked a rescue clause into the migration to get this backtrace: /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:102:in const_missing_before_generators' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails_generator/lookup.rb:15:inconst_missing' /home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/field_spec.rb:28:in sql_type' /home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/field_spec.rb:54:insame_type?' /home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/field_spec.rb:65:in different_to?' /home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:249:inchange_table' /home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:245:in each' /home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:245:inchange_table' /home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:178:in generate' /home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:174:ineach' /home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:174:in generate' /home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/rails_generators/hobo_migration/hobo_migration_generator.rb:34:inmanifest' /usr/lib/ruby/1.8/delegate.rb:300:in __send__' /usr/lib/ruby/1.8/delegate.rb:300:inmanifest' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails_generator/commands.rb:42:in invoke!' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails_generator/scripts/../scripts.rb:31:inrun' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/generate.rb:6 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' script/generate:3

I hacked this into fix_native_types:

  types[:big_integer] = types[:decimal]

but I'm fairly sure that's wrong.

Perhaps big_integer is supposed to be a Bignum instead of BigDecimal?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages