--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4577e3bb-754c-48bc-8fe3-f8fddda77481%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Jun 10, 2019, at 12:25 AM, Ariel Juodziukynas <arie...@gmail.com> wrote:Rails 6 will have this feature https://github.com/rails/rails/pull/33521For Rails 5.2, personally, I wouldn't add the file to the source control. I would do this steps:1- run rails credentials:edit locally2- add the credentials for production and save3- upload the file to your hosting at /home/user/your_app/shared/config/
4- configure capistrano to symlink that file on each deploy (at config/deploy.rb)set :linked_files, fetch(:linked_files, [])+%W{config/credentials.yml.enc}Now, on each deploy, capistrano runs a task that adds some symlink to the current release pointing to /shared so they are kept between releases. Your file /home/user/your_app/current/config/credentials.yml.enc will actually be a symlink to /home/user/your_app/shared/config/credentials.yml.enc. You can just have that on production, use one on development and add it to the .gitignore file so it doesn't conflict with the symlink.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/D070CEB0-00EF-45B2-B600-C88B3C2C8CED%40datatravels.com.
rails-env-credentials
gem useful for this. Not sure how compatible it will be with the
upcoming Rails 6 support but its been working great for my app.--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4577e3bb-754c-48bc-8fe3-f8fddda77481%40googlegroups.com.
main_key:
development:
sub_key:
value_key: 'development'
production:
sub_key:
value_key: 'production'
test:
sub_key:
value_key: 'test'
my_credential = Rails.application.credentials.dig(:main_key, Rails.env.to_sym, :sub_key, :value_key)
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/01fa12ca-06f5-4246-bead-503af4bf1a5c%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/C2DFCFDD-69CD-4A7C-A7C3-1898210E9B42%40datatravels.com.