Skip to main content

Have Stripe public key show up

Rails • Asked by Martin Curiel

Hi Chris,

I went through the master class for Stripe and your DigitalOcean tutorial. Attempting to combine my knowledge. I was able to deploy the app:

As you can see my pricing table is not showing up. I look at the JS console I see that it's not picking up the Stripe public key. I did place the stripe credentials in .rbenv-vars as you went over in the tutorial.

Do I also need to also edit config/environments/production.rb so that I have:

config.require_master_key = true

or does the Digital Ocean server pull only from .rbenv-vars file?

Thanks again,


I found that I could put ENV["stripe_public_key"] directly on the head and that solved my issue.

Double check you have the rbenv-vars plugin installed. You should verify that is loading ENV vars from it. Then make sure you have RAILS_MASTER_KEY=x set in it. Probably something simple missing there.

Ah you already fixed it! :D

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.