> {"init terminating in
> do_boot",{undef,[{boss,start,[],[],{init,start_it,1,[{file
> ,"init.erl"},[line,1041}]},{init,start_em,1,[{file,"init.erl"},{line,1022}]}]}}
This error message means Erlang cannot find the file boss.beam - some
code has tried to
evaluate the function boss:start() (That's what the cryptic error
message means) and the module
boss is not loaded. When this happens the system tries to find a file
called boss.beam - this must
be one of the files in the code load path.
To debug this - start erlang (If you can't start erlang at all) you're screwed.
then in the erlang shell give the command and code:get_path()
(Or io:format("~p~n",[code:get_path()]).
When I do this I see this:
1 > io:format("~p~n",[code:get_path()]).
[".","/usr/local/lib/erlang/lib/kernel-2.15/ebin",
"/usr/local/lib/erlang/lib/stdlib-1.18/ebin",
...
"/home/joe/projects/doc42/ebin","/home/joe/projects/validate",
"/home/joe/nobackup/erlang_imports/deps/meck/ebin",
"/home/joe/nobackup/erlang_imports/deps/cowboy/ebin",
"/home/joe/nobackup/erlang_imports/deps/bitcask/ebin"]
One of these directories should contain the file boss.beam
Since boss.beam is not in your path you have to find and add it to your path.
This can be done in (at least) three ways:
If boss.beam is in the directory DIR then you can evaluate this:
> code:add_pathz(Dir).
in the shell
Better is to add it to the erlang startup file.
On a unix or mac you just make a file called ".erlang" which is either
on ${HOME}/.erlang
or the directory you start erlang from.
I tried to do this on windows but I have no evironment variable HOME
and I do now have write permissions
under Program Files (or whatever)
(( Actually I'd like to keep an up-to-date install guide on the erlang
web site so if anybody
could tell me how to make a .erlang file on windows I would be appreciate this))
Once we know how to make a .erlang file I can fill in the details of
how to get your
boss example running.
Just keep mailing back to this thread every time you have a problem
and we'll get it fixed.
Cheers
/Joe