简体   繁体   English

spree_paypal_express - Spree::Admin::PaymentsControllerDecorator (NameError)

[英]spree_paypal_express - Spree::Admin::PaymentsControllerDecorator (NameError)

I'm searching one solution for my question on web, but probably no one had the same problem.我正在为我在 web 上的问题寻找一种解决方案,但可能没有人遇到同样的问题。

Before deploying my spree project to the cloud, i'm trying to run it in my local host with RAILS_ENV=production , but I always receive the same error:在将我的 spree 项目部署到云之前,我尝试使用RAILS_ENV=production在本地主机上运行它,但我总是收到相同的错误:

expected file /usr/local/bundle/bundler/gems/better_spree_paypal_express-181cce8bcd14/app/controllers/spree/admin/payments_controller_decorator.rb to define constant Spree::Admin::PaymentsControllerDecorator, but didn't (NameError)预期文件 /usr/local/bundle/bundler/gems/better_spree_paypal_express-181cce8bcd14/app/controllers/spree/admin/payments_controller_decorator.rb 来定义常量 Spree::Admin::PaymentsControllerDecorator,但没有(NameError)

I am having this problem only on production environment and I realize this started to happen when I added the spree_paypal_expresss gem.我只在生产环境中遇到这个问题,当我添加spree_paypal_expresss gem 时,我意识到这开始发生了。

Using Rails 6 and Spree 4.0 with sqlite just to test.使用带有 sqlite 的 Rails 6 和 Spree 4.0 只是为了测试。

Do you have any idea why this is happening?你知道为什么会这样吗?

Thanks.谢谢。

I solved the problem.我解决了这个问题。 Actually I don't know what the real cause about it, but the downgrading the spree version to 3.7 the problem doesn't appear其实我不知道它的真正原因是什么,但是将大礼包版本降级到3.7并没有出现问题

Based on this thred on Spree's Slack channel, you should use https://github.com/spree-contrib/spree_braintree_vzero for PayPal integration on Spree.基于 Spree 的 Slack 频道上的这个thred ,您应该使用https://github.com/spree-contrib/spree_braintree_vzero在 Spree 上集成 PayPal。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM