Comments (3)
Are you by any chance deploying with something like mina or capistrano? I'd guess so from the shared
folder in your stack trace.
I ran into the same issue yesterday and spent some time debugging it. The issue is that the decorators are being loaded twice, meaning the alias here ends up aliasing itself rather than the original method: https://github.com/spree-contrib/spree_braintree_vzero/blob/3-1-stable/app/helpers/spree/admin/navigation_helper_decorator.rb#L2
The first time is from the to_prepare
callback here: https://github.com/spree-contrib/spree_braintree_vzero/blob/3-1-stable/lib/spree_braintree_vzero/engine.rb#L12-L16
The second time is from rails' eager loading. This means that the file gets required with two different paths. In my case:
/opt/project-name/current/vendor/bundle/ruby/2.3.0/bundler/gems/spree_braintree_vzero-a6b3fa637387/lib/spree_braintree_vzero/../../app/helpers/spree/admin/navigation_helper_decorator.rb
/opt/project-name/shared/bundle/ruby/2.3.0/bundler/gems/spree_braintree_vzero-a6b3fa637387/app/helpers/spree/admin/navigation_helper_decorator.rb
Because one is from the symlinked directory and one is from the real location it get's required twice. As a workaround for this I created a fork which normalizes the path before loading it: builtbybuffalo@dabc805. That's working well for us now but I'm not sure how "correct" the fix is. A more appropriate solution may be to figure out why the paths are differing in the first place.
from spree_braintree_vzero.
@charlie-hadden Yea using Mina. After getting a couple of other people to look at it we determined much the same thing. Just couldn't figure out why it gets required twice, or what the nice solution would be, if there even is one. Seems like it should really support deployments via Mina or Cap, but I suppose lots of people just use Heroku?
from spree_braintree_vzero.
Is there any update regarding this bug? I am getting same one and above patch is also not working.
from spree_braintree_vzero.
Related Issues (20)
- Shipment tax adjustments not created when using Paypal Express
- @Mafi88 There was a JS error that was impacting all pages, fixing this solved the problem. It must have affected some JS related to the checkout.
- PayPal HOT 4
- Template scripts fail to run if "head script" is included with "defer" HOT 1
- Getting ActiveRecord::StatementInvalid in Spree::UserSessionsController#create HOT 2
- uninitialized constant Spree::BraintreeVzero::LegacyRailsPatch
- Payment "source" is nil on PayPalExpress HOT 1
- Dependabot can't resolve your Ruby dependency files
- PayPal Express Checkout not rendering on payment page HOT 2
- Dependabot can't resolve your Ruby dependency files
- Dependabot can't resolve your Ruby dependency files
- Dependabot can't resolve your Ruby dependency files
- "braintree is not defined" on cart using PayPal Express Checkout HOT 1
- 3D Secure preference has no impact on checkout process
- Drop-in does not appear on backend - source_required?
- Truncate Product Description and Name HOT 7
- Feature Request: PayPal ACDC
- SKU should not be used as product_code for Braintree!
- Switching between payment methods broken by this gem
- 2099 authorisation required error on 3.5.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spree_braintree_vzero.