Erlang Mailing Lists

Author Message

<  Erlyweb mailing list  ~  Curioser and curioser: ErlyWeb 0.7 - strange crash

dmitriid
Posted: Wed Jan 02, 2008 12:10 pm Reply with quote
User Joined: 17 Aug 2006 Posts: 213
> On 12/30/07, Dmitrii Dimandt <dmitriid@gmail.com (dmitriid@gmail.com)> wrote:
>> On 12/30/07, andrewfromfly < oneone@gmail.com (oneone@gmail.com)> wrote:
>> "and navigate to http://localhost:81/, I get erlyweb's welcome screen."
>>
>> you get that because the docroot is www and there is an index.html
>> file in there.
View user's profile Send private message
Guest
Posted: Wed Jan 02, 2008 6:31 pm Reply with quote
Guest
Did you actually call erlyweb:compile() from within the Yaws shell?

On Jan 2, 2008 4:09 AM, Dmitrii Dimandt <dmitriid@gmail.com> wrote:
>
> > On 12/30/07, Dmitrii Dimandt <dmitriid@gmail.com> wrote:
> >> On 12/30/07, andrewfromfly < oneone@gmail.com> wrote:
> >> "and navigate to http://localhost:81/, I get erlyweb's welcome screen."
> >>
> >> you get that because the docroot is www and there is an index.html
> >> file in there. It's just straight up yaws webserver, No Erlyweb is
> >> being called.
> >
> > It's like "doh, should've guessed myself" Smile))))))) Must be the New Year's
> Eve
> > closing in on me Smile
>
> Then I still don't understand why ErlyWeb crashes, because everything is
> ready and set up (or so it seems)
>
> I thought to myself: maybe it's because Erlang can't find the application's
> compiled files? I went ahead and edited yaws.conf:
>
> ebin_dir = /home/dmitriid/data/www/erlyweb/buktu/ebin
>
> Well, erlyweb crashes again, now for a different reason:
>
> ERROR erlang code crashed:
> File: appmod:0
> Reason: {function_clause,[{lists,dropwhile,
> [#Fun,undefined]},
> {erlyweb,get_ewc,2},
> {erlyweb,get_initial_ewc1,2},
> {erlyweb,handle_request,4},
> {yaws_server,deliver_dyn_part,8},
> {yaws_server,aloop,3},
> {yaws_server,acceptor0,2},
> {proc_lib,init_p,5}]}
> Req: {http_request,'GET',{abs_path,"/buktu"},{1,1}}
>
> Smile
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Fri Jan 04, 2008 4:59 am Reply with quote
Guest
I made this example.es script to run the example:

#!/usr/bin/env escript

main(_) ->
erlyweb:create_app("music", "/Users/sites"),

erlyweb:create_component("musician", "/Users/sites/music"),

erlydb:start(mysql, [{hostname, "localhost"}, {username, "monty"},
{password, "some_pass"}, {database, "music"}]),

erlyweb:compile("/Users/sites/music", [{erlydb_driver, mysql}]),

GL = [{ebin_dir, ["/Users/sites/music/ebin"]}],
SL = [{port, 3000},
{appmods, [{"/music", erlyweb}]},
{opaque, [{"appname", music}] }],

yaws:start_embedded( "/Users/sites/music/www", SL, GL ),

timer:sleep(1000000).

Then it's just

$./example.es

and it runs for 1000000 milliseconds or until I hit control-c.

I put yaws-1.74/ebin/* beams in my erlang lib path and 0.7 erlyweb.


On Jan 2, 4:09

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum