My application uses Mochiweb.
I noticed that Mochiweb files are in the myapp/deps/mochiweb , and rebar compile them when I run make in the myapp .
I wanted to add ibrowse to write some tests that make http requests for my application. So I cloned ibrowse from the github directory to myapp/deps/ibrowse .
But it seems that Erlang does not know where to get the .beam files for ibrowse , and therefore all my tests that use the ibrowse module ibrowse not work:
myapp ebin %%compiled tests reside here, tests which use ibrowse fail (badarg) deps mochiweb ibrowse ebin %%compiled ibrowse module resides here src tests
How can I get my Mochiweb based application to use other external Erlang / OTP libraries?
Should I edit rebar.config or Makefile for this? Or maybe I should edit the _app.src file?
Edit: Perhaps I need to edit the directory listing in myapp_sup.erl? ( myapp_deps:local_path(["priv", "www"] )
PS How does my application know where all the mochiweb.beam files are? (for example, the generic myapp_web.erl uses the mochiweb_http module mochiweb_http , but there is no mochiweb_http.beam myapp/ebin mochiweb_http.beam ).
skanatek
source share