Git Product home page Git Product logo

Comments (3)

charlie-hadden avatar charlie-hadden commented on May 31, 2024

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.

bluefantail avatar bluefantail commented on May 31, 2024

@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.

BlackRabbitt avatar BlackRabbitt commented on May 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.