Michael Mullis
unread,Dec 4, 2008, 1:20:04 PM12/4/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to erlyweb
I had some trouble getting mnesia setup under yaws (I'm still
learning :)
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.