I wanted to use already defined variable in ruby file. Below is my snippet from secret.yml file. However when I am accessing those variables in code, i am getting unexpected token at '
Could you please suggest how we can access these variable inside same file.
GOOGLE_TYPE: "somevalues"
GOOGLE_PROJECT: 'somevalues'
GOOGLE_PRIVATE_KEY_ID: 'somevalues'
GOOGLE_PRIVATE_KEY: "somevalues"
GOOGLE_CLIENT_ID: 'somevalues'
GOOGLE_CLIENT_EMAIL: 'somevalues'
google_cloud_storage_credential_content: '{
"type": #{GOOGLE_TYPE}
"project_id": #{GOOGLE_PROJECT}
"private_key_id": #{GOOGLE_PRIVATE_KEY_ID}
"private_key": #{GOOGLE_PRIVATE_KEY}
"client_id": #{GOOGLE_CLIENT_ID}
"client_email": #{GOOGLE_CLIENT_EMAIL}
}'
I tried these ways too but it did not work.
<%= ["GOOGLE_TYPE"] %> and <%= "GOOGLE_TYPE" %>
Error:
unexpected token at '{ "type": #{GOOGLE_TYPE} "project_id": #{GOOGLE_PROJECT} .....
Any help would be appreciated.