[99s-extend] Getting started error: behaviour cowboy_http_handler undefined

Loïc Hoguin essen at ninenines.eu
Wed Mar 12 23:57:16 CET 2014


Can you try again after running "unset ERL_LIBS"?

On 03/12/2014 11:51 PM, lloyd at writersglen.com wrote:
> Hi Loïc,
>
> Thanks for help.
>
> I'm running cowboy master from GitHub and Erlang R16B02.
>
> $ echo $ERL_LIBS
>
> ...gives me a directory that no longer exists; don't know how it got there, what it should be, or how to change it.
>
> E.g.: /home/lloyd/Programming/Erlang/zippity/apps
>
> I've looked in .erlang and tried $ export ERL_LIBS=<my path to hello_erlang/ebin>.
>
> Thanks again,
>
> LRP
>
> -----Original Message-----
> From: "Loïc Hoguin" <essen at ninenines.eu>
> Sent: Monday, March 10, 2014 4:36pm
> To: lloyd at writersglen.com, extend at lists.ninenines.eu
> Subject: Re: [99s-extend] Getting started error: behaviour cowboy_http_handler undefined
>
> Try updating Erlang or Cowboy, this isn't the first time this happens
> and I fixed something at some point.
>
> Also see if you have ERL_LIBS already defined, in which case there might
> be a bug in Cowboy.
>
> On 03/10/2014 08:44 PM, lloyd at writersglen.com wrote:
>> Hello,
>>
>> I've slavishly emulated the "Getting started" example in the guide:
>>
>> http://ninenines.eu/docs/en/cowboy/HEAD/guide/getting_started/
>>
>> But, when I compile I get this error:
>>
>> yada yada
>>    ERLC   hello_erlang_app.erl hello_handler.erl hello_erlang_sup.erl
>> compile: warnings being treated as errors
>> src/hello_handler.erl:2: behaviour cowboy_http_handler undefined
>> make: *** [ebin/hello_erlang.app] Error 1
>>
>> Cowboy seems to be correctly loaded and compiled as a dependency. I can see .../cowboy/ebin/cowboy_http_handler.beam
>>
>> However, when I remove the line -behavior(cowboy_http_handler) from hello_handler.erl, system compiles and creates release just fine.
>>
>> % -behavior(cowboy_http_handler).
>>
>> Could this be a bug in Getting started or some dunder-headed thing on my end?
>>
>> Thanks,
>>
>> LRP
>>
>>
>> *********************************************
>> My books:
>>
>> THE GOSPEL OF ASHES
>> http://thegospelofashes.com
>>
>> Strength is not enough. Do they have the courage
>> and the cunning? Can they survive long enough to
>> save the lives of millions?
>>
>> FREEIN' PANCHO
>> http://freeinpancho.com
>>
>> A community of misfits help a troubled boy find his way
>>
>> AYA TAKEO
>> http://ayatakeo.com
>>
>> Star-crossed love, war and power in an alternative
>> universe
>>
>> Available through Amazon or by request from your
>> favorite bookstore
>>
>>
>> **********************************************
>>
>> _______________________________________________
>> Extend mailing list
>> Extend at lists.ninenines.eu
>> https://lists.ninenines.eu/listinfo/extend
>>
>

-- 
Loïc Hoguin
http://ninenines.eu



More information about the Extend mailing list