Hello I am writing module for mongooseim(ejabberd fork) chat, I want some external library from github. I added it to rebar config.
{jsx, ".*", {git, "git://github.com/talentdeficit/jsx", {branch, "master"}}}
it is downloading to /deps directory while when I run project I have the following error: call to undefined function jsx:encode
I find the directory where /ebin directory copying (/dev/lib/ebin) and copy ebin directory from jsx there. Then function is accessible. It is impossible to do this manually each time, how can I make it with rebar? Thank you.
Update: I actually build it with make dev rel:
the following happens:
devrel: $(DEVNODES)
$(DEVNODES): rebar deps compile deps_dev
@echo "building $@"
(cd rel && ../rebar generate -f target_dir=../dev/mongooseim_$@ overlay_vars=./reltool_vars/$@_vars.config)
cp apps/ejabberd/src/*.erl `ls -dt dev/mongooseim_$@/lib/ejabberd-2.1.8*/ebin/ | head -1`
ifeq ($(shell uname), Linux)
cp -R `dirname $(shell readlink -f $(shell which erl))`/../lib/tools-* dev/mongooseim_$@/lib/
else
cp -R `which erl`/../../lib/tools-* dev/mongooseim_$@/lib/
endif
make
, look at my update. – Slow Harry