You are here:   ArielOrtiz.com > Programming Languages > Software

Software

Development Environment

We’ll be using Ubuntu Linux during this course. You have two options:

Installing Clojure

The following instructions allow you to install the most recent version of Clojure on Ubuntu 14.04.

  1. NOTE: You can skip this step if you’re using the Cloud9 development environment.

    Verify that you have Java installed. Type at the terminal:

    java -version

    If you get a “command not found” error you can install Java with this instruction:

    sudo apt-get install openjdk-7-jdk
  2. Download the Leiningen script:

    wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
  3. Make the script executable:

    chmod +x lein
  4. Move the script to the /usr/local/bin directory:

    sudo mv lein /usr/local/bin
  5. Run the Clojure REPL (Read-Eval-Print-Loop):

    lein repl

    Press Ctrl-D to quit the REPL.

  6. Install lein-exec, which is a Leiningen plugin to execute Clojure scripts:

    echo '{:user {:plugins [[lein-exec "0.3.5"]]}}' > ~/.lein/profiles.clj

    Now, to run a Clojure script called my_script.cljjust type:

    lein exec my_script.clj