Giter Site home page Giter Site logo

Error when building for prod about canary HOT 5 CLOSED

cpjk avatar cpjk commented on May 21, 2024
Error when building for prod

from canary.

Comments (5)

snewcomer avatar snewcomer commented on May 21, 2024 5

Turns out I had to add canada to extra_applications in my mix file.

from canary.

snewcomer avatar snewcomer commented on May 21, 2024

So what is interesting is building for production, I see this stack trace (_authorize_resource). This is pre this commit. However, locally I have the correct canary code in my deps folder. I am using {:canary, github: "cpjk/canary"},. Any thoughts on why this is occurring when building and deploying to prod?

screen shot 2017-03-28 at 5 53 01 pm

from canary.

cpjk avatar cpjk commented on May 21, 2024

If you're using Canary in production, I would recommend using the version on hex, rather than github, as it is more stable.

As for the error, would you mind posting the whole stack trace? https://github.com/cpjk/canary/blob/master/lib/canary/plugs.ex#L207 doesn't look like it's doing much.

from canary.

snewcomer avatar snewcomer commented on May 21, 2024

@cpjk Definitely. Will do. I actually just realized it might be an old cached version (before the above commit ref) on my build server (rather than an unpublished pkg or something like that, if that is even possible)

from canary.

snewcomer avatar snewcomer commented on May 21, 2024

@cpjk Sorry terrible theories on my part :). So here is the undefined function from my error log. Expands to Canada.Can.can?(%MyApp.User{...}, :update, %MyApp.Resource{...}). So it has an arity of 3, I'm passing 3 arguments, etc. It works locally but not after building and deploying (w/ distillery and edeliver) to a server. Any thoughts on other debugging techniques to figure out this problem?

Elixir 1.4.2
Erlang 19.2

screen shot 2017-03-29 at 10 41 02 am

screen shot 2017-03-29 at 10 50 29 am

Then when jumping into iex -S mix locally:

screen shot 2017-03-29 at 11 18 29 am

but on my server bin/myapp console or bin/myapp remote_console while it is running:

screen shot 2017-03-29 at 11 20 47 am

from canary.

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.