Skip to content

The default test_data.rb needs to be updated for 7.1 #11

@infews

Description

@infews
** Invoke test_data:initialize (first_time)
** Invoke test_data:verify_config (first_time)
** Execute test_data:verify_config
** Invoke environment (first_time)
** Execute environment
DEPRECATION WARNING: `Rails.application.secrets` is deprecated in favor of `Rails.application.credentials` and will be removed in Rails 7.2. (called from block in <main> at /Users/dwfrank/workspace/meals/config/environments/test_data.rb:7)
rake aborted!
NoMethodError: undefined method `generate_development_secret' for #<Meals::Application> (NoMethodError)

  self.secrets.secret_key_base ||= Rails.application.send(:generate_development_secret)
                                                    ^^^^^
Did you mean?  generate_local_secret

I know this was mentioned in #2, but it appears 7.1 has changed this, maybe for the better.

I've found that fixing the Deprecation and moving to :generate_local_secret gets me to the same error as #9.

I can submit a PR, but I'm not sure it works...yet.

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