Erlang Mailing Lists

Author Message

<  Erlyweb mailing list  ~  music tutorial not working

Guest
Posted: Tue Feb 12, 2008 2:02 pm Reply with quote
Guest
Hi,

I am getting the following error when trying to access the music app:

ERROR erlang code crashed:
File: appmod:0
Reason: {no_application_data,"Did you forget to call
erlyweb:compile(AppDir) or add the app's previously compiled .beam
files to the Erlang code path?"}
Req: {http_request,'GET',{abs_path,"/music"},{1,1}}

Here's what I'm doing:

# erl
Erlang (BEAM) emulator version 5.5.5 [source] [64-bit] [async-threads:
0] [kernel-poll:false]

Eshell V5.5.5 (abort with ^G)
1> erlyweb:create_app("music", "/var/erlyweb").
info:erlyweb_util:39: creating "./music"
info:erlyweb_util:39: creating "./music/src"
info:erlyweb_util:39: creating "./music/src/components"
info:erlyweb_util:39: creating "./music/www"
info:erlyweb_util:39: creating "./music/ebin"
info:erlyweb_util:70: creating "./music/src/components/
html_container_view.et"
info:erlyweb_util:70: creating "./music/src/components/
html_container_controller.erl"
info:erlyweb_util:70: creating "./music/src/music_app_controller.erl"
info:erlyweb_util:70: creating "./music/www/index.html"
info:erlyweb_util:70: creating "./music/www/style.css"
ok

In yaws.conf:
<server music>
docroot = /var/erlyweb/music/www
listen = 0.0.0.0
appmods = <"/music", erlyweb>
<opaque>
appname = music
</opaque>
</server>

# cd /var/erlyweb/music
# erl
Erlang (BEAM) emulator version 5.5.5 [source] [64-bit] [async-threads:
0] [kernel-poll:false]

Eshell V5.5.5 (abort with ^G)
1> erlyweb:compile("/var/erlyweb/music").
debug:erlyweb_compile:382: Compiling Erlang file
"music_app_controller"
debug:erlyweb_compile:382: Compiling Erlang file
"html_container_controller"
debug:erlyweb_compile:377: Compiling ErlTL file "html_container_view"
{ok,{{2008,2,12},{13,58,52}}}
2>


# yaws -i
[...]


Any ideas what might be wrong?
--~--~---------~--~----~------------~-------~--~----~
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: Wed Feb 13, 2008 6:38 am Reply with quote
Guest
This is a guess, but can you try setting the appmod string to "/"
instead of "/music"? I think there may be a bug in the handling of
appmod strings.

Yariv

On Feb 12, 2008 6:01 AM, Jean-Francois <jf.cron0@gmail.com> wrote:
>
> Hi,
>
> I am getting the following error when trying to access the music app:
>
> ERROR erlang code crashed:
> File: appmod:0
> Reason: {no_application_data,"Did you forget to call
> erlyweb:compile(AppDir) or add the app's previously compiled .beam
> files to the Erlang code path?"}
> Req: {http_request,'GET',{abs_path,"/music"},{1,1}}
>
> Here's what I'm doing:
>
> # erl
> Erlang (BEAM) emulator version 5.5.5 [source] [64-bit] [async-threads:
> 0] [kernel-poll:false]
>
> Eshell V5.5.5 (abort with ^G)
> 1> erlyweb:create_app("music", "/var/erlyweb").
> info:erlyweb_util:39: creating "./music"
> info:erlyweb_util:39: creating "./music/src"
> info:erlyweb_util:39: creating "./music/src/components"
> info:erlyweb_util:39: creating "./music/www"
> info:erlyweb_util:39: creating "./music/ebin"
> info:erlyweb_util:70: creating "./music/src/components/
> html_container_view.et"
> info:erlyweb_util:70: creating "./music/src/components/
> html_container_controller.erl"
> info:erlyweb_util:70: creating "./music/src/music_app_controller.erl"
> info:erlyweb_util:70: creating "./music/www/index.html"
> info:erlyweb_util:70: creating "./music/www/style.css"
> ok
>
> In yaws.conf:
> <server music>
> docroot = /var/erlyweb/music/www
> listen = 0.0.0.0
> appmods = <"/music", erlyweb>
> <opaque>
> appname = music
> </opaque>
> </server>
>
> # cd /var/erlyweb/music
> # erl
> Erlang (BEAM) emulator version 5.5.5 [source] [64-bit] [async-threads:
> 0] [kernel-poll:false]
>
> Eshell V5.5.5 (abort with ^G)
> 1> erlyweb:compile("/var/erlyweb/music").
> debug:erlyweb_compile:382: Compiling Erlang file
> "music_app_controller"
> debug:erlyweb_compile:382: Compiling Erlang file
> "html_container_controller"
> debug:erlyweb_compile:377: Compiling ErlTL file "html_container_view"
> {ok,{{2008,2,12},{13,58,52}}}
> 2>
>
>
> # yaws -i
> [...]
>
>
> Any ideas what might be wrong?
> >
>

--~--~---------~--~----~------------~-------~--~----~
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

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