Richard Jonas's


Rebar on Windows

Leave a Comment
In this short post I will show you how to set up rebar on Windows.

What we need is an Erlang installation which can be downloaded from Then we need to install Git from During the installation I choose command shell integration in order that it will be placed in the PATH.

The last step is to download rebar from in the current project directory. It should be renamed as since it is a shell script. How can this script be executed if it is a shell script? To execute it on Windows we need to create a rebar.cmd file which invoke the escript interpreter with the rebar shell script.

@echo off
escript.exe %*

We are ready, we can type rebar.cmd to see

No command to run specified!
Usage: rebar [-h] [-c] [-v <verbose>] [-V] [-f] [-D <defines>] [-j <jobs>] [-C <config>] [-p] [var=value,...] <command,...>

  -h, --help            Show the program options
  -c, --commands        Show available commands

Let us create rebar.config file to see who git dependencies can be resolved.

{deps, [
   {ranch, ".*",
      {git, "git://", "0.8.5"}}

Let us run rebar.cmd get-deps

D:\Work\ranch-build>rebar.cmd get-deps
==> Entering directory `d:/Work/ranch-build'
==> ranch-build (get-deps)
Pulling ranch from {git,"git://","0.8.5"}
Cloning into 'ranch'...
Checking connectivity... done
==> Entering directory `d:/Work/ranch-build/deps/ranch'
==> ranch (get-deps)
==> Leaving directory `d:/Work/ranch-build/deps/ranch'
==> Leaving directory `d:/Work/ranch-build'

Now we are ready to compile the source and go on with the work.
Next PostNewer Post Home


Post a Comment

Note: Only a member of this blog may post a comment.