ActiveRecord::RecordNotUnique: Mysql2::Error: Duplicate entry '4048-65180-Notification' for key 'index_seen_by_users_on_user_course_id_and_obj_id_and_obj_type': INSERT INTO `seen_by_users` (`created_at`, `obj_id`, `obj_type`, `updated_at`, `user_course_id
jsyeo opened this issue · 0 comments
jsyeo commented
View details in Rollbar: https://rollbar.com/jsyeo/coursemology.org/items/86/
Mysql2::Error: Duplicate entry '4048-65180-Notification' for key 'index_seen_by_users_on_user_course_id_and_obj_id_and_obj_type'
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract_mysql_adapter.rb", line 245, in query
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract_mysql_adapter.rb", line 245, in block in execute
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract_adapter.rb", line 280, in block in log
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.14/lib/active_support/notifications/instrumenter.rb", line 20, in instrument
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract_adapter.rb", line 275, in log
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/active_record.rb", line 63, in block in log_with_newrelic_instrumentation
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/method_tracer.rb", line 219, in trace_execution_scoped
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/active_record.rb", line 60, in log_with_newrelic_instrumentation
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract_mysql_adapter.rb", line 245, in execute
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/connection_adapters/mysql2_adapter.rb", line 213, in execute
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/connection_adapters/mysql2_adapter.rb", line 236, in exec_insert
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/database_statements.rb", line 90, in insert
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/query_cache.rb", line 14, in insert
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/relation.rb", line 66, in insert
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/persistence.rb", line 367, in create
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/timestamp.rb", line 58, in create
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/callbacks.rb", line 268, in block in create
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.14/lib/active_support/callbacks.rb", line 403, in _run__1956743318649284602__create__1469721371563875333__callbacks
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.14/lib/active_support/callbacks.rb", line 405, in __run_callback
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.14/lib/active_support/callbacks.rb", line 385, in _run_create_callbacks
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.14/lib/active_support/callbacks.rb", line 81, in run_callbacks
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/callbacks.rb", line 268, in create
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/persistence.rb", line 348, in create_or_update
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/callbacks.rb", line 264, in block in create_or_update
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.14/lib/active_support/callbacks.rb", line 425, in _run__1956743318649284602__save__1469721371563875333__callbacks
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.14/lib/active_support/callbacks.rb", line 405, in __run_callback
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.14/lib/active_support/callbacks.rb", line 385, in _run_save_callbacks
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.14/lib/active_support/callbacks.rb", line 81, in run_callbacks
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/callbacks.rb", line 264, in create_or_update
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/persistence.rb", line 84, in save
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/validations.rb", line 50, in save
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/attribute_methods/dirty.rb", line 22, in save
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/transactions.rb", line 259, in block (2 levels) in save
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/transactions.rb", line 313, in block in with_transaction_returning_status
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/database_statements.rb", line 192, in transaction
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/transactions.rb", line 208, in transaction
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/method_tracer.rb", line 455, in block in transaction_with_trace_ActiveRecord_self_name_transaction
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/method_tracer.rb", line 219, in trace_execution_scoped
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/method_tracer.rb", line 453, in transaction_with_trace_ActiveRecord_self_name_transaction
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/transactions.rb", line 311, in with_transaction_returning_status
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/transactions.rb", line 259, in block in save
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/transactions.rb", line 270, in rollback_active_record_state!
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/transactions.rb", line 258, in save
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/associations/has_many_association.rb", line 16, in insert_record
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/autosave_association.rb", line 350, in block in save_collection_association
File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.14/lib/active_record/autosave_association.rb", line 341, in each
File "/hom