Actions
Bug #4536
closedfix cache Rake task: undefined method `[]=' for #<Class:0x000000071ff110>
Description
When running foreman-rake db:migrate on a clean install (EL6, PostgreSQL), it runs all through the migrations and throws an error from the fix_cache rake task:
undefined method `[]=' for #<Class:0x00000007951e90> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/dynamic_matchers.rb:55:in `method_missing' /usr/share/foreman/app/services/cache_manager.rb:21:in `recache!' /usr/share/foreman/lib/tasks/fix_cache.rake:4:in `block in <top (required)>' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke' /usr/share/foreman/db/migrate/20140219183345_add_taxonomy_searches_to_filter.rb:14:in `block in up'
Also when re-running `foreman-rake fix_db_cache`, I'm getting:
Validation failed: Default is not included in the list /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:56:in `save!' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:33:in `save!' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `block in save!' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `save!' /usr/share/foreman/app/models/setting.rb:64:in `[]=' /usr/share/foreman/app/services/cache_manager.rb:21:in `recache!' /usr/share/foreman/lib/tasks/fix_cache.rake:4:in `block in <top (required)>'
Updated by Dominic Cleal almost 11 years ago
- Status changed from Assigned to Ready For Testing
- Translation missing: en.field_release set to 4
Updated by Marek Hulán almost 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 1d1dc48598656a830acd8503c41cac6f93ded79d.
Actions