[erlang-questions] application:get_env return undefined

Alexander 0xAX <>
Wed Jan 9 15:39:00 CET 2013


Hello,

Thank you for replies.

I try to run my application without .config extenstion:

exec erl -config app -s test_app

Same result.


2013/1/9 Slava Yurin <>

> Hi Alexander.
>
> Please see https://github.com/nevar/sys_test.
>
> 09.01.2013, 20:14, "Alexander 0xAX" <>:
>
> Hello,
>
> I have simple test application with test.app.src file, test_app.erl and
> test_sup.erl
>
> Also i want to read config in my application. I have app.config:
>
> [
>  {my_app_config,
>   [{key1, "val"}]}
> ].
>
> I run my application:
>
> erl -boot start_sasl -config app.config -s test_app
>
> And now, after application successful starting i try to read my config:
>
> >application:get_env(test_app, my_app_config).
> undefined
>
> Why? How can i correctly read config file?
>
> Thank you.
> ,
>
> _______________________________________________
> 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/20130109/52539d22/attachment.html>


More information about the erlang-questions mailing list