[erlang-questions] Environment variables in applications

Paul Fisher pfisher@REDACTED
Wed Jul 2 18:37:19 CEST 2008

On Wed, 2008-07-02 at 17:41 +0200, Alexander Lamb wrote:
> Hello,
> I am writing an OTP application which will create a Mnesia database if  
> needed (will check upon init if schema exists on that node).
> Since I can't give a path in the mnesia:create_schema(node())  
> function, from the documentation I read that it takes the environment  
> variable "dir" so I hoped I could pass it in my application file such  
> as this:

It needs to be set as an attribute of the mnesia application and not
your application which uses mnesia:

$ erl -mnesia dir \"/Users/alamb/Data/Mnesia\"


More information about the erlang-questions mailing list