Question

I've read the posts here and here on issues with the secret_token / secret_base_key issue, but I haven't been able to fix my issue.

I have an rails application I just took over from someone else. I ran the server, and got the Use config.secret_token = "some secret phrase of at least 30 characters"in config/initializers/secret_token.rb error.

I updated my secret_token.rb to have a string. I tried a local environment variable, as well as both secret_token and _secret_base_key. I restarted the server each time.

Not sure how else I should troubleshoot the issue, as I keep getting the problem.

What I've tried

::Application.config.secret_token = ENV['123124...30chars'] ::Application.config.secret_token = '123124...30chars' ::Application.config.secret_key_base = '123124...30chars'

--update-- Ended up following the instructions here. The previous developer had it declared locally so I guess I had to define the variable in my ~/.bash_profile

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top