【发布时间】:2023-03-12 19:12:01
【问题描述】:
我真的很困惑,我只是不确定出了什么问题。
我已经安装了在https://stripe.com/docs/checkout/guides/rails找到的指南中的所有代码
Rails.configuration.stripe = {
:publishable_key => ENV['PUBLISHABLE_KEY'],
:secret_key => ENV['SECRET_KEY']
}
Stripe.api_key = Rails.configuration.stripe[:secret_key]
问题是,当我尝试运行以下 rails 命令时:
$ PUBLISHABLE_KEY=pk_test_IER4R7474667R7 SECRET_KEY=sk_test_KUDFN847R84 rails s
我收到以下错误:
'PUBLISHABLE_KEY' is not recognized as an internal or external command,
operable program or batch file.
非常感谢任何帮助,谢谢。
【问题讨论】:
-
你用的是什么版本的rails?
-
我使用的是4.1.1版
标签: ruby-on-rails environment-variables stripe-payments