I’ve evaluated Nitrous.IO service for a few weeks now. In a nutshell it allows you to create virtual, development, environment, to which you can connect remotely (using the terminal, but also the web page, chrome app or even Mac app). By default Nitrous.IO comes with preconfigured boxes with Ruby/Rails, Node.js, Python/Django and Go.
I’ve started using Nitrous, because I wanted to have an easy and fast access to programming languages without installing them on my Windows machine.
Lately I try to get my head around Clojure language (I’ve learned functional programming during my studies, but it was a long time ago, so I have to discover it again). Because of that I wanted to install
Clojure on the Nitrous.IO platform. It isn’t hard, but requires few steps to do. Below I will show you, how you can do it (this tutorial is inspired by ‘Installing Erlang’ guide).
Create a new development box (I’ve used the one with the
Golanguage, but it doesn’t matter) or use the existing one.
Connect to the box - you can even use the web page - start terminal then.
The easiest way to install Clojure on any system is to use Leiningen tool. First lets make a folder where we will store installation script:
then we should get the script:
cd .tools wget https://raw.github.com/technomancy/leiningen/stable/bin/lein
- Once the script is downloaded, we need to modify
~/.bashrcfile to add the
.toolsdirectory to our
$PATH- we can do it with the
add this line to the end of the file:
save and exit.
- Reload the
and check if the $PATH contains
the output should be similar to this one:
- Now we need to set Leiningen script to be executable
chmod a+x ~/.tools/lein
and we are ready to go.
- To start using Clojure REPL (read-eval-print loop) type:
For the first time Leiningen will download and install
Clojure, after it finishes you can start playing with the new language.
If you need more information about Leiningen, you can read the documentation.
A small tip if you work in the web page terminal, you can copy or past using those shortcuts:
Shift + Ctrl + c
Shift + Ctrl + v
Command + c
Command + v