We've moved discussions to Discord

Stripe ENV keys

Bryan Stewart
Hey all!
Getting close to finishing my app and I need your help. Id like to use ENV variables for the stripe config instead of hardcoded in the secrets file.

I tried putting this in the production.rb for environments, but deploy seemed to explode.
Rails.application.configure do
.....
config.stripe.secret_key = ENV['STRIPE_SK']
config.stripe.publishable_key = ENV['STRIPE_PK']
...


@eager_load=false, @autoload=false, @load_path=false>}>, @cache_classes=true, @log_tags=[:request_id]>
/home/deploy/dragon-test/shared/bundle/ruby/3.1.0/gems/railties-7.0.1/lib/rails/railtie/configuration.rb:96:in `method_missing'
/home/deploy/dragon-test/releases/20220401174450/config/environments/production.rb:82:in `block in '
/home/deploy/dragon-test/shared/bundle/ruby/3.1.0/gems/railties-7.0.1/lib/rails/railtie.rb:251:in `instance_eval'
/home/deploy/dragon-test/shared/bundle/ruby/3.1.0/gems/railties-7.0.1/lib/rails/railtie.rb:251:in `configure'
Chris Oliver
Stripe keys are put in the Rails encrypted credentials and automatically setup for you.

https://jumpstartrails.com/docs/credentials
Bryan Stewart
Hey all!
Getting close to finishing my app and I need your help. Id like to use ENV variables for the stripe config instead of hardcoded in the secrets file.

I tried putting this in the production.rb for environments, but deploy seemed to explode.
Rails.application.configure do
.....
config.stripe.secret_key = ENV['STRIPE_SK']
config.stripe.publishable_key = ENV['STRIPE_PK']
...


@eager_load=false, @autoload=false, @load_path=false>}>, @cache_classes=true, @log_tags=[:request_id]>
/home/deploy/dragon-test/shared/bundle/ruby/3.1.0/gems/railties-7.0.1/lib/rails/railtie/configuration.rb:96:in `method_missing'
/home/deploy/dragon-test/releases/20220401174450/config/environments/production.rb:82:in `block in '
/home/deploy/dragon-test/shared/bundle/ruby/3.1.0/gems/railties-7.0.1/lib/rails/railtie.rb:251:in `instance_eval'
/home/deploy/dragon-test/shared/bundle/ruby/3.1.0/gems/railties-7.0.1/lib/rails/railtie.rb:251:in `configure'
Chris Oliver
Stripe keys are put in the Rails encrypted credentials and automatically setup for you.

https://jumpstartrails.com/docs/credentials
Notifications
You’re not receiving notifications from this thread.
© 2022 Jumpstart Pro by GoRails, LLC