Hi, This line in the error message:
{noproc,{gen_server,call, [{global,boss_news}, Means that the boss_news server is not started. I thought boss_news should be started by default, but I don't know. You might need to e ensure it's started during application startup. -Jesse On Oct 29, 2016 3:44 AM, "Phang Mulianto" <braveh...@gmail.com> wrote: > So nobody can give a clue ? > > to bad , its hard for newbie to understand this without any help. > > i plan to convert my django app to chicagoboss but bump on this. > > > On Friday, 28 October 2016 19:05:53 UTC+8, Phang Mulianto wrote: >> >> HI TX, >> >> Below is my 23 lines error. >> >> Strange is when rebar compile , no error message. it pass compilation. >> >> register('POST', [], WardBoss) -> >> NewVoter = voter:new(id, Req:post_param("first_name"), >> Req:post_param("last_name"), >> Req:post_param("address"), Req:post_param("notes"), >> WardBoss:id()), >> case NewVoter:save() of <<<==== this is line 23 error, but with >> rebar compile, there is no error, and this is copy paste from the tutorial. >> {ok, SavedVoter} -> >> {redirect, "/voter/view/"++SavedVoter:id()}; >> %{redirect, [{action, "list"}]}; >> %{ok, [{voter, "ab"}]}; >> {error, Errors} -> >> {ok, [{errors, Errors}, {voter, NewVoter}]} >> end. >> >> >> On Friday, October 28, 2016 at 6:14:22 PM UTC+8, TX wrote: >>> >>> {file,"/home/mulianto/development/erlangweb/evening/src/ >>> controller/evening_voter_controller.erl"},{line,23} >>> >>> Check line 23 of your evening_voter_controller.erl file >>> >>> >>> ------------------ 原始邮件 ------------------ >>> *发件人:* "Phang Mulianto";<brav...@gmail.com>; >>> *发送时间:* 2016年10月28日(星期五) 下午4:58 >>> *收件人:* "ChicagoBoss"<chicagoboss@googlegroups.com>; >>> *抄送:* "TX"<23161...@qq.com>; >>> *主题:* Re: 回复:[chicagoboss] Evening with erlang tutorial >>> >>> Hi TX, >>> >>> Here are the web error message. >>> >>> We got a problem! >>> This message will appear in production; you may want to define a 500 >>> handler in /home/mulianto/development/erlangweb/evening/priv/evening. >>> routes >>> Error: >>> >>> "Error in controller, see console.log for details\n" >>> >>> Request: >>> >>> {sbw,cowboy_simple_bridge, >>> {cowboy_bridge,#Ref<0.0.0.144911>}, >>> false, >>> [{<<"first_name">>,<<"Anda">>}, >>> {<<"last_name">>,<<"bisa">>}, >>> {<<"address">>,<<"Chicago">>}, >>> {<<"notes">>,<<"Mantap">>}], >>> [],[],none, >>> [{<<"host">>,<<"127.0.0.1:8001">>}, >>> {<<"connection">>,<<"keep-alive">>}, >>> {<<"content-length">>,<<"59">>}, >>> {<<"pragma">>,<<"no-cache">>}, >>> {<<"cache-control">>,<<"no-cache">>}, >>> {<<"origin">>,<<"http://127.0.0.1:8001">>}, >>> {<<"upgrade-insecure-requests">>,<<"1">>}, >>> {<<"user-agent">>, >>> <<"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like >>> Gecko) Chrome/51.0.2704.106 Safari/537.36">>}, >>> {<<"content-type">>,<<"application/x-www-form-urlencoded">>}, >>> {<<"accept">>, >>> >>> <<"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8">>}, >>> {<<"referer">>,<<"http://127.0.0.1:8001/voter/register">>}, >>> {<<"accept-encoding">>,<<"gzip, deflate">>}, >>> {<<"accept-language">>,<<"en-US,en;q=0.8">>}, >>> {<<"cookie">>, >>> <<"csrftoken=pfMY4UPoNYv8avsfl8gYCDVoHm0xyrv5; >>> AuthSession=bXVsaWFudG86NTgwRjY4NEE6VgjtIAUiJyNrBe9v24dQ9qzMDa0; >>> session_id=e68d8840c82404c1a0e9318148a82659; user_id=ward_boss-1">>}], >>> [{<<"csrftoken">>,<<"pfMY4UPoNYv8avsfl8gYCDVoHm0xyrv5">>}, >>> {<<"authsession">>, >>> <<"bXVsaWFudG86NTgwRjY4NEE6VgjtIAUiJyNrBe9v24dQ9qzMDa0">>}, >>> {<<"session_id">>,<<"e68d8840c82404c1a0e9318148a82659">>}, >>> {<<"user_id">>,<<"ward_boss-1">>}], >>> {response,200,[],[],[]}} >>> >>> Application info: >>> >>> {boss_app_info,evening,[],"/static","/doc",all, >>> [{evening_01_news,[]}], >>> <0.256.0>,<0.257.0>,<0.259.0>,<0.260.0>, >>> ["greeting","voter","ward_boss"], >>> [], >>> ["evening_greeting_controller","evening_user_controller", >>> "evening_voter_controller"]} >>> >>> *Fri, 28 October 2016 2:19 p.m.* >>> >>> >>> *I cannot get the real problem. Also the records data is saved and can >>> list the data when go to the /voter/list * >>> >>> >>> And the error from console : >>> >>> 14:19:11.371 [error] POST /voter/register [evening] 500 6ms >>> >>> 14:19:13.794 [error] Error in controller exit:{noproc,{gen_server,call, >>> >>> [{global,boss_news}, >>> >>> {created,"voter-13", >>> >>> [{id,"voter-13"}, >>> >>> {first_name,"Anda"}, >>> >>> {last_name,"bisa"}, >>> >>> {address,"Chicago"}, >>> >>> {notes,"Mantap"}, >>> >>> {ward_boss_id,"ward_boss-1"}]}]}} >>> Stacktrace: [{gen_server,call,2,[{file,"gen_server.erl"},{line,182}]},{ >>> boss_record_lib,run_after_hooks,3,[{file,"src/boss_record_ >>> lib.erl"},{line,45}]},{boss_db,save_record,2,[{file,"src/ >>> boss_db.erl"},{line,423}]},{evening_voter_controller,regis >>> ter,4,[{file,"/home/mulianto/development/erlangweb/evening/ >>> src/controller/evening_voter_controller.erl"},{line,23}]},{b >>> oss_web_controller,call_controller_action,3,[{file,"src/ >>> boss/boss_web_controller.erl"},{line,305}]},{boss_web_contro >>> ller,apply_action,4,[{file,"src/boss/boss_web_controller. >>> erl"},{line,297}]},{boss_web_controller,execute_action_ >>> inner,9,[{file,"src/boss/boss_web_controller.erl"},{line, >>> 276}]},{boss_web_controller_handle_request,process_ >>> dynamic_request,5,[{file,"src/boss/boss_web_controller_ >>> handle_request.erl"},{line,255}]}] >>> >>> 14:19:13.797 [error] "Error in controller, see console.log for details\n" >>> >>> >>> Thanks, >>> >>> Mulianto >>> >>> On Friday, October 28, 2016 at 3:36:31 PM UTC+8, TX wrote: >>>> >>>> Hi Mulianto, >>>> >>>> The error message should have tell you the reason, if you are not sure, >>>> kindly e-mail us the error message and we will then try to figure out. >>>> >>>> >>>> ------------------ 原始邮件 ------------------ >>>> *发件人:* "Phang Mulianto";<brav...@gmail.com>; >>>> *发送时间:* 2016年10月28日(星期五) 下午2:23 >>>> *收件人:* "ChicagoBoss"<chicagoboss@googlegroups.com>; >>>> *主题:* [chicagoboss] Evening with erlang tutorial >>>> >>>> Hi, >>>> >>>> i try the tutorial, and stuck in the saving data part, which is the >>>> register voter. After save data it suppose redirect, but got error 500. >>>> >>>> here my code as in the tutorial : >>>> >>>> register('POST', [], WardBoss) -> >>>> NewVoter = voter:new(id, Req:post_param("first_name"), >>>> Req:post_param("last_name"), >>>> Req:post_param("address"), Req:post_param("notes"), >>>> WardBoss:id()), >>>> case NewVoter:save() of >>>> {ok, SavedVoter} -> >>>> {redirect, "/voter/view/"++SavedVoter:id()}; >>>> %{redirect, [{action, "list"}]}; >>>> %{ok, [{voter, "ab"}]}; >>>> {error, Errors} -> >>>> {ok, [{errors, Errors}, {voter, NewVoter}]} >>>> end. >>>> >>>> i try with other way of redirect which documented, but all the same. >>>> any direction ? >>>> >>>> my erlang instaled on debian 8.1: >>>> >>>> Erlang/OTP 17 [erts-6.4.1] [source] [64-bit] [smp:4:4] >>>> [async-threads:10] [kernel-poll:false] >>>> >>>> Eshell V6.4.1 (abort with ^G) >>>> >>>> >>>> >>>> Thanks, >>>> >>>> Mulianto >>>> >>>> -- >>>> 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 chicagoboss...@googlegroups.com. >>>> Visit this group at https://groups.google.com/group/chicagoboss. >>>> To view this discussion on the web visit https://groups.google.com/d/ms >>>> gid/chicagoboss/96545761-e418-4a06-b162-93be8cd1dfa1%40googlegroups.com >>>> <https://groups.google.com/d/msgid/chicagoboss/96545761-e418-4a06-b162-93be8cd1dfa1%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 chicagoboss...@googlegroups.com. >>> Visit this group at https://groups.google.com/group/chicagoboss. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/chicagoboss/08b77c0c-093b-4214-8b10-cc8a556bc54c%40googlegroups.com >>> <https://groups.google.com/d/msgid/chicagoboss/08b77c0c-093b-4214-8b10-cc8a556bc54c%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 chicagoboss+unsubscr...@googlegroups.com. > Visit this group at https://groups.google.com/group/chicagoboss. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/chicagoboss/3f1447de-24a9-4c1e-ae6a-48f25098b763%40googlegroups.com > <https://groups.google.com/d/msgid/chicagoboss/3f1447de-24a9-4c1e-ae6a-48f25098b763%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 chicagoboss+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/chicagoboss. To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CAPTXyXe6GHphWff6OMq0S7XYgo7JM3775kSKn2sthS1Gtxx13Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.