When I try to run rails server
command I get the error
How to solve it?
My config/environments/development.rb
Rails.application.configure do
config.secret_key_base = ENV["SECRET_KEY_BASE"]
#Some stuff
end
And I don't have the secret.yml file in my folder.
Then create one:
# be sure to restart your server when you modify this file...
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
development:
secret_key_base: asdflkjasdlfkjasldfkj
test:
secret_key_base: asdflkhasldfhlhaskdlflakhsdf
production:
secret_key_base: 523lk5h2lkjlj6nlk4n6lk4
obviously don't use those keys above ^ just mash on your keyboard, or use rake secret
to generate one :)
You skipped one installation step.
For Redmine 2 and 3 versions, type:
RAILS_ENV=production bundle exec rake generate_secret_token
The following solution helped me:
Create a secrets.yml file in your config directory.
In your terminal, type the following command: rake secret. This will generate a secret for you to include in your secrets.yml file.
Add the following snippet of code to your config/secrets.yml file:
development: secret_key_base: PASTE_YOUR_GENERATED_SECRET_HERE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With