[erlang-questions] [Erlang-Q] Why can not create a Mnesia schema directory indicated by a full path

Ulf Wiger ulf.wiger@REDACTED
Sun Apr 24 14:00:30 CEST 2011


The issue is with quoting in the unix shell. Try:

erl -mnesia dir \"/home/myname/tmp/schemas\"

The reason why it worked with a single directory name was that it parsed as a valid atom, and the file module allows atoms as file names.

That is, for any environment variables given as -App Key Value  on the command line, Value will be parsed as an Erlang term. Anything with special meaning to the command shell needs to be escaped.

BR,
Ulf W

On 24 Apr 2011, at 13:04, Barco You wrote:

> When I tried to indicate Mnesia schema directory with command: erl -mnesia dir "/home/myname/tmp/schemas", I got error while calling "mnesia:create_schema([node()|nodes()])" in erlang shell.
> 
> But if I start erlang shell with just a string as the schema directory name such as " erl -mnesa dir location", I could correctly create schema in erlang shell.
> 
> Seemingly Mnesia schema directory can not be indicated as a full path.
> 
> {erts, "5.8"},
> {kernel,"2.14"},
> {stdlib,"1.17"}.
> 
> 
> Best regards,
> Barco
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com






More information about the erlang-questions mailing list