Erlang Mailing Lists

Author Message

<  Erlyweb mailing list  ~  postgres configuration with erlyweb

Guest
Posted: Sat May 10, 2008 10:50 am Reply with quote
Guest
Hi all,
I tried to get the 'blog tutorial' to work with postgres and have
been unsuccessful getting it to work.
I followed the instructions on the link below and tried to get
the app to run but the compilation is failing.
http://translate.google.com/translate?u=http%3A%2F%2Fwww.cestari.info%2F2007%2F7%2F25%2Ferlyweb-et-postgres&hl=en&ie=UTF8&sl=fr&tl=en

As per the instructions mentioned in the link above, I have placed the
start.erl in the root directory of the application.

start.erl looks like this
---------------------------------

-module (start).
-export([boot/0, boot/1]).
-define(P, "/home/abhi/blog/").

boot() ->
boot(true).
boot(false) ->
compile();
boot(true) ->
pgsql_start(),
compile().
pgsql_start() ->
code:add_pathz(?P ++ "/ebin"),
application:start(psql),
erlydb:start(psql).
compile() ->
erlyweb:compile(?P, [{erlydb_driver, psql}]).


This is the error the app throws when I compile it in yaws REPL

command: start:boot().
error =>

debug:erlyweb_compile:382: Compiling Erlang file "blog_app_controller"
debug:erlyweb_compile:382: Compiling Erlang file "category"
debug:erlyweb_compile:382: Compiling Erlang file "entry_controller"
/home/abhi/blog/src/components/entry_controller.erl:8: Warning:
variable 'A' is unused
/home/abhi/blog/src/components/entry_controller.erl:18: Warning:
variable 'A' is unused
debug:erlyweb_compile:382: Compiling Erlang file "category_controller"
/home/abhi/blog/src/components/category_controller.erl:12: Warning:
variable 'A' is unused
debug:erlyweb_compile:382: Compiling Erlang file "entry"
debug:erlyweb_compile:114: Generating ErlyDB code for models:
"entry.erl category.erl "
** exception exit: {noproc,{gen_server,call,[psql_pool,
{ref,<0.36.0>}]}}
in function gen_server:call/2
in call from psql_pool:alloc/1
in call from erlydb_psql:get_metadata/1
in call from erlydb:'-code_gen/4-fun-2-'/4
in call from lists:foldl/3
in call from erlydb:'-code_gen/4-fun-3-'/3
in call from lists:foldl/3
in call from erlydb:code_gen/4

Here are the details of the environment
--------------------------------------------------------
OS => sabayon linux
Erlang emulator version => 5.6.1
yaws version => 1.58
erlyweb => 0.7

I would really appreciate it if somebody can point me to resources or
help me configure erlyweb working with postgres and/or Mnesia
( Preferably both :-> ).


Thank You
Abhijith

--~--~---------~--~----~------------~-------~--~----~
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 received from mailinglist
Guest
Posted: Wed May 14, 2008 6:09 am Reply with quote
Guest
Looks like you haven't started your psql application. Try calling
application:start(psql).

On Sat, May 10, 2008 at 3:50 AM, Abhijith <abhijithg@gmail.com> wrote:
>
> Hi all,
> I tried to get the 'blog tutorial' to work with postgres and have
> been unsuccessful getting it to work.
> I followed the instructions on the link below and tried to get
> the app to run but the compilation is failing.
> http://translate.google.com/translate?u=http%3A%2F%2Fwww.cestari.info%2F2007%2F7%2F25%2Ferlyweb-et-postgres&hl=en&ie=UTF8&sl=fr&tl=en
>
> As per the instructions mentioned in the link above, I have placed the
> start.erl in the root directory of the application.
>
> start.erl looks like this
> ---------------------------------
>
> -module (start).
> -export([boot/0, boot/1]).
> -define(P, "/home/abhi/blog/").
>
> boot() ->
> boot(true).
> boot(false) ->
> compile();
> boot(true) ->
> pgsql_start(),
> compile().
> pgsql_start() ->
> code:add_pathz(?P ++ "/ebin"),
> application:start(psql),
> erlydb:start(psql).
> compile() ->
> erlyweb:compile(?P, [{erlydb_driver, psql}]).
>
>
> This is the error the app throws when I compile it in yaws REPL
>
> command: start:boot().
> error =>
>
> debug:erlyweb_compile:382: Compiling Erlang file "blog_app_controller"
> debug:erlyweb_compile:382: Compiling Erlang file "category"
> debug:erlyweb_compile:382: Compiling Erlang file "entry_controller"
> /home/abhi/blog/src/components/entry_controller.erl:8: Warning:
> variable 'A' is unused
> /home/abhi/blog/src/components/entry_controller.erl:18: Warning:
> variable 'A' is unused
> debug:erlyweb_compile:382: Compiling Erlang file "category_controller"
> /home/abhi/blog/src/components/category_controller.erl:12: Warning:
> variable 'A' is unused
> debug:erlyweb_compile:382: Compiling Erlang file "entry"
> debug:erlyweb_compile:114: Generating ErlyDB code for models:
> "entry.erl category.erl "
> ** exception exit: {noproc,{gen_server,call,[psql_pool,
> {ref,<0.36.0>}]}}
> in function gen_server:call/2
> in call from psql_pool:alloc/1
> in call from erlydb_psql:get_metadata/1
> in call from erlydb:'-code_gen/4-fun-2-'/4
> in call from lists:foldl/3
> in call from erlydb:'-code_gen/4-fun-3-'/3
> in call from lists:foldl/3
> in call from erlydb:code_gen/4
>
> Here are the details of the environment
> --------------------------------------------------------
> OS => sabayon linux
> Erlang emulator version => 5.6.1
> yaws version => 1.58
> erlyweb => 0.7
>
> I would really appreciate it if somebody can point me to resources or
> help me configure erlyweb working with postgres and/or Mnesia
> ( Preferably both :-> ).
>
>
> Thank You
> Abhijith
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 received from mailinglist
Guest
Posted: Wed May 14, 2008 7:37 pm Reply with quote
Guest
Hi Yariv,
Guest
Posted: Thu May 15, 2008 7:51 am Reply with quote
Guest
I had made a typo in pg_hba.conf. I corrected this with the help of
ketralnis (David King I presume) on #erlyweb yesterday. The error that
I mentioned went away, but now its application:start(psql) just stalls
when I run it. I ran yaws in debug mode and it dumped this error when
I ran application:start(psql).

=PROGRESS REPORT==== 15-May-2008::12:46:35 ===
supervisor: {local,yaws_sup}
started: [{pid,<0.48.0>},
{name,yaws_server},
{mfa,
{yaws_server,start_link,

[{env,true,false,false,false,false,false}]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]

=PROGRESS REPORT==== 15-May-2008::12:46:35 ===
supervisor: {local,yaws_sup}
started: [{pid,<0.56.0>},
{name,yaws_session_server},
{mfa,{yaws_session_server,start_link,[]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]

=PROGRESS REPORT==== 15-May-2008::12:46:35 ===
application: yaws
started_at: nonode@nohost

can anyone see what the problem is?
--~--~---------~--~----~------------~-------~--~----~
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 received from mailinglist
ketralnis
Posted: Thu May 15, 2008 2:29 pm Reply with quote
User Joined: 20 Jul 2007 Posts: 151 Location: San Francisco, CA
Let's see pg_hba.conf, psql.app, and double-check that postgresql.conf
has listen_addresses

On 15 May 2008, at 00:50, Abhijith wrote:

>
> I had made a typo in pg_hba.conf. I corrected this with the help of
> ketralnis (David King I presume) on #erlyweb yesterday. The error that
> I mentioned went away, but now its application:start(psql) just stalls
> when I run it. I ran yaws in debug mode and it dumped this error when
> I ran application:start(psql).
>
> =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
> supervisor: {local,yaws_sup}
> started: [{pid,<0.48.0>},
> {name,yaws_server},
> {mfa,
> {yaws_server,start_link,
>
> [{env,true,false,false,false,false,false}]}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
> supervisor: {local,yaws_sup}
> started: [{pid,<0.56.0>},
> {name,yaws_session_server},
> {mfa,{yaws_session_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
> application: yaws
> started_at: nonode@nohost
>
> can anyone see what the problem is?
>

--~--~---------~--~----~------------~-------~--~----~
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 received from mailinglist
View user's profile Send private message AIM Address
Guest
Posted: Thu May 15, 2008 4:01 pm Reply with quote
Guest
Hi David,
I found the problem and fixed it. Apparently, the order in which
the rules are specified in hba.conf matters. There was another rule in
hba.conf which was over-riding the rule that I set at the end of
hba.conf. The application seems to be loading up properly now. ie., I
can see the default page when I point the browser to localhost.

That said, I have one more issue. I wanted to try out the calls
mentioned in the tutorial so I tried this":
> category:new(<<"Cheer">>, <<"Kermit shouts: Applause, Applause,
Applause!">>).

This threw an error saying that 'new' is undefined. I did a tab-
complete in yaws repl and only functions ( and there were only 3
functions) that category module was associated with were module_info,
relations (defined in category.erl) and one more function which I
cannot remember, but was definitely not "category:new/arity".

What am I doing wrong?


On May 15, 7:26 pm, David King <dk...@ketralnis.com> wrote:
> Let's see pg_hba.conf, psql.app, and double-check that postgresql.conf
> has listen_addresses
>
> On 15 May 2008, at 00:50, Abhijith wrote:
>
>
>
> > I had made a typo in pg_hba.conf. I corrected this with the help of
> > ketralnis (David King I presume) on #erlyweb yesterday. The error that
> > I mentioned went away, but now its application:start(psql) just stalls
> > when I run it. I ran yaws in debug mode and it dumped this error when
> > I ran application:start(psql).
>
> > =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
> > supervisor: {local,yaws_sup}
> > started: [{pid,<0.48.0>},
> > {name,yaws_server},
> > {mfa,
> > {yaws_server,start_link,
>
> > [{env,true,false,false,false,false,false}]}},
> > {restart_type,permanent},
> > {shutdown,5000},
> > {child_type,worker}]
>
> > =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
> > supervisor: {local,yaws_sup}
> > started: [{pid,<0.56.0>},
> > {name,yaws_session_server},
> > {mfa,{yaws_session_server,start_link,[]}},
> > {restart_type,permanent},
> > {shutdown,5000},
> > {child_type,worker}]
>
> > =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
> > application: yaws
> > started_at: nonode@nohost
>
> > can anyone see what the problem is?
--~--~---------~--~----~------------~-------~--~----~
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 received from mailinglist
ketralnis
Posted: Thu May 15, 2008 5:50 pm Reply with quote
User Joined: 20 Jul 2007 Posts: 151 Location: San Francisco, CA
> This threw an error saying that 'new' is undefined. I did a tab-
> complete in yaws repl and only functions ( and there were only 3
> functions) that category module was associated with were module_info,
> relations (defined in category.erl) and one more function which I
> cannot remember, but was definitely not "category:new/arity".
> What am I doing wrong?

You're not compiling the module with erlyweb:compile/2, you're
compiling it by hand

>
>
>
> On May 15, 7:26 pm, David King <dk...@ketralnis.com> wrote:
>> Let's see pg_hba.conf, psql.app, and double-check that
>> postgresql.conf
>> has listen_addresses
>>
>> On 15 May 2008, at 00:50, Abhijith wrote:
>>
>>
>>
>>> I had made a typo in pg_hba.conf. I corrected this with the help of
>>> ketralnis (David King I presume) on #erlyweb yesterday. The error
>>> that
>>> I mentioned went away, but now its application:start(psql) just
>>> stalls
>>> when I run it. I ran yaws in debug mode and it dumped this error
>>> when
>>> I ran application:start(psql).
>>
>>> =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
>>> supervisor: {local,yaws_sup}
>>> started: [{pid,<0.48.0>},
>>> {name,yaws_server},
>>> {mfa,
>>> {yaws_server,start_link,
>>
>>> [{env,true,false,false,false,false,false}]}},
>>> {restart_type,permanent},
>>> {shutdown,5000},
>>> {child_type,worker}]
>>
>>> =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
>>> supervisor: {local,yaws_sup}
>>> started: [{pid,<0.56.0>},
>>> {name,yaws_session_server},
>>> {mfa,{yaws_session_server,start_link,[]}},
>>> {restart_type,permanent},
>>> {shutdown,5000},
>>> {child_type,worker}]
>>
>>> =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
>>> application: yaws
>>> started_at: nonode@nohost
>>
>>> can anyone see what the problem is?
>

--~--~---------~--~----~------------~-------~--~----~
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 received from mailinglist
View user's profile Send private message AIM Address
Guest
Posted: Thu May 15, 2008 6:07 pm Reply with quote
Guest
ah got it. Phew ! Works now. Thanks a ton! Smile

On May 15, 10:49 pm, David King <dk...@ketralnis.com> wrote:
> > This threw an error saying that 'new' is undefined. I did a tab-
> > complete in yaws repl and only functions ( and there were only 3
> > functions) that category module was associated with were module_info,
> > relations (defined in category.erl) and one more function which I
> > cannot remember, but was definitely not "category:new/arity".
> > What am I doing wrong?
>
> You're not compiling the module with erlyweb:compile/2, you're
> compiling it by hand
>
>
>
> > On May 15, 7:26 pm, David King <dk...@ketralnis.com> wrote:
> >> Let's see pg_hba.conf, psql.app, and double-check that
> >> postgresql.conf
> >> has listen_addresses
>
> >> On 15 May 2008, at 00:50, Abhijith wrote:
>
> >>> I had made a typo in pg_hba.conf. I corrected this with the help of
> >>> ketralnis (David King I presume) on #erlyweb yesterday. The error
> >>> that
> >>> I mentioned went away, but now its application:start(psql) just
> >>> stalls
> >>> when I run it. I ran yaws in debug mode and it dumped this error
> >>> when
> >>> I ran application:start(psql).
>
> >>> =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
> >>> supervisor: {local,yaws_sup}
> >>> started: [{pid,<0.48.0>},
> >>> {name,yaws_server},
> >>> {mfa,
> >>> {yaws_server,start_link,
>
> >>> [{env,true,false,false,false,false,false}]}},
> >>> {restart_type,permanent},
> >>> {shutdown,5000},
> >>> {child_type,worker}]
>
> >>> =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
> >>> supervisor: {local,yaws_sup}
> >>> started: [{pid,<0.56.0>},
> >>> {name,yaws_session_server},
> >>> {mfa,{yaws_session_server,start_link,[]}},
> >>> {restart_type,permanent},
> >>> {shutdown,5000},
> >>> {child_type,worker}]
>
> >>> =PROGRESS REPORT==== 15-May-2008::12:46:35 ===
> >>> application: yaws
> >>> started_at: nonode@nohost
>
> >>> can anyone see what the problem is?
--~--~---------~--~----~------------~-------~--~----~
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 received from mailinglist
wailian
Posted: Tue Mar 20, 2012 2:50 am Reply with quote
Guest
One of them is the Ugg bailey button boot which has classic and uniquely designed buttons on its body to give that elegant and luxurious look. It has a fantastic look and this includes the Bailey Triplet Boot which has 3 buttons. These boots have a shaft (the upper part of the boot) which can be turned up or turned down depending upon your need. These buttons are both for style or decoration along with being functional or usable as well.

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