My app uses Mochiweb.
I have noticed that Mochiweb files reside in the myapp/deps/mochiweb
directory and rebar
compiles them when I run make in the myapp
directory.
I wanted to add ibrowse
to write a few tests which make http requests to my app. So I cloned ibrowse
from github to myapp/deps/ibrowse
directory.
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 fail:
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 make my Mochiweb-based app use other Erlang/OTP external libraries?
Should I edit rebar.config or Makefile for that? Or maybe I should edit an _app.src file?
Edit: Maybe I should edit the list of directories in the myapp_sup.erl file? (myapp_deps:local_path(["priv", "www"]
)
P.S. How does my app know where all the mochiweb.beam files reside? (for example, the generic myapp_web.erl
uses a call to mochiweb_http
module, but there is no mochiweb_http.beam
in the myapp/ebin
directory).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…