I'm using rebar to get/compile my dependencies which has the following in rebar.conf
:
{deps, [
...
{couchbeam, ".*", {git, "git://github.com/benoitc/couchbeam.git", {branch, "master"}}}
]}.
then I use relx to generate the release. relx.config has:
{release, {myapp, "0.0.1"}, [myapp, couchbeam]}.
{extended_start_script, true}.
myapp.app.src:
{application, myapp,
[
{description, ""},
{vsn, "1"},
{registered, []},
{applications, [
kernel,
stdlib,
... ,
couchbeam
]},
{mod, { myapp_app, []}},
{env, []}
]}.
having started couchdb, I run my release under console and try to test couchbeam with the following lines:
Host = "localhost",
Port = 5984,
Prefix = "",
Options = [],
S = couchbeam:server_connection(Host, Port, Prefix, Options).
{ok, _Version} = couchbeam:server_info(S).
the last line gives me the error:
** exception error: undefined function jsx:decode/1
To solve this, I opened deps/couchbeam/couchbeam.app.src
and changed:
{applications, [kernel,
stdlib,
asn1,
crypto,
public_key,
ssl,
idna,
hackney
]},
and added jsx:
{applications, [kernel,
stdlib,
asn1,
crypto,
public_key,
ssl,
idna,
hackney,
jsx
]},
Is there something wrong in my setup of how I added couchbeam as a dependency? I feel like I'm not supposed to hack the .app.src of one of my dependencies