<div dir="ltr">You're absolutely right. The paths were totally different. I restarted the Erlang virtual machine and it works well now.<br><br>Thank you.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Jan 18, 2014 at 10:37 PM, Bob Ippolito <span dir="ltr"><<a href="mailto:bob@redivi.com" target="_blank">bob@redivi.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I think you should check again, I believe you have made a mistake. You will only get this error and see that output if you have a mnesia.beam on the code path that is not the one that ships with Erlang. Having only a setup/0 export makes it extremely likely that this is the original mnesia.beam that would be produced from the mnesia.erl that you pasted earlier in this thread.<div>
<br></div><div>Try evaluating code:which(mnesia). If it doesn't show the same directory as code:which(mnesia_locker) then you will know which beam file to delete.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
<div><div class="h5">
On Sat, Jan 18, 2014 at 7:05 PM, Yves S. Garret <span dir="ltr"><<a href="mailto:yoursurrogategod@gmail.com" target="_blank">yoursurrogategod@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<div dir="ltr">@ Bob Ippolito, I tried that, the same result, the same error as described previously.<br><div><br><div class="gmail_quote"><div>---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Yves S. Garret</b> <span dir="ltr"><<a href="mailto:yoursurrogategod@gmail.com" target="_blank">yoursurrogategod@gmail.com</a>></span><br>
</div><div><div>
Date: Sat, Jan 18, 2014 at 10:03 PM<br>Subject: Fwd: [erlang-questions] Can't create schema in Mnesia<br>To: "<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>" <<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>><br>
<br><br><div dir="ltr">@ <b>Ludovic Demblans, sure.</b><br><br>29> rp(lists:sort(mnesia:module_info(exports))).<br>[{module_info,0},{module_info,1},{setup,0}]<br>ok<div><div><br><br><div class="gmail_quote">
---------- Forwarded message ----------<br>
From: <b class="gmail_sendername">Yves S. Garret</b> <span dir="ltr"><<a href="mailto:yoursurrogategod@gmail.com" target="_blank">yoursurrogategod@gmail.com</a>></span><br>Date: Sat, Jan 18, 2014 at 9:35 PM<br>Subject: Re: [erlang-questions] Can't create schema in Mnesia<br>
To: Bob Ippolito <<a href="mailto:bob@redivi.com" target="_blank">bob@redivi.com</a>><br>Cc: "<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>" <<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>><br>
<br><br><div dir="ltr"><div>Done, no change:<br><br>19> c(mnes).<br>{ok,mnes}<br>20> rr("records.hrl").<br>[planemo,tower]<br>21> mnes:setup().<div><br>** exception error: undefined function mnesia:create_schema/1<br>
</div>
in function mnes:setup/0 (mnes.erl, line 24)<br><br></div>Here is records.hrl:<br><a href="http://bin.cakephp.org/view/1897069453" target="_blank">http://bin.cakephp.org/view/1897069453</a><br></div><div><div>
<div class="gmail_extra"><br><br>
<div class="gmail_quote">On Sat, Jan 18, 2014 at 9:32 PM, Bob Ippolito <span dir="ltr"><<a href="mailto:bob@redivi.com" target="_blank">bob@redivi.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
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. <div><div><br><br>On Saturday, January 18, 2014, Yves S. Garret <<a href="mailto:yoursurrogategod@gmail.com" target="_blank">yoursurrogategod@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Hello all,<br><br>I have the following code:<br><a href="http://bin.cakephp.org/view/2135184996" target="_blank">http://bin.cakephp.org/view/2135184996</a><br>
<br></div>When I compile and reload the records, this is what happens:<br>
<br>14> c(mnesia).<br>{ok,mnesia}<br>15> rr("records.hrl").<br>[planemo,tower]<br>16> mnesia:setup().<br>** exception error: undefined function mnesia:create_schema/1<br> in function mnesia:setup/0 (mnesia.erl, line 25)<br>
<br></div>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?<br><br></div>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?<br>
</div>
</blockquote>
</div></div></blockquote></div><br></div>
</div></div></div><br></div></div></div>
</div></div></div><br></div></div>
<br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>