[erlang-questions] Can't create schema in Mnesia

Bob Ippolito <>
Sun Jan 19 03:46:14 CET 2014


Make sure to remove the mnesia.beam from your last experiment.

On Saturday, January 18, 2014, Ludovic Demblans <>
wrote:

> Hi,
>
> Could give us what is the result of rp(lists:sort(mnesia:module_info(exports))).
> in the shell ?
>
> Maybe the mnesia library is not installed ?
>
> - lud
>
> Le Sun, 19 Jan 2014 03:35:57 +0100, Yves S. Garret <
> > a écrit:
>
>  Done, no change:
>>
>> 19> c(mnes).
>> {ok,mnes}
>> 20> rr("records.hrl").
>> [planemo,tower]
>> 21> mnes:setup().
>> ** exception error: undefined function mnesia:create_schema/1
>>      in function  mnes:setup/0 (mnes.erl, line 24)
>>
>> Here is records.hrl:
>> http://bin.cakephp.org/view/1897069453
>>
>>
>> On Sat, Jan 18, 2014 at 9:32 PM, Bob Ippolito <> wrote:
>>
>>  Rename the module to something other than mnesia, there's a flat module
>>> namespace and only one module named mnesia can be loaded at a time.
>>>
>>>
>>> On Saturday, January 18, 2014, Yves S. Garret <
>>> >
>>> wrote:
>>>
>>>  Hello all,
>>>>
>>>> I have the following code:
>>>> http://bin.cakephp.org/view/2135184996
>>>>
>>>> When I compile and reload the records, this is what happens:
>>>>
>>>> 14> c(mnesia).
>>>> {ok,mnesia}
>>>> 15> rr("records.hrl").
>>>> [planemo,tower]
>>>> 16> mnesia:setup().
>>>> ** exception error: undefined function mnesia:create_schema/1
>>>>      in function  mnesia:setup/0 (mnesia.erl, line 25)
>>>>
>>>> The function _does_ exist in the mnesia module.  I checked the docs and
>>>> I'm running 16B03, so it's there.  But why this error?
>>>>
>>>> Also, I have an another question.  Lets say I'm testing some code and I
>>>> comment out where I'm calling a function (located in the same file.)
>>>>  How
>>>> can I tell the compiler to not worry about this file not being called?
>>>>  I
>>>> know I can for variables such as _Variable, but methods?
>>>>
>>>>
>>>
>
> --
> Utilisant le logiciel de courrier révolutionnaire d'Opera :
> http://www.opera.com/mail/
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140118/425451ee/attachment.html>


More information about the erlang-questions mailing list