Valeriia Chavdar

Joined

10 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Rails credentials returning nil

I had the exact same issue as Nino. For me the reason was that I accidentally created global credentials instead of specifically for the development environment. So I had a master.key file generated. what worked for me was to delete the master.key, credentials.yml.enc file and basically any credential file that I generated before (I had many attempts, so I also had a development.yml.enc and development.key). I deleted all of those and then ran EDITOR="code --wait" bin/rails credentials:edit --environment=development and it finally worked. I added the keys to the file. When I tried to access Rails.application.credentials.twitter for the millionth time, it finally gave me back the api keys

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.