Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Erlang releases are a good way to package software, because they include all of the dependent libraries. This way, different erlang applications can run different versions of their required libraries without conflicting with each other.</p> <p>A popular way of dealing with the complicated release process Erlang has is to let <a href="https://github.com/basho/rebar" rel="nofollow">Rebar</a> do it for you. They have a <a href="https://github.com/basho/rebar/wiki/Release-handling" rel="nofollow">quick start guide</a> to get you on the right path. I don't know if you're currently using Rebar to manage your project, but it makes things a lot easier. It is definitely worth looking into if you aren't using it yet.</p> <p>However, rebar won't include your dependencies right out of the box. In order to do that, you should modify the reltool.config file and all your required applications.</p> <p>First step is to add the directory where all your dependencies are located, e.g.:</p> <pre><code>{sys, [ ... {lib_dirs, ["../deps"]}, ... }. </code></pre> <p>Then, add your dependencies as applications to include in the release:</p> <pre><code>{sys, [ ... {app, jiffy, [{incl_cond, include}]}, {app, cowboy, [{incl_cond, include}]}, ... }. </code></pre> <p>Now, when you run the <code>rebar generate</code> command, your applications should be in the target directory under lib:</p> <pre><code>find brawl_server -type d -maxdepth 2 brawl_server brawl_server/bin brawl_server/erts-5.9.1 brawl_server/erts-5.9.1/bin brawl_server/lib brawl_server/lib/brawl_server-1.1 brawl_server/lib/cowboy-0.6.0 brawl_server/lib/jiffy-0.6.1 brawl_server/lib/kernel-2.15.1 brawl_server/lib/sasl-2.2.1 brawl_server/lib/stdlib-1.18.1 brawl_server/log brawl_server/log/sasl brawl_server/releases brawl_server/releases/1 </code></pre> <p>You also need to make sure your own OTP application knows it needs to start the applications it depends on. If you have a generated Rebar project, modify your <code>&lt;appname&gt;.app.src</code> file to include them:</p> <pre><code>{application, app, [ ... {applications, [ jiffy, cowboy, kernel, stdlib ]}, ... }. </code></pre> <p>You should be able to compile and generate the release and run it with the included scripts, as laid out in the Rebar release handling article.</p> <p>At this point, though, there's an added wrinkle, because apparently vanilla CouchDB isn't OTP compliant, and you can't include it this way. There is another distribution you may be able to use, instead: <a href="http://rcouch.org/" rel="nofollow">rcouch</a>. I haven't tried it myself, hopefully it will work for you.</p> <p>Further reading:</p> <ul> <li><a href="http://learnyousomeerlang.com/release-is-the-word" rel="nofollow">Learn you some erlang for great good: Releases</a></li> <li>I used my own project, <a href="https://github.com/nicolasartman/brawl-online/tree/master/brawl_server" rel="nofollow">brawl-online</a>, as an example</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload