Never mind fixed it.  It was a compile issue.

This time, I downloaded the zip, changed the line in rebar.config, and then 
ran make and it worked.

On Saturday, February 8, 2014 7:57:42 PM UTC-8, Cuong Thai wrote:
>
> Hi Hunt,
>
> According to error message, action "heyo" of controller "animal" requires 
> template in view folder. Are you sure in <your app>_animal_controller.erl, 
> heyo function returns ok tag ?
>
> heyo('GET', []) -> {output, "hello world"}. %% Don't miss "
>
>
> Maybe your "heyo" return ok or json tag?
>
> Regards,
> Cuong Th.
>
> On Sunday, February 9, 2014 5:54:29 AM UTC+7, Hunt Graham wrote:
>>
>> Thanks again for the response Cuong.
>>
>> If I put in a route within a controller with the output format ( {output, 
>> "hello world}. ) I get the following error message:
>>
>> The requested template 
>> ("src/view/animal/heyo.{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/hunt/cboss/cb_tut/priv/cb_tut.routes to prevent errors like this one.
>>
>> If I put a view in the appropriate sub directory that view renders but 
>> will not have anything to do with "hello world" placed in the controller.
>>
>>
>>
>> On Friday, February 7, 2014 9:57:38 PM UTC-5, Cuong Thai wrote:
>>>
>>> Hi Hunt Graham,
>>>
>>> 1. With output return, we don't need template for view
>>>
>>> hello('GET', []) ->
>>>>   {output, "<html><head></head><body><div>Hello 
>>>> world!</div></body></html>"}.
>>>
>>>
>>> It already returns template.
>>>
>>> 2. With defined function above, GET request to 
>>> localhost:8001/greeting/hello maps with that unique action "hello" of 
>>> controller "greeting". In tutorial, Evan just shows 3 returned options: 
>>> output, json, ok that CB provides. If you want to test with ok, you should 
>>> add new action:
>>>
>>> salut('GET', []) ->
>>>>   {ok, [{greeting, "Hello, world!"}]}.
>>>
>>>
>>> In this case you should create template view/greeting/salut.dtl (or 
>>> salut.html) with content
>>>
>>> <h1>Hello!</h1>
>>>> {{ greeting }}
>>>
>>>
>>> Now you can open localhost:8001/greeting/salut
>>> Regards,
>>> Cuong Th.
>>>
>>

-- 
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/e821056c-c7c1-458a-a7a9-a4e2d3f26233%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to