Gen Server Error noproc
<p>I get the following error when I try to run my program through shell using <code>erlang.mk</code>.</p>

<pre><code>=INFO REPORT==== 5-May-2016::05:47:57 ===
application: rad
exited: {bad_return,
            {{rad_app,start,[normal,[]]},
             {'EXIT',
                 {noproc,{gen_server,call,[rad_config,{lookup,port}]}}}}}
type: permanent
Eshell V6.4  (abort with ^G)
(rad@127.0.0.1)1&gt; {"Kernel pid terminated",application_controller,"{application_start_failure,rad,{bad_return,{{rad_app,start,[normal,[]]},{'EXIT',{noproc,{gen_server,call,[rad_config,{lookup,port}]}}}}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,rad,{bad_return,{{rad_app,start,[normal,[]]},{'EXIT',{noproc,{gen_server,call,[radheart: Thu May  5 05:47:58 2016: _coErlang is crashing .. (waiting for crash dump file)nf
ig,{lookup,porheart: Thu May  5 05:47:58 2016: tWould reboot. Terminating.}
]}}}}}})
make: *** [run] Error 1
</code></pre>

<p><code>rad.app.src</code></p>

<pre><code>{application, rad,
[
{description, "Awesome server written in Erlang"},
{vsn, "0.0.1"},
{registered, [rad_sup, rad_config]},
{modules, []},
{applications, [
  kernel,
  stdlib,
  cowboy
]},
{mod, {rad_app, []}},
{env, []}
]}.
</code></pre>

<p><code>rad_config.erl</code></p>

<pre><code>-module(rad_config).
-behaviour(gen_server).

%% API
-export([start_link/0]).

%% Gen Server Callbacks
-export([init/1 , handle_call/3 , handle_cast/2 , handle_info/2 , terminate/2 , code_change/3]).
-export([lookup/1]).

-define(SERVER, ?MODULE).
-record(state, {conf}).

start_link() -&gt;
    gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).

init([]) -&gt;
    {ok, Conf} = file:consult("config/rad.cfg"),
    {ok, #state{conf = Conf}}.

handle_call({lookup, Tag} , _From , State) -&gt;
    Reply = case lists:keyfind(Tag, 1, State#state.conf) of
            {Tag, Value} -&gt;
                Value;
                    false -&gt;
                        {error, noinstance}
        end,
    {reply, Reply, State};

handle_call(_Request, _From, State) -&gt;
    Reply = ok,
    {reply, Reply, State}.

handle_cast(_Msg , State) -&gt;
    {noreply, State}.

handle_info(_Info , State) -&gt;
    {noreply, State}.

terminate(Reason , _State) -&gt;
    io:format("~n Server shutdown. Reason: ~s.~n", [Reason]),
    ok.

code_change(_OldVsn , State , _Extra) -&gt;
    {ok, State}.

lookup(Tag) -&gt;
    gen_server:call(?SERVER, {lookup, Tag}).
</code></pre>

<p><code>rad_app.erl</code></p>

<pre><code>-module(rad_app).
-behaviour(application).

-export([start/2]).
-export([stop/1]).

%%  First we need to define and compile the dispatch list, a list of routes
%%  that Cowboy will use to map requests to handler modules. Then we tell
%%  Cowboy to listen for connections.
start(_Type, _Args) -&gt;
    Port = rad_config:lookup(port),

    Dispatch = cowboy_router:compile([
    {'_', [{"/", route_handler, []}]}
      ]),
    {ok, _} = cowboy:start_http(rad_http_listener, 100,
    [{port, Port}], [{env, [{dispatch, Dispatch}]}]),

    %% Start the supervisor
    rad_sup:start_link().

stop(_State) -&gt;
    ok.
</code></pre>

<p><code>rad_sup.erl</code></p>

<pre><code>-module(rad_sup).
-behaviour(supervisor).

%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1, shutdown/0]).

-define(SERVER, ?MODULE).

%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).

%%         ===================================================================
%% API functions
%% ===================================================================

start_link() -&gt;
    supervisor:start_link({local, ?SERVER}, ?MODULE, []).

%% ===================================================================
%% Supervisor callbacks
%% ===================================================================

init([]) -&gt;
    RestartStrategy = simple_one_for_one,
    MaxRestarts = 10,
    MaxSecondsBwRestarts = 5,

    SupFlag = {RestartStrategy, MaxRestarts, MaxSecondsBwRestarts},

    Processes = [?CHILD(rad_config, worker)],
    {ok, {SupFlag, Processes}}.

%% Supervisor can be shutdown by calling exit(SupPid,shutdown)
%% or, if it's linked to its parent, by parent calling exit/1.
shutdown() -&gt;
    exit(whereis(?MODULE), shutdown).
</code></pre>

<p>So basically I've two questions related to the error that is thrown here:</p>

<ol>
<li><p>Is this error thrown because my <code>gen_server</code> is not able to start?</p></li>
<li><p>The line in <code>rad_config</code> corresponding to <code>file:consult/1</code>, I want to ask from where does this function fetches the file as in the parameter that I've passed to it is <code>config/rad.cfg</code> but all the <code>.erl</code> files are stored in <code>src</code> folder. And both these folders <code>src</code> and <code>config</code> are at the same directory level. So, the parameter that I've passed to <code>file:consult/1</code>, is it correct? Although I've tried to pass the parameter as <code>../config/rad.cfg</code> also. I still get the same error.</p></li>
</ol>

<p>Please help me out. I'm <code>new</code> to <code>Erlang</code> and I'm trying to solve this error for quite some time. Btw, I using <code>Erlang 17.5</code>.</p>