I have been trying to embed yaws into an erlang application but no matter what I do I get this exception thrown out
** exception exit: "cannot load yaws"
in function yaws_api:embedded_start_conf/4 (yaws_api.erl, line 2598)
in call from ybed:run/0 (ybed.erl, line 35)
3>
I used yaws sample "ybed.erl" example but there is still no luck: http://hyber.org/code.yaws?file=/ybed.erl
I am using ubuntu 14.04
Update
As suggested by Steve Vinoski,It was a load path issue.
I included application:load(yaws)
as instructed and the return value was {error,{"no such file or directory","yaws.app"}}
. so I ran Erlang follows $ sudo erl -pa /usr/lib/yaws/ebin
and it worked like charm.
Thank you!