Add gem 'figaro' to your Gemfile and run bundle install. Then run bundle exec figaro install; this will create config/application.yml and add it to your .gitignore file, preventing it from being added to version control.
You can store your keys in application.yml in this format:
SECRET_NAME: secre...