Erlang/OTP Forums

Author Message

<  Erlyweb mailing list  ~  problem with mnesia database

Guest
Posted: Wed Dec 03, 2008 3:01 pm Reply with quote
Guest
Hi all,

i tried use the erlyweb and erlydb with mnesia. Fist my compilation fail, so I apply a patch, then I can't insert more the 1 record!! I think the problem is a identity problem.

I read about create a counter table, but I can't found the contect of this table.

Thanks
--
Fernando Chucre
http://www.horizontesdigitais.com


--~--~---------~--~----~------------~-------~--~----~
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: Thu Dec 04, 2008 6:20 pm Reply with quote
Guest
I had some trouble getting mnesia setup under yaws (I'm still
learning Smile
This approach seems to work ok.
First we setup mnesia in a normal erlang shell, then we can run yaws
using the ready-to-go mnesia directory. I think the create_table below
is documented in erlydb_mnesia.erl.

mkdir db %% the directory where mnesia files will go
erl -mnesia dir "'db'" %% thats double around single quoted
directory name
1>mnesia:create_schema([node()]).
2>mnesia:info(). %% make sure it says the db director is used
3>mnesia:start().
4>mnesia:create_table(counter, [{disc_copies, [node()]}, {attributes,
[key, counter]}]).
5>q().

That should be good if I recall correctly.
Now start yaws up -- you'll need a working conf file.
For example.
yaws -i --mnesiadir db --pa ../ebin --pa ${ERLYWEB_HOME}/ebin --conf
yaws.conf

Hope that helps,
michael.

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

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