伙计们,
我正在尝试使用 Stripe 在 Heroku 上部署 rails webapp。这可能是预编译资产问题。我检查了heroku错误日志,有一个actionview模板错误“未定义的方法条纹”
在我的本地机器上一切正常,只是推送到heroku时出了点问题。
2013-02-11T00:22:53+00:00 app[web.1]: ActionView::Template::Error (undefined method `stripe' for #<Rails::Application::Configuration:0x00000003397440>):
2013-02-11T00:22:53+00:00 app[web.1]: 7:
2013-02-11T00:22:53+00:00 app[web.1]: 6: </article>
2013-02-11T00:22:53+00:00 app[web.1]: 9: data-key="<%= Rails.configuration.stripe[:publishable_key] %>"
2013-02-11T00:22:53+00:00 app[web.1]: 8: <script src="https://checkout.stripe.com/v2/checkout.js" class="stripe-button"
2013-02-11T00:22:53+00:00 app[web.1]: 10: data-description="You'll get your information in 2 days!"
希望有人对这个问题有所了解。我尝试只下载完整的 stripe.js 文件并将其放在我的资产文件夹中,但这似乎没有帮助。