All threads / Have Stripe public key show up

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Have Stripe public key show up

Martin Curiel asked in Rails

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:

http://165.22.132.173/pricing

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,

Martin

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

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,344+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.