ruby on rails - Change dotenv configuration when deploying to Heroku/production? -


i have ajax call relies on api key part of request url. using dotenv hide key. works fine when run locally, once deployed on heroku, gives me a:

uncaught typeerror: cannot read property '________' of null 

it looks though it's returning null (but it's totally fine in development). i'm wondering if have change of settings relating dotenv when pushing heroku / production?

thanks!

i assuming referring file named .env dotenv. every variable in file need on heroku must defined in heroku config vars : https://devcenter.heroku.com/articles/config-vars

the .env file easy way replicate heroku config vars locally. way code prepared read configuration data config vars. code running on heroku need set heroku config vars.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -