Chan, I did this already but removed it...I am in work right now but I wil do it and post it back tonight. IIRC it showed all controllers in dev mode but only one in deploy mode. We will see...
On 12 January 2015 at 10:36, chan sisowath <[email protected]> wrote: > > hi, > > in ligne > https://github.com/ChicagoBoss/ChicagoBoss/blob/master/src/boss/boss_router_controller.erl#L172 > > ControllerModule = list_to_atom(boss_files:web_controller(App, > C, State#state.controllers)), > > > can you print the value App, C and State#state.controllers, > > add this ligne before 172 > > lager:info("App ~p",[App]), > lager:info("C ~p",[C]), > lager:info("Controllers ~p",[State#state.controllers]), > > could be interesting to see in your case what s going on. > > cheers. > > > > > > > 2015-01-11 18:43 GMT+08:00 emacstheviking <[email protected]>: > >> So... boss_router_controller.erl:171 correctly displays both parts of my >> route "web" and "index" so it knows at this point what it wants to find a >> handler for, that's a good start. >> >> I put in some extra lager calls and see this: >> >> 2015-01-11 10:25:20.332 [info] <0.273.0>@boss_router_controller:route:173 >> *!!* State.controllers: smsengine_inbound_controller >> >> 2015-01-11 10:25:20.332 [info] <0.273.0>@boss_router_controller:route:174 >> *!!* web_controller: undefined >> Interesting... I have *two* controllers, "smsengine" and "web"...have I >> been silly he says? No, I thought I had named then wrong but they are: >> * smsengine_inbound_controller.erl >> * smsengine_web_controller.erl >> >> Phew.... the bottom line though is that it has only the one controller >> listed and hence the failure to find a handler. Why should that be the >> case? Out of the two controllers it is the one actually listed in the >> routes file that is failing! If I put the URL for the SMS route in the >> browser >> >> ...LATER... >> >> I modified my routes file to be this: >> >> {"/", [{controller, "web"}, {action, "index"}]}. >> {"/web/index", [{controller, "web"}, {action, "index"}]}. >> {"/inbound/send", [{controller, "inbound"}, {action, "send"}]}. >> >> i.e. 100% explicit and it still fails to load the "/" route or >> http://localhost:31415/web/index, the latter provides this in the log >> window... >> >> 2015-01-11 10:35:28.683 [info] <0.274.0>@boss_router_controller:route:171 >> Boss Route smsengine "web" "index" [] >> >> 2015-01-11 10:35:28.683 [info] <0.274.0>@boss_router_controller:route:173 >> *!!* State.controllers: smsengine_inbound_controller >> >> 2015-01-11 10:35:28.683 [info] <0.274.0>@boss_router_controller:route:174 >> *!!* web_controller: undefined >> >> 2015-01-11 10:35:28.683 [error] <0.274.0> gen_server <0.274.0> terminated >> with reason: bad argument in call to erlang:list_to_atom(undefined) in >> boss_router_controller:route/2 line 176 >> >> i.e. no change at all... so why does it only have the one controller in >> the list it matches against at this point in deployment mode I wonder? >> >> Posted this much. Raising another post... >> >> On 11 January 2015 at 10:16, emacstheviking <[email protected]> wrote: >> >>> I am still stuck with this same problem. To be sure, I did this: >>> >>> rm -fr deps >>> ./rebar g-d >>> ./rebar compile >>> ./init.sh >>> >>> ...and it *still* insists it has issues finding the routes... >>> >>> terminated with reason: bad argument in call to >>> erlang:list_to_atom(undefined) in boss_router_controller:route/2 line 172 >>> >>> If I type this into the browser address bar: >>> >>> http://localhost:31415/web/index >>> >>> I get this message back: >>> >>> No routes matched the requested URL. Additionally, no handler was found >>> for processing 404 errors. You probably want to modify >>> ../smsengine/priv/smsengine.routes to prevent errors like this one. >>> >>> Which is a nonsense of course because the route is configured, in fact >>> here is the default "/" route from my routes file that it apparently cannot >>> use! >>> >>> % Front page >>> {"/", [{controller, "web"}, {action, "index"}]}. >>> >>> In "dev" mode both work as expected... I am goig to pur some "printf" >>> statements in so that I can at least see what comes out in dev mode and >>> deploy mode, it might shed some light on the problem. I will post my >>> findings... >>> >>> >>> On 9 January 2015 at 14:58, ENTR0PY <[email protected]> wrote: >>> >>>> I tried this as wll , i compiled the project before and nada, ebin had >>>> all the beams >>>> >>>> On Friday, March 28, 2014 at 4:22:01 PM UTC-4, Jesse Gumm wrote: >>>>> >>>>> To be clear, before running "./init.sh start", are you running >>>>> "./rebar compile"? It may be that your modules are not yet compiled. >>>>> While >>>>> dev mode automatically compiles and loads the .erl files, production mode >>>>> must be compiled ahead of time, and have the .beam files placed into the >>>>> ebin directory. >>>>> >>>>> Have you done this step? >>>>> >>>>> -Jesse >>>>> >>>>> >>>>> On Tue, Mar 25, 2014 at 5:36 AM, Peter Yuen <[email protected]> wrote: >>>>> >>>>>> i have the same problem, but, the path is correctly.... I don't know >>>>>> what to do. >>>>>> >>>>>> please help >>>>>> >>>>>> On Friday, May 3, 2013 4:42:20 PM UTC+8, Derek Chiang wrote: >>>>>>> >>>>>>> I'm not sure why this happens, but when I try to deploy my >>>>>>> application on a remote server and start in production mode ("./init.sh >>>>>>> start"), the routes file is not found. However if I start it in >>>>>>> development mode, then everything is good. >>>>>>> >>>>>>> It's worth noting that both development mode and production mode run >>>>>>> normally on my local machine. >>>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "ChicagoBoss" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> Visit this group at http://groups.google.com/group/chicagoboss. >>>>>> To view this discussion on the web visit https://groups.google.com/d/ >>>>>> msgid/chicagoboss/5ccdc68b-0613-49d0-8fb6-c8344a8f2052% >>>>>> 40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/chicagoboss/5ccdc68b-0613-49d0-8fb6-c8344a8f2052%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Jesse Gumm >>>>> Owner, Sigma Star Systems >>>>> 414.940.4866 || sigma-star.com || @jessegumm >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "ChicagoBoss" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> Visit this group at http://groups.google.com/group/chicagoboss. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/chicagoboss/94c4f4e3-a4f6-4c40-81ab-021147e71d5c%40googlegroups.com >>>> <https://groups.google.com/d/msgid/chicagoboss/94c4f4e3-a4f6-4c40-81ab-021147e71d5c%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "ChicagoBoss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> Visit this group at http://groups.google.com/group/chicagoboss. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/chicagoboss/CAEiEuU%2BoWNUwwfi%3DCRNoq54JzZor8fDEmNY9%3DEvmJ_ovoGRbag%40mail.gmail.com >> <https://groups.google.com/d/msgid/chicagoboss/CAEiEuU%2BoWNUwwfi%3DCRNoq54JzZor8fDEmNY9%3DEvmJ_ovoGRbag%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "ChicagoBoss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > Visit this group at http://groups.google.com/group/chicagoboss. > To view this discussion on the web visit > https://groups.google.com/d/msgid/chicagoboss/CAB-Ofhn5SUW-vz11ovOad-uKcnb_Qh%2BaG7UPODGHnYQWhGNA3A%40mail.gmail.com > <https://groups.google.com/d/msgid/chicagoboss/CAB-Ofhn5SUW-vz11ovOad-uKcnb_Qh%2BaG7UPODGHnYQWhGNA3A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "ChicagoBoss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at http://groups.google.com/group/chicagoboss. To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CAEiEuUK0HEGA90AHb60PBSoh6g3H%2BdPeD6ZJnsgqnM6TXG-8ng%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
