Database Reference
In-Depth Information
Drake is written in the programming language Clojure, which means that it runs on
the Java Virtual Machine (JVM). There are pre-built JARs available, but because
Drake is in active development, we'll build it from source. For this, you will need to
install Leiningen:
$ sudo apt-get install openjdk-6-jdk
$ sudo apt-get install leiningen
Then, clone the Drake repository from Factual:
$ git clone https://github.com/Factual/drake.git
And build the JAR using Leiningen:
$ cd drake
$ lein uberjar
This creates drake.jar . Copy this file to a directory that's on your PATH —for example,
~/.bin :
$ mv drake.jar ~/.bin/
At this point, you should already be able to run Drake:
$ cd ~/.bin/
$ java -jar drake.jar
This is not really convenient for two reasons: (1) the Java Virtual Machine (JVM)
takes a long time to start, and (2) you can only run it from that directory. We advise
you to install Drip, which is a launcher for the JVM that provides much faster startup
times than the java command. First, clone the Drip repository from Flatland:
$ git clone https://github.com/flatland/drip.git
$ cd drip
$ make prefix = ~/.bin install
Then, create a Bash script that allows you to run Drake from everywhere:
$ cd ~/.bin
$ cat << 'EOF' > drake
> #!/bin/bash
> drip -cp $(dirname $0)/drake.jar drake.core "$@"
> EOF
$ chmod +x drake
To verify that you have correctly installed both Drake and Drip, you can run the fol‐
lowing command, preferably from a different directory:
$ drake --version
Drake Version 0.1.6
Search WWH ::




Custom Search