Corey Holmes


60 Experience
0 Lessons Completed
0 Questions Solved


Posted in Stripe Payments

Oh man haha. That always works. Thanks a lot Chris.

Posted in Stripe Payments

Hey, love the new Stripe video but I'm stuck on something.

I am getting the error: uninitialized constant ActionView::CompiledTemplates::STRIPE_PUBLIC. It's having a problem with my meta tag which I placed on the application.html.erb

I have this in my JS file:
$ Stripe.setPublishableKey( $("meta[name='stripe-key']").attr("content"))

And then this in my application.html.erb file:
<%= tag :meta, name: "stripe-key", content: STRIPE_PUBLIC %>

And then at the bottom of my development.rb file I have
STRIPE_SECRET = "xxxxxxxxxxxxxxxxxxxxxxx"
STRIPE_PUBLIC = "xxxxxxxxxxxxxxxxxxxxxxx"

Any idea why I might be getting this error?

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

© 2021 GoRails, LLC. All rights reserved.