| Author |
Message |
< Erlyweb mailing list ~ Erlyweb 'music' tutorial results in badrecord crash |
| Guest |
Posted: Fri Oct 12, 2007 8:25 pm |
|
|
|
Guest
|
Greetings. I'm a new user trying to get my head around the ErlyWeb
(0.6.2) framework, as it sounds like exactly the elegant development
environment that I've been looking for.
After reading the replies to someone else with a similar problem, I've
upgraded to the latest Erlang (R11B-5) and YAWS 1.73. I'm barely
competent doing Linux program installs, so deviating from the regular
distribution and installing these was a bit daunting for me (I'm not
100% sure it's all perfect, but it does seem to all work now)
I'm able to get partway through Yariv's tutorial:
yaws -i
>erlyweb:create_app("music", "/home/richard/apps").
info:erlyweb_util:39: creating "/home/richard/apps/music"
info:erlyweb_util:39: creating "/home/richard/apps/music/src"
info:erlyweb_util:39: creating "/home/richard/apps/music/src/
components"
info:erlyweb_util:39: creating "/home/richard/apps/music/www"
info:erlyweb_util:39: creating "/home/richard/apps/music/ebin"
info:erlyweb_util:70: creating "/home/richard/apps/music/src/
components/html_container_view.et"
info:erlyweb_util:70: creating "/home/richard/apps/music/src/
components/html_container_controller.erl"
info:erlyweb_util:70: creating "/home/richard/apps/music/src/
music_app_controller.erl"
info:erlyweb_util:70: creating "/home/richard/apps/music/www/
index.html"
info:erlyweb_util:70: creating "/home/richard/apps/music/www/
style.css"
Notice I didn't get a '/apps/music/src/music_app_view.et' file. I
don't know if this means anything.
I edit the yaws.conf file:
<server flere-imsaho>
port = 80
listen = 0.0.0.0
docroot = /home/richard/apps/music/www
appmods = <"/music", erlyweb>
<opaque>
appname = music
</opaque>
</server>
{note, I've tried putting the "/music" within quotes and without.}
Finally, I do a >yaws:restart().
I get the "Welcome to 'music', your new ErlyWeb app." screen if I
browse http://localhost
However if I use http://localhost/music, like in the example, it
crashes with:
ERROR erlang code crashed:
File: appmod:0
Reason: {{badrecord,arg},
[{yaws_arg,opaque,1},
{erlyweb,get_app_name,1},
{erlyweb,out,1},
{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,"/music"},{1,1}}
Can someone help me get over this hurdle?
Much appreciated,
Richard
--~--~---------~--~----~------------~-------~--~----~
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 |
|
|
| Back to top |
|
| Guest |
Posted: Fri Oct 12, 2007 9:44 pm |
|
|
|
Guest
|
It looks like the Yaws arg has changed. The Yaws version that's
compatible with ErlyWeb 0.6.2 is Yaws 1.68. If you want to use Yaws
1.73, you would have to build ErlyWeb yourself.
To build ErlyWeb, edit the Emakefile in the ErlyWeb root directory to
make sure the first line points at your Yaws include directory. Then
type 'make'.
Let me know if you encounter more problems.
Yariv
On Oct 12, 1:25 pm, Richard <kf6...@gmail.com> wrote:
> Greetings. I'm a new user trying to get my head around the ErlyWeb
> (0.6.2) framework, as it sounds like exactly the elegant development
> environment that I've been looking for.
>
> After reading the replies to someone else with a similar problem, I've
> upgraded to the latest Erlang (R11B-5) and YAWS 1.73. I'm barely
> competent doing Linux program installs, so deviating from the regular
> distribution and installing these was a bit daunting for me (I'm not
> 100% sure it's all perfect, but it does seem to all work now)
>
> I'm able to get partway through Yariv's tutorial:
> yaws -i>erlyweb:create_app("music", "/home/richard/apps").
>
> info:erlyweb_util:39: creating "/home/richard/apps/music"
> info:erlyweb_util:39: creating "/home/richard/apps/music/src"
> info:erlyweb_util:39: creating "/home/richard/apps/music/src/
> components"
> info:erlyweb_util:39: creating "/home/richard/apps/music/www"
> info:erlyweb_util:39: creating "/home/richard/apps/music/ebin"
> info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> components/html_container_view.et"
> info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> components/html_container_controller.erl"
> info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> music_app_controller.erl"
> info:erlyweb_util:70: creating "/home/richard/apps/music/www/
> index.html"
> info:erlyweb_util:70: creating "/home/richard/apps/music/www/
> style.css"
>
> Notice I didn't get a '/apps/music/src/music_app_view.et' file. I
> don't know if this means anything.
>
> I edit the yaws.conf file:
> <server flere-imsaho>
> port = 80
> listen = 0.0.0.0
> docroot = /home/richard/apps/music/www
> appmods = <"/music", erlyweb>
> <opaque>
> appname = music
> </opaque>
> </server>
>
> {note, I've tried putting the "/music" within quotes and without.}
> Finally, I do a >yaws:restart().
>
> I get the "Welcome to 'music', your new ErlyWeb app." screen if I
> browsehttp://localhost
> However if I usehttp://localhost/music, like in the example, it
> crashes with:
> ERROR erlang code crashed:
> File: appmod:0
> Reason: {{badrecord,arg},
> [{yaws_arg,opaque,1},
> {erlyweb,get_app_name,1},
> {erlyweb,out,1},
> {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,"/music"},{1,1}}
>
> Can someone help me get over this hurdle?
>
> Much appreciated,
> Richard
--~--~---------~--~----~------------~-------~--~----~
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 |
|
|
| Back to top |
|
| Guest |
Posted: Sat Oct 13, 2007 8:33 am |
|
|
|
Guest
|
Yariv,
I tried this, but the error message stayed the same. So I installed
Yaws-1.68 instead of 1.73. Now, I'm reaching the same step, but
getting a different error:
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}}
All my erlyweb .beam files are in /var/yaws/ebin, and there is a line
in yaws.conf that includes that path:
ebin_dir = /var/yaws/ebin
Thanks,
Richard
On Oct 12, 2:43 pm, Yariv Sadan <yarivsa...@gmail.com> wrote:
> It looks like the Yaws arg has changed. The Yaws version that's
> compatible with ErlyWeb 0.6.2 is Yaws 1.68. If you want to use Yaws
> 1.73, you would have to build ErlyWeb yourself.
>
> To build ErlyWeb, edit the Emakefile in the ErlyWeb root directory to
> make sure the first line points at your Yaws include directory. Then
> type 'make'.
>
> Let me know if you encounter more problems.
>
> Yariv
>
> On Oct 12, 1:25 pm, Richard <kf6...@gmail.com> wrote:
>
> > Greetings. I'm a new user trying to get my head around the ErlyWeb
> > (0.6.2) framework, as it sounds like exactly the elegant development
> > environment that I've been looking for.
>
> > After reading the replies to someone else with a similar problem, I've
> > upgraded to the latest Erlang (R11B-5) and YAWS 1.73. I'm barely
> > competent doing Linux program installs, so deviating from the regular
> > distribution and installing these was a bit daunting for me (I'm not
> > 100% sure it's all perfect, but it does seem to all work now)
>
> > I'm able to get partway through Yariv's tutorial:
> > yaws -i>erlyweb:create_app("music", "/home/richard/apps").
>
> > info:erlyweb_util:39: creating "/home/richard/apps/music"
> > info:erlyweb_util:39: creating "/home/richard/apps/music/src"
> > info:erlyweb_util:39: creating "/home/richard/apps/music/src/
> > components"
> > info:erlyweb_util:39: creating "/home/richard/apps/music/www"
> > info:erlyweb_util:39: creating "/home/richard/apps/music/ebin"
> > info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> > components/html_container_view.et"
> > info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> > components/html_container_controller.erl"
> > info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> > music_app_controller.erl"
> > info:erlyweb_util:70: creating "/home/richard/apps/music/www/
> > index.html"
> > info:erlyweb_util:70: creating "/home/richard/apps/music/www/
> > style.css"
>
> > Notice I didn't get a '/apps/music/src/music_app_view.et' file. I
> > don't know if this means anything.
>
> > I edit the yaws.conf file:
> > <server flere-imsaho>
> > port = 80
> > listen = 0.0.0.0
> > docroot = /home/richard/apps/music/www
> > appmods = <"/music", erlyweb>
> > <opaque>
> > appname = music
> > </opaque>
> > </server>
>
> > {note, I've tried putting the "/music" within quotes and without.}
> > Finally, I do a >yaws:restart().
>
> > I get the "Welcome to 'music', your new ErlyWeb app." screen if I
> > browsehttp://localhost
> > However if I usehttp://localhost/music, like in the example, it
> > crashes with:
> > ERROR erlang code crashed:
> > File: appmod:0
> > Reason: {{badrecord,arg},
> > [{yaws_arg,opaque,1},
> > {erlyweb,get_app_name,1},
> > {erlyweb,out,1},
> > {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,"/music"},{1,1}}
>
> > Can someone help me get over this hurdle?
>
> > Much appreciated,
> > Richard
--~--~---------~--~----~------------~-------~--~----~
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 |
|
|
| Back to top |
|
| Guest |
Posted: Sun Oct 14, 2007 5:53 am |
|
|
|
Guest
|
It sounds like maybe you didn't add the ebin directory to your class
path, or you didn't recompile the app from Yaws once you restarted
yaws. There are 3 options:
- Start yaws with the -pa argument pointing at your ebin path.
- Start yaws in interactive mode and then call code:add_path() with
your ebin path.
- Start yaws in interactive mode and recompile your app with erlyweb:compile().
Yariv
On 10/13/07, Richard <kf6oak@gmail.com> wrote:
>
> Yariv,
>
> I tried this, but the error message stayed the same. So I installed
> Yaws-1.68 instead of 1.73. Now, I'm reaching the same step, but
> getting a different error:
>
> 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}}
>
> All my erlyweb .beam files are in /var/yaws/ebin, and there is a line
> in yaws.conf that includes that path:
> ebin_dir = /var/yaws/ebin
>
>
> Thanks,
> Richard
>
> On Oct 12, 2:43 pm, Yariv Sadan <yarivsa...@gmail.com> wrote:
> > It looks like the Yaws arg has changed. The Yaws version that's
> > compatible with ErlyWeb 0.6.2 is Yaws 1.68. If you want to use Yaws
> > 1.73, you would have to build ErlyWeb yourself.
> >
> > To build ErlyWeb, edit the Emakefile in the ErlyWeb root directory to
> > make sure the first line points at your Yaws include directory. Then
> > type 'make'.
> >
> > Let me know if you encounter more problems.
> >
> > Yariv
> >
> > On Oct 12, 1:25 pm, Richard <kf6...@gmail.com> wrote:
> >
> > > Greetings. I'm a new user trying to get my head around the ErlyWeb
> > > (0.6.2) framework, as it sounds like exactly the elegant development
> > > environment that I've been looking for.
> >
> > > After reading the replies to someone else with a similar problem, I've
> > > upgraded to the latest Erlang (R11B-5) and YAWS 1.73. I'm barely
> > > competent doing Linux program installs, so deviating from the regular
> > > distribution and installing these was a bit daunting for me (I'm not
> > > 100% sure it's all perfect, but it does seem to all work now)
> >
> > > I'm able to get partway through Yariv's tutorial:
> > > yaws -i>erlyweb:create_app("music", "/home/richard/apps").
> >
> > > info:erlyweb_util:39: creating "/home/richard/apps/music"
> > > info:erlyweb_util:39: creating "/home/richard/apps/music/src"
> > > info:erlyweb_util:39: creating "/home/richard/apps/music/src/
> > > components"
> > > info:erlyweb_util:39: creating "/home/richard/apps/music/www"
> > > info:erlyweb_util:39: creating "/home/richard/apps/music/ebin"
> > > info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> > > components/html_container_view.et"
> > > info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> > > components/html_container_controller.erl"
> > > info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> > > music_app_controller.erl"
> > > info:erlyweb_util:70: creating "/home/richard/apps/music/www/
> > > index.html"
> > > info:erlyweb_util:70: creating "/home/richard/apps/music/www/
> > > style.css"
> >
> > > Notice I didn't get a '/apps/music/src/music_app_view.et' file. I
> > > don't know if this means anything.
> >
> > > I edit the yaws.conf file:
> > > <server flere-imsaho>
> > > port = 80
> > > listen = 0.0.0.0
> > > docroot = /home/richard/apps/music/www
> > > appmods = <"/music", erlyweb>
> > > <opaque>
> > > appname = music
> > > </opaque>
> > > </server>
> >
> > > {note, I've tried putting the "/music" within quotes and without.}
> > > Finally, I do a >yaws:restart().
> >
> > > I get the "Welcome to 'music', your new ErlyWeb app." screen if I
> > > browsehttp://localhost
> > > However if I usehttp://localhost/music, like in the example, it
> > > crashes with:
> > > ERROR erlang code crashed:
> > > File: appmod:0
> > > Reason: {{badrecord,arg},
> > > [{yaws_arg,opaque,1},
> > > {erlyweb,get_app_name,1},
> > > {erlyweb,out,1},
> > > {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,"/music"},{1,1}}
> >
> > > Can someone help me get over this hurdle?
> >
> > > Much appreciated,
> > > Richard
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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 |
|
|
| Back to top |
|
| Guest |
Posted: Sun Oct 14, 2007 7:39 am |
|
|
|
Guest
|
These steps worked for me. I'm looking at John, Paul, George and
Ringo. Very nice.
Richard
On Oct 13, 10:53 pm, "Yariv Sadan" <yarivsa...@gmail.com> wrote:
> It sounds like maybe you didn't add the ebin directory to your class
> path, or you didn't recompile the app from Yaws once you restarted
> yaws. There are 3 options:
>
> - Start yaws with the -pa argument pointing at your ebin path.
> - Start yaws in interactive mode and then call code:add_path() with
> your ebin path.
> - Start yaws in interactive mode and recompile your app with erlyweb:compile().
>
> Yariv
>
> On 10/13/07, Richard <kf6...@gmail.com> wrote:
>
>
>
> > Yariv,
>
> > I tried this, but the error message stayed the same. So I installed
> > Yaws-1.68 instead of 1.73. Now, I'm reaching the same step, but
> > getting a different error:
>
> > 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}}
>
> > All my erlyweb .beam files are in /var/yaws/ebin, and there is a line
> > in yaws.conf that includes that path:
> > ebin_dir = /var/yaws/ebin
>
> > Thanks,
> > Richard
>
> > On Oct 12, 2:43 pm, Yariv Sadan <yarivsa...@gmail.com> wrote:
> > > It looks like the Yaws arg has changed. The Yaws version that's
> > > compatible with ErlyWeb 0.6.2 is Yaws 1.68. If you want to use Yaws
> > > 1.73, you would have to build ErlyWeb yourself.
>
> > > To build ErlyWeb, edit the Emakefile in the ErlyWeb root directory to
> > > make sure the first line points at your Yaws include directory. Then
> > > type 'make'.
>
> > > Let me know if you encounter more problems.
>
> > > Yariv
>
> > > On Oct 12, 1:25 pm, Richard <kf6...@gmail.com> wrote:
>
> > > > Greetings. I'm a new user trying to get my head around the ErlyWeb
> > > > (0.6.2) framework, as it sounds like exactly the elegant development
> > > > environment that I've been looking for.
>
> > > > After reading the replies to someone else with a similar problem, I've
> > > > upgraded to the latest Erlang (R11B-5) and YAWS 1.73. I'm barely
> > > > competent doing Linux program installs, so deviating from the regular
> > > > distribution and installing these was a bit daunting for me (I'm not
> > > > 100% sure it's all perfect, but it does seem to all work now)
>
> > > > I'm able to get partway through Yariv's tutorial:
> > > > yaws -i>erlyweb:create_app("music", "/home/richard/apps").
>
> > > > info:erlyweb_util:39: creating "/home/richard/apps/music"
> > > > info:erlyweb_util:39: creating "/home/richard/apps/music/src"
> > > > info:erlyweb_util:39: creating "/home/richard/apps/music/src/
> > > > components"
> > > > info:erlyweb_util:39: creating "/home/richard/apps/music/www"
> > > > info:erlyweb_util:39: creating "/home/richard/apps/music/ebin"
> > > > info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> > > > components/html_container_view.et"
> > > > info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> > > > components/html_container_controller.erl"
> > > > info:erlyweb_util:70: creating "/home/richard/apps/music/src/
> > > > music_app_controller.erl"
> > > > info:erlyweb_util:70: creating "/home/richard/apps/music/www/
> > > > index.html"
> > > > info:erlyweb_util:70: creating "/home/richard/apps/music/www/
> > > > style.css"
>
> > > > Notice I didn't get a '/apps/music/src/music_app_view.et' file. I
> > > > don't know if this means anything.
>
> > > > I edit the yaws.conf file:
> > > > <server flere-imsaho>
> > > > port = 80
> > > > listen = 0.0.0.0
> > > > docroot = /home/richard/apps/music/www
> > > > appmods = <"/music", erlyweb>
> > > > <opaque>
> > > > appname = music
> > > > </opaque>
> > > > </server>
>
> > > > {note, I've tried putting the "/music" within quotes and without.}
> > > > Finally, I do a >yaws:restart().
>
> > > > I get the "Welcome to 'music', your new ErlyWeb app." screen if I
> > > > browsehttp://localhost
> > > > However if I usehttp://localhost/music, like in the example, it
> > > > crashes with:
> > > > ERROR erlang code crashed:
> > > > File: appmod:0
> > > > Reason: {{badrecord,arg},
> > > > [{yaws_arg,opaque,1},
> > > > {erlyweb,get_app_name,1},
> > > > {erlyweb,out,1},
> > > > {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,"/music"},{1,1}}
>
> > > > Can someone help me get over this hurdle?
>
> > > > Much appreciated,
> > > > Richard
--~--~---------~--~----~------------~-------~--~----~
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 |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
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
|
|
|