{"record":{"id":"b111a8ff4a37d5f0","repo":"public-activity/public_activity","slug":"warn-database-doesn-t-exist-skipping-publicacti","errorCode":null,"errorMessage":"[WARN] database doesn't exist. Skipping PublicActivity::Activity#parameters's serialization","messagePattern":"\\[WARN\\] database doesn't exist\\. Skipping PublicActivity::Activity#parameters's serialization","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/public_activity/orm/active_record/activity.rb","lineNumber":50,"sourceCode":"          # Define ownership to a resource targeted by this activity\n          belongs_to :recipient, polymorphic: true\n        end\n\n        # Serialize parameters Hash\n        begin\n          if table_exists?\n            unless %i[json jsonb hstore].include?(columns_hash['parameters'].type)\n              if ::ActiveRecord.version.release < Gem::Version.new('7.1')\n                serialize :parameters, Hash\n              else\n                serialize :parameters, coder: YAML, type: Hash\n              end\n            end\n          else\n            warn(\"[WARN] table #{name} doesn't exist. Skipping PublicActivity::Activity#parameters's serialization\")\n          end\n        rescue ::ActiveRecord::NoDatabaseError\n          warn(\"[WARN] database doesn't exist. Skipping PublicActivity::Activity#parameters's serialization\")\n        rescue ::ActiveRecord::ConnectionNotEstablished, ::PG::ConnectionBad, Mysql2::Error::ConnectionError\n          warn(\"[WARN] couldn't connect to database. Skipping PublicActivity::Activity#parameters's serialization\")\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":32,"sourceCodeEnd":58,"githubUrl":"https://github.com/public-activity/public_activity/blob/1f3a5568adcb55317552b7528cc489b8ccbbb306/lib/public_activity/orm/active_record/activity.rb#L32-L58","documentation":"Error \"[WARN] database doesn't exist. Skipping PublicActivity::Activity#parameters's serialization\" thrown in public-activity/public_activity.","triggerScenarios":"Emitted when loading PublicActivity::Activity raises ActiveRecord::NoDatabaseError while checking the parameters column. Happens on first boot of a fresh environment where the database itself has not been created yet (before rake db:create or db:setup), in CI steps that load the Rails environment before database creation, or in generators that reference the model. The warn at lib/public_activity/orm/active_record/activity.rb:50 means serialization setup is skipped for that boot; parameters is treated as a raw column until the process reloads after the database exists.","commonSituations":"See trigger scenarios.","solutions":["Create the database: rails db:create (or createdb for PostgreSQL).","Check config/database.yml: the database name for the current RAILS_ENV must match an existing database.","If this fires during boot tasks (assets:precompile, generators) where no DB exists yet, the warning is safe to ignore."],"exampleFix":"RAILS_ENV=production rails db:create db:migrate","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1f3a5568adcb55317552b7528cc489b8ccbbb306","analyzedAt":"2026-08-23T14:30:56.210Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}