03 May 2012

Rebar has built in support to create a release using reltool. This is actually pretty sweet when it works because you get everything all wrapped up ready to go including init scripts which is especially helpful.

The problem is trying to get it to work can be something of a nightmare. If you set lib_dir to include “../..” then you will end up with reltool detecting multiple versions of software, detecting old versions or just refusing to detect them altogether.

The standard advice is to exchange incl_cond from exclude to include. However this then includes everything which you probably don’t won’t and it will still miss some of the dependencies that you need (in my case it could never find erlmongo). If you go the other way and specify each dependency, you need to do that by hand for each app as well as those app’s dependencies. That’s not fun and a recipe for disaster.

Today I came across this post:


This contained the answer to my prayers and got my app working perfectly! It is a new feature in R15B01 (which is now in general release) that allows you to specify a directory as part of the include condition. This means you don’t need “../..” in lib_dirs and so now things will (probably) work as you had hoped!

blog comments powered by Disqus