Skip to content

Missing master key error when running in dev #52

@SkyfallWasTaken

Description

@SkyfallWasTaken

Steps to repro:

  • Set up the dev environment as per the readme
  • Visit localhost:3000, enter an email and signup details
2025-11-26 09:39:02.493413 F [11069:puma srv tp 002 deprecators.rb:86] Rails -- Exception: ArgumentError: Missing master key
/opt/homebrew/lib/ruby/gems/3.4.0/gems/lockbox-2.0.1/lib/lockbox.rb:67:in 'Lockbox.attribute_key'
/opt/homebrew/lib/ruby/gems/3.4.0/gems/lockbox-2.0.1/lib/lockbox/utils.rb:21:in 'Lockbox::Utils.build_box'
/opt/homebrew/lib/ruby/gems/3.4.0/gems/lockbox-2.0.1/lib/lockbox/model.rb:646:in 'block (3 levels) in LoginAttempt.has_encrypted'
...50 more lines of yap (why are rails stacktraces so horrible :hs:)

The fix here is to run:

openssl rand -hex 32

and set that result as the LOCKBOX_MASTER_KEY in .env.development but it'd be nice if this was in the readme!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions