Search code examples
erlangyaws

Yaws crashes when I browse to my new erlyweb application


I am following the music application article on Yarivs blog. When I go to http://localhost:8002 I get the index page showing correctlty but if I try to browse to http://localhost:8002/music I get this error(see Pastie), When I browse http://localhost:8002/musician i get page not found, even though I have created the musician component. I am getting the same thing happening with all the erlyweb applications I have tried. Any ideas on where I could be going wrong.

This is my server section of the yaws config.

    <server localhost>
        port = 8002
        listen = 0.0.0.0
        docroot = "C:/Program Files/Yaws-1.84/applications/music/www"
        appmods = <"/music", erlyweb>
        <opaque>
          appname = music
        </opaque>
    </server>

Solution

  • OK I have fixed it. I added the following two lines to my yaws.config file

    ebin_dir = "C:\Program Files\erl5.7.2/lib/erlyweb-0.7.1/ebin"
    ebin_dir = "C:/Program Files/Yaws-1.84/applications/music/ebin"
    

    The first one picks up erlyweb and the second the ebin directory for my application.