Secrets.yml change fails on rails 5.2 app

Expected behavior

When running rails g forest_liana:install xxx with the forest token, looks like the secrets.yml file of my app should be updated with the right values

Actual behavior

[12:04]: (forest) rails g forest_liana:install xxx
Forest generated a random authentication secret to secure the data access of your local project.
You can change it at any time in your config/secrets.yml file.
File unchanged! The supplied flag value not found!  config/secrets.yml
File unchanged! The supplied flag value not found!  config/secrets.yml
File unchanged! The supplied flag value not found!  config/secrets.yml

Context

  • Package Version: forest_liana 6.6.2

Thanks !

Hello @albandum and welcome to the Forest Admin community!!! :tada:

Does your config/secrets.yml file exists?
Is there already some config in it?

Thank you,

Yes, it looks like this :

# Be sure to restart your server when you modify this file.

# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!

# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rake secret` to generate a secure secret key.

# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.

development:
  secret_key_base: xx

test:
  secret_key_base: xx

staging:
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

production:
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

Thanks !

Thank you for these informations @albandum,

Which version of ruby are you using and which version of rails exactly are you using? 5.2.0 or 5.2.4?
Could you remove your secrets.yml file and rerun install command?

Let me know if it fixes your issue :slight_smile:

Ruby 2.6.6p146 and rails 5.2.6 !
Yes, looks like deleting the file made it work, but it might still need a fix :slight_smile:

Thanks !

1 Like