Erlang Mailing Lists

Author Message

<  Erlyweb mailing list  ~  newbie question

Guest
Posted: Sat Sep 22, 2007 7:42 pm Reply with quote
Guest
Hello.

I was trying to follow examples in
http://yarivsblog.com/articles/2006/10/27/introducing-erlyweb-the-erlang-twist-on-web-framworks/
and succeeded partially.

My yaws.conf :
--------------------------------------------------
<server localhost>
port = 10080
listen = 0.0.0.0
docroot = /tmp/music/www
appmods = <"/music", erlyweb>
<opaque>
appname = music
</opaque>
</server>
--------------------------------------------------

When I call http://localhost:10080/music I get:
------------------------------------------------------
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}}
--------------------------------------------------------
But at the same time I get correct page (Welcome to 'music'...) if I
call simply
http://localhost:10080/

At first I thought I can live with that, but new troubles appeared
with mysql example. I've done all required steps(start mysql
connection, compile) and have component:
3> music_erlyweb_data:components().
{2,
{"musician",
[{delete,2},{edit,2},{new,1},{list,2},{list,1},{index,1}],
{"html_container",[{index,2}],nil,nil},
nil}}

but i can not reach it in any way.

http://localhost:10080/music/musician leads to
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/musician"},{1,1}}

just http://localhost:10080/musician produces '404 Not Found'.

I'm using Yaws from svn trunk and erlyweb-0.6.2
Any suggestions are appreciated.

Ruslan


--~--~---------~--~----~------------~-------~--~----~
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: Sat Sep 22, 2007 8:28 pm Reply with quote
Guest
Hmm, it's possible Yaws from trunk has a different 'arg' record. Try
building ErlyWeb from source by first modifying the path to Yaws in
erlyweb/Emakefile and then calling 'make' in the erlyweb directory.

Yariv

On 9/22/07, ruslan.spivak@gmail.com <ruslan.spivak@gmail.com> wrote:
>
> Hello.
>
> I was trying to follow examples in
> http://yarivsblog.com/articles/2006/10/27/introducing-erlyweb-the-erlang-twist-on-web-framworks/
> and succeeded partially.
>
> My yaws.conf :
> --------------------------------------------------
> <server localhost>
> port = 10080
> listen = 0.0.0.0
> docroot = /tmp/music/www
> appmods = <"/music", erlyweb>
> <opaque>
> appname = music
> </opaque>
> </server>
> --------------------------------------------------
>
> When I call http://localhost:10080/music I get:
> ------------------------------------------------------
> 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}}
> --------------------------------------------------------
> But at the same time I get correct page (Welcome to 'music'...) if I
> call simply
> http://localhost:10080/
>
> At first I thought I can live with that, but new troubles appeared
> with mysql example. I've done all required steps(start mysql
> connection, compile) and have component:
> 3> music_erlyweb_data:components().
> {2,
> {"musician",
> [{delete,2},{edit,2},{new,1},{list,2},{list,1},{index,1}],
> {"html_container",[{index,2}],nil,nil},
> nil}}
>
> but i can not reach it in any way.
>
> http://localhost:10080/music/musician leads to
> 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/musician"},{1,1}}
>
> just http://localhost:10080/musician produces '404 Not Found'.
>
> I'm using Yaws from svn trunk and erlyweb-0.6.2
> Any suggestions are appreciated.
>
> Ruslan
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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: Sat Sep 22, 2007 10:32 pm Reply with quote
Guest
On Sep 22, 11:28 pm, "Yariv Sadan" <yarivsa...@gmail.com> wrote:
> Hmm, it's possible Yaws from trunk has a different 'arg' record. Try
> building ErlyWeb from source by first modifying the path to Yaws in
> erlyweb/Emakefile and then calling 'make' in the erlyweb directory.
>
Hi, Yariv.

With those steps still http://localhost:10080/ works OK, but i get
following error with
http://localhost:10080/music (before calling /music i also need invoke
erlyweb:compile("/tmp/music"). in yaws's shell as message in browser
indicates):
ERROR erlang code crashed:
File: appmod:0
Reason: {function_clause,[{lists,dropwhile,
[#Fun<erlyweb_util.
3.94515813>,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,"/music"},{1,1}}
------------------------------------------------------------------------------------

BTW, it would be good to have note somewhere in erlyweb about erlang
version dependency.
In previous post i used R11B-2 from FC7 rpm package (just was faster
to start with). For compiling erlyweb trunk I used latest R11B-5 built
from source.

Ruslan


--~--~---------~--~----~------------~-------~--~----~
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: Sat Sep 22, 2007 11:24 pm Reply with quote
Guest
Ugh. I looks like the Yaws trunk code is quite unstable. I recommend
that you use Yaws 1.68 if possible. It looks like the appmoddata field
in the arg has changed in trunk.

Yariv

On 9/22/07, Ruslan Spivak <ruslan.spivak@gmail.com> wrote:
>
>
>
> On Sep 22, 11:28 pm, "Yariv Sadan" <yarivsa...@gmail.com> wrote:
> > Hmm, it's possible Yaws from trunk has a different 'arg' record. Try
> > building ErlyWeb from source by first modifying the path to Yaws in
> > erlyweb/Emakefile and then calling 'make' in the erlyweb directory.
> >
> Hi, Yariv.
>
> With those steps still http://localhost:10080/ works OK, but i get
> following error with
> http://localhost:10080/music (before calling /music i also need invoke
> erlyweb:compile("/tmp/music"). in yaws's shell as message in browser
> indicates):
> ERROR erlang code crashed:
> File: appmod:0
> Reason: {function_clause,[{lists,dropwhile,
> [#Fun<erlyweb_util.
> 3.94515813>,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,"/music"},{1,1}}
> ------------------------------------------------------------------------------------
>
> BTW, it would be good to have note somewhere in erlyweb about erlang
> version dependency.
> In previous post i used R11B-2 from FC7 rpm package (just was faster
> to start with). For compiling erlyweb trunk I used latest R11B-5 built
> from source.
>
> Ruslan
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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: Sun Sep 23, 2007 1:45 pm Reply with quote
Guest
Ok, now it works as expected with Yaws 1.68

Thanks,
Ruslan


--~--~---------~--~----~------------~-------~--~----~
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
wuji
Posted: Tue Sep 04, 2012 7:08 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
all stay?'" Denniston said.The team agreed."I love swimming under Dave, Dave, replica designer *beep* Dave, and I think he is a good fit," said
Kamber, a member of the Paralympics swimming team. "He understands understands [h2]cheap jordans[/h2] understands each of our training needs."Recently, Denniston was announced as
head coach of the 2012 Paralympic Resident Swim team in in [h4]cheap polo shirts[/h4] in Colorado Springs -- the same position his mentor Flowers
before him.Denniston said that if he had to sum up up [h2]replica designer *beep*[/h2] up his experiences since his 2005 accident in a single
View user's profile Send private message

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