ruby-dotenv

dotenv gem doesn't get variables in Rails 6 or Ruby 2.6.5

六眼飞鱼酱① 提交于 2021-01-21 05:20:51
问题 I was using the dotenv gem to store environmental variables for development in a secrets file. The gem is no longer pulling the variables after upgrading ruby and rails on my computer. To try and track down the cause, and after a while of trying different options, I ended up creating two identical applications with just two differences. The ruby and the rails versions. One app is able to pull the environmental variables, the other returns nil. Any suggestions? My Setup Working application has

Is it possible to store a JSON file to an ENV variable with dotenv?

允我心安 提交于 2021-01-21 04:36:07
问题 I am using Google Drive API with my Rails application. The API is working fine. I have the following client_secret.json file: { "type": "service_account", "project_id": "gobirdie-landing-page", "private_key_id": "xxxxx", "private_key": "-----BEGIN PRIVATE KEY----- xxxxx -----END PRIVATE KEY-----\n", "client_email": "xxxxxxx@gobirdie-landing-page.iam.gserviceaccount.com", "client_id": "xxxxxxxxx", "auth_uri": "xxxxxx", "token_uri": "xxxxxxx": "xxxxxxxx": "xxxxxxxxx" } which is called in my