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

Migrations fail due to bitmask method call in model #8

Open
polarblau opened this issue Oct 7, 2011 · 0 comments · Fixed by joelmoss/bitmask_attributes#3
Open

Migrations fail due to bitmask method call in model #8

polarblau opened this issue Oct 7, 2011 · 0 comments · Fixed by joelmoss/bitmask_attributes#3

Comments

@polarblau
Copy link

The new repo doesn’t allow issues, so I'll post this here for reference.

As long as I have the bitmask call in my user model, my migrations will fail with

rake aborted!
Could not find table 'users'

Here's the stack trace

/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activerecord-3.1.0/lib/active_record/connection_adapters/sqlite_adapter.rb:387:in `table_structure'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activerecord-3.1.0/lib/active_record/connection_adapters/sqlite_adapter.rb:270:in `columns'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `block (2 levels) in initialize'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:185:in `with_connection'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:92:in `block in initialize'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activerecord-3.1.0/lib/active_record/base.rb:706:in `yield'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activerecord-3.1.0/lib/active_record/base.rb:706:in `default'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activerecord-3.1.0/lib/active_record/base.rb:706:in `columns'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/bitmask_attributes-0.2.2/lib/bitmask_attributes/definition.rb:29:in `validate_for'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/bitmask_attributes-0.2.2/lib/bitmask_attributes/definition.rb:12:in `install_on'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/bitmask_attributes-0.2.2/lib/bitmask_attributes.rb:13:in `bitmask'
/Users/ME/projects/GEMSET_design_service_app/app/models/user.rb:11:in `<class:User>'
/Users/ME/projects/GEMSET_design_service_app/app/models/user.rb:1:in `<top (required)>'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:456:in `load'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:456:in `block in load_file'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:455:in `load_file'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:342:in `require_or_load'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:489:in `load_missing_constant'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:181:in `block in const_missing'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:179:in `each'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:179:in `const_missing'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/inflector/methods.rb:124:in `block in constantize'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/inflector/methods.rb:123:in `each'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/inflector/methods.rb:123:in `constantize'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:528:in `block in initialize'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:550:in `yield'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:550:in `default'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:550:in `[]'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:595:in `constantize'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/devise-1.4.7/lib/devise.rb:259:in `get'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/devise-1.4.7/lib/devise/mapping.rb:103:in `to'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/devise-1.4.7/lib/devise/mapping.rb:98:in `modules'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/devise-1.4.7/lib/devise/mapping.rb:115:in `routes'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/devise-1.4.7/lib/devise/mapping.rb:84:in `initialize'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/devise-1.4.7/lib/devise.rb:289:in `new'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/devise-1.4.7/lib/devise.rb:289:in `add_mapping'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/devise-1.4.7/lib/devise/rails/routes.rb:190:in `block in devise_for'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/devise-1.4.7/lib/devise/rails/routes.rb:189:in `each'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/devise-1.4.7/lib/devise/rails/routes.rb:189:in `devise_for'
/Users/ME/projects/GEMSET_design_service_app/config/routes.rb:5:in `block in <top (required)>'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/actionpack-3.1.0/lib/action_dispatch/routing/route_set.rb:257:in `instance_exec'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/actionpack-3.1.0/lib/action_dispatch/routing/route_set.rb:257:in `eval_block'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/actionpack-3.1.0/lib/action_dispatch/routing/route_set.rb:234:in `draw'
/Users/ME/projects/GEMSET_design_service_app/config/routes.rb:1:in `<top (required)>'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `block in load'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/application/routes_reloader.rb:29:in `block in load_paths'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/application/routes_reloader.rb:29:in `each'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/application/routes_reloader.rb:29:in `load_paths'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/application/routes_reloader.rb:13:in `reload!'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/application/routes_reloader.rb:7:in `block in initialize'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/file_update_checker.rb:32:in `call'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/file_update_checker.rb:32:in `execute_if_updated'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/application/finisher.rb:63:in `block (2 levels) in <module:Finisher>'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/application/finisher.rb:64:in `call'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/application/finisher.rb:64:in `block in <module:Finisher>'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `instance_exec'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `run'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/initializable.rb:50:in `block in run_initializers'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `each'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `run_initializers'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/application.rb:92:in `initialize!'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/ME/projects/GEMSET_design_service_app/config/environment.rb:5:in `<top (required)>'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `block in require'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/application.rb:78:in `require_environment!'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/railties-3.1.0/lib/rails/application.rb:189:in `block (2 levels) in initialize_tasks'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/ME/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:174:in `each'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/Users/ME/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/bin/rake:19:in `load'
/Users/ME/.rvm/gems/ruby-1.9.2-p290@GEMSET/bin/rake:19:in `<main>'

A workaround is to comment the bitmask reference out, run the migrations, then put it back.

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

Successfully merging a pull request may close this issue.

1 participant