On Mon, Mar 17, 2014 at 1:31 PM, Charles Blair <chas@uchicago.edu> wrote:
http://pi-test.lib.uchicago.edu/1001/test/test/test =>
We're OK; thanks.

http://pi-dev.lib.uchicago.edu/1001/test/test/test =>
ERROR erlang code threw an uncaught exception:
 File: appmod:0
Class: error
Exception: undef

topaz# yaws --load pi1001d pi1001t
[{module,pi1001t},{module,pi1001d}]

Retry; same result.

Also (and possibly unrelated), after yaws -i:

> m().

I can't see the loaded modules. If I reload them as above, then I
can. Is this to be expected with appmods?

You need to make sure your appmod beam files are available in the yaws load path. If you run m(pi1001d) at the shell and get an exception, that means the module isn't in the load path. You can add to the load path in your yaws.conf file by setting ebin_dir, for example:

ebin_dir = /usr/local/var/yaws/ebin
ebin_dir = /usr/local/lib/yapp/ebin
ebin_dir = /tmp

Note how multiple ebin_dir settings are allowed; they are all added to the load path.

In the erlang shell you can also temporarily add to the load path via code:add_patha and friends, see http://www.erlang.org/doc/man/code.html for more details. You can see the current load path by running this in the erlang shell:

rp(code:get_path()).

where the rp() part ensures the output isn't truncated by the shell.

--steve