ejabberd - Can't add dependecy to Mongooseim[erlang] -


hello writing module mongooseim(ejabberd fork) chat, want external library github. added rebar config.

    {jsx, ".*", {git, "git://github.com/talentdeficit/jsx", {branch, "master"}}} 

it downloading /deps directory while when run project have following error: call undefined function jsx:encode

i find directory /ebin directory copying (/dev/lib/ebin) , copy ebin directory jsx there. function accessible. impossible manually each time, how can make rebar? thank you.

update: build 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 erl))`/../lib/tools-* dev/mongooseim_$@/lib/ else     cp -r `which erl`/../../lib/tools-* dev/mongooseim_$@/lib/ endif 

in order add dependency mongooseim should first add rebar.config:

{deps, [     {cuesport, ".*", {git, "git://github.com/goj/cuesport.git", {branch, "master"}}},     {redo, ".*", {git, "git://github.com/jacobvorreuter/redo.git", {branch, "master"}}},     {exml, "2.1.4", {git, "git://github.com/esl/exml.git", {tag, "2.1.4"}}},     {lager, ".*", {git, "git://github.com/basho/lager.git"}},     {cowboy, "0.8.6", {git, "git://github.com/extend/cowboy.git", "0.8.6"}},     {folsom, ".*", {git, "git://github.com/boundary/folsom.git", {branch, "master"}}},     {mochijson2, ".*", {git, "git://github.com/bjnortier/mochijson2.git", {branch, "master"}}},     {alarms, ".*", {git, "git://github.com/chrzaszcz/alarms.git", {branch, "master"}}},     {p1_cache_tab, ".*", {git, "git://github.com/processone/cache_tab"}},     {p1_stringprep, ".*", {git, "git://github.com/processone/stringprep.git", "9e9e0f8dbe6a70ef36e1d4436b458ca5a77fbcfb"}},     dependency-->{jsx, ".*", {git, "git://github.com/talentdeficit/jsx", {branch, "master"}}} ]}. 

then when u make should downloaded /deps directory.

then take @ /rel/reltool.config file.

here find like:

{sys, [ ...    {app, inets, [{incl_cond, include}]},    {app, exml, [{incl_cond, include}]},    {app, ranch, [{incl_cond, include}]},    {app, cowboy, [{incl_cond, include}]},    {app, bear, [{incl_cond, include}]},    {app, folsom, [{incl_cond, include}]},    {app, mochijson2, [{incl_cond, include}]},    {app, syntax_tools, [{incl_cond, include}]},    {app, p1_cache_tab, [{incl_cond, include}]},    {app, alarms, [{incl_cond, include}]},    dependency->{app, jsx, [{incl_cond, include}]} } 

your dependency should work. @ rel/mongooseim/lib or dev/mongooseim_odbc*/lib directory. in case there jsx-2.0.1 ebin directory in it.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -