First run error.

33 views
Skip to first unread message

Pranaya Behera

unread,
Jun 29, 2014, 1:11:56 PM6/29/14
to chica...@googlegroups.com
Hello , 
           I am new to erlang and chicagoboss as well. I have installed both and made one project. I have installed Chicagoboss from the git master not on a stable branch though . In controllers dir i created appname_application.controller.erl and I tried the hello world example from the documentation section. When I go to the localhost:8001/application/hello it gives me the view file for hello isn't defined. Isn't it supposed to show me hello world directly if I am directly sending data to the browser. 

appname_application_controller.erl
-module(ntw_application, [Req]).
-compile(export_all).

hello('GET', []) ->
    {json, [{application, "Hello, world!"}]}.


Browser error:
The requested template ("src/view/application/hello.{dtl,html,txt,js,jade,eex}") was not found. If you controller did not run, check that it was exported Additionally, no handler was found for processing 404 errors. You probably want to modify /home/shafox/Sandbox/appname/priv/ntw.routes to prevent errors like this one.

Jesse Gumm

unread,
Jun 29, 2014, 1:17:22 PM6/29/14
to chica...@googlegroups.com
My initial thought is that erlang doesn't usually like if the filename
and the module name aren't the same.

Try changing to -module(appname_application_controller, [Req]).

-Jesse
> --
> 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 http://groups.google.com/group/chicagoboss.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/chicagoboss/3b5e15bb-3050-4ae2-bdb2-3437b9a4dfff%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Pranaya Behera

unread,
Jun 29, 2014, 1:29:24 PM6/29/14
to chica...@googlegroups.com
Hello Jesse,
                     Thank you . That was the issue.

Jesse Gumm

unread,
Jun 29, 2014, 1:47:27 PM6/29/14
to chica...@googlegroups.com

Great. Happy hacking!

--
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 chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
Reply all
Reply to author
Forward
0 new messages