I've just updated my Rails app to 5.2, and configured it to use the new config/credentials.yml.enc
file.
When I try to deploy, I get this error:
NameError: uninitialized constant Rails
/Users/me/Documents/project/config/deploy.rb:27:in `<top (required)>'
That's pointing to this line in my config/deploy.rb
file:
set :rollbar_token, Rails.application.credentials[:rollbar_token]
So it appears that while capistrano is running, it doesn't have access to Rails.application.credentials
.
How are you all handling this? I've got some ideas...
- Set this one variable as an
ENV
variable- I don't love how this separates/customizes this one setting
- Somehow make it so capistrano has access to
Rails.application.credentials
- I don't know if this is a good idea or if there are other things I need to be aware of if I go this route
- Remove deploy tracking in rollbar
- 🤷♂️
mina
? I wonder if I need to changebefore "deploy:symlink:linked_files", "setup:copy_linked_master_key"
in part 1, and potentially adjust the equivalent of thecapfile
? – Mahdi