public-activity/public_activity · error
[WARN] database doesn't exist. Skipping PublicActivity::Acti
Error message
[WARN] database doesn't exist. Skipping PublicActivity::Activity#parameters's serialization
What it means
Error "[WARN] database doesn't exist. Skipping PublicActivity::Activity#parameters's serialization" thrown in public-activity/public_activity.
Source
Thrown at lib/public_activity/orm/active_record/activity.rb:50
# Define ownership to a resource targeted by this activity
belongs_to :recipient, polymorphic: true
end
# Serialize parameters Hash
begin
if table_exists?
unless %i[json jsonb hstore].include?(columns_hash['parameters'].type)
if ::ActiveRecord.version.release < Gem::Version.new('7.1')
serialize :parameters, Hash
else
serialize :parameters, coder: YAML, type: Hash
end
end
else
warn("[WARN] table #{name} doesn't exist. Skipping PublicActivity::Activity#parameters's serialization")
end
rescue ::ActiveRecord::NoDatabaseError
warn("[WARN] database doesn't exist. Skipping PublicActivity::Activity#parameters's serialization")
rescue ::ActiveRecord::ConnectionNotEstablished, ::PG::ConnectionBad, Mysql2::Error::ConnectionError
warn("[WARN] couldn't connect to database. Skipping PublicActivity::Activity#parameters's serialization")
end
end
end
end
end
View on GitHub (pinned to 1f3a5568ad)
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.
Example fix
RAILS_ENV=production rails db:create db:migrate
When it happens
Trigger: 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.
Common situations: See trigger scenarios.
AI-assisted analysis of public-activity/public_activity@1f3a5568ad (2026-08-23).
Data as JSON: /api/errors/b111a8ff4a37d5f0.
Report an issue: GitHub.