tags:

views:

122

answers:

2

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>
+1  A: 

That error looks like the erlyweb:out function is not in the code:path.

Possible causes?

  • ErlyWeb is not in the codepath that yaws is using.
  • erlyweb is not compiled so even though the source code is in the path the .beam files aren't so yaws can't load the module.

Short of looking at your system I'm afraid that's all I can tell you.

Jeremy Wall
erlyweb is compiled. How can I ensure that erlyweb is in the code path yaws is using? is there a config I can set somewhere?
Damian
A: 

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.

Damian
also remember to start erlydb from the yaws process. Hooray, I have my first erlyweb application up and running.
Damian