#553 ✓wontfix
Betelgeuse

Unable to name column "file" - clashes with rake methods

Reported by Betelgeuse | November 23rd, 2009 @ 12:48 PM

betelgeuse@mac ~/project $ rake --trace db:migrate
(in /Users/betelgeuse/project)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `empty?' for :null:Symbol
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1687:in `define_task'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:722:in `define_task'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:847:in `file'
/Users/betelgeuse/project/app/models/model.rb:9
/Library/Ruby/Gems/1.8/gems/hobofields-0.9.0/lib/hobo_fields/fields_declaration.rb:15:in `instance_eval'
/Library/Ruby/Gems/1.8/gems/hobofields-0.9.0/lib/hobo_fields/fields_declaration.rb:15:in `fields'
/Users/betelgeuse/project/app/models/model.rb:7
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:380:in `load_file'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:379:in `load_file'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:259:in `require_or_load'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:425:in `load_missing_constant'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:92:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:98:in `send'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:98:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:2204:in `compute_type'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:2200:in `compute_type'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/reflection.rb:156:in `send'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/reflection.rb:156:in `klass_without_create_polymorphic_class'
/Library/Ruby/Gems/1.8/gems/hobo-0.9.0/lib/active_record/association_reflection.rb:15:in `klass'

Basically from inside the fields block the code goes to a rake function for some reason.

Comments and changes to this ticket

  • Matt Jones

    Matt Jones November 25th, 2009 @ 02:42 AM

    • State changed from “new” to “open”

    This is a known issue with Rake and AR attributes:

    http://groups.google.com/group/rubyonrails-talk/browse_frm/thread/7...

    Not sure what we can do about this, as the offending includes are part of Rake (lib/rake.rb, at the end).

  • Bryan Larsen

    Bryan Larsen December 1st, 2009 @ 11:43 PM

    • State changed from “open” to “wontfix”

    There should be a category "wish we could fix it but we can't"

  • Betelgeuse

    Betelgeuse December 19th, 2009 @ 10:59 AM

    I don't know if this has since been fixed or not but seems that with hobo 1.0 RC2 and rails 2.3.5 I can't reproduce this any more. Maybe they did something in rake/rails in the meanwhile.

    betelgeuse@pena ~/hobo/fields-name-clash $ rake db:migrate
    (in /home/betelgeuse/hobo/fields-name-clash) == HoboMigration3: migrating ================================================= -- rename_column(:my_models, :filea, :file) -> 0.0079s == HoboMigration3: migrated (0.0080s) ======================================== betelgeuse@pena ~/hobo/fields-name-clash $ rake db:migrate
    (in /home/betelgeuse/hobo/fields-name-clash) == HoboMigration4: migrating ================================================= -- change_column(:my_models, :file, :string, {:null=>false, :limit=>255}) -> 0.0077s == HoboMigration4: migrated (0.0077s) ========================================

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