3 ms·
> getting Clojure, Leiningen, etc working on my Linux > system was quite a chore Can you elaborate on that? Tooling and set-up used to be one of Clojure's bi
by apl 14y ago
> getting Clojure, Leiningen, etc working on my Linux
> system was quite a chore
Can you elaborate on that? Tooling and set-up used to be one of Clojure's big weaknesses; they are less so now. On Ubuntu, for instance, it shouldn't be much more than
$ sudo apt-get install leiningen
$ lein new my-proj
What went wrong?
- kinleyd 14y agoIt was some time ago (8 months or so). I remember googling around and finding different approaches to setting up the tool chain. The notes I kept on some of the steps I tried to get Clojure working on emacs included the following (not the whole list of commands): Setting up Clojure Followed the gist of http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html (no longer existing) The first time, invoking 'mvn2 install' to build clojure-contrib jar failed. Later, after cleaning up Java, it worked. Java was already installed, so I apt-get installed ant and maven2 ~$ git clone git://github.com/clojure/clojure.git ~$ git clone git://github.com/clojure/clojure-contrib.git ~$ mvn install Copy jline-0.0.94.jar Create a bash script called clj to start clojure with these commands: #!/bin/sh # without jline #java -cp "$CLOJURE_HOME/clojure-1.3.0.jar" clojure.main "$@" # with jline java -cp "$CLOJURE_HOME/jline-0.9.94.jar:$CLOJURE_HOME/clojure-1.4.0.jar" jline.ConsoleRunner clojure.main Running clj in the terminal worked, with the repl functioning as expected. For emacs: ~$ sudo apt-get install emacs-snapshot-gtk SLIME, clojure-mode and leiningen git clone git://github.com/nablaone/slime.git git clone git://github.com/technomancy/clojure-mode.git ~$ wget --no-check-certificate http://github.com/technomancy/leiningen/raw/stable/bin/lein Execute the leiningen script ~$ chmod +x lein ~$ ./lein self-install For some reason, this didn't work in emacs and I opted instead to run Clojure in jEdit. It worked but I didn't quite like the jEdit look and feel. Anyway, the long and the short of it was I played with Clojure mainly in jEdit for a while. As you said, the setup process was not well documented at that time and it was quite frustrating. I'm sure it's better now. I'm going to play with Clojure in Light Table again, and if it excites me, I'll have another go at a full Clojure install.
- apl 14y ago> As you said, the setup process was not well documented at > that time and it was quite frustrating. I'm sure it's > better now. As a matter of fact, it was much better than that 8 months ago, but the improvements took a while to become common knowledge. This is a massive problem with Clojure -- there's way too much outdated information out there. For your sanity's sake: don't mess with manual Clojure installation etc. Just use leiningen for everything. It pulls in the Clojure compiler and runtime on its own, offers a much more useful REPL, and even handles Emacs integration these days. In conjunction with package.el/Emacs24, there's not a single thing you have to install manually. https://github.com/technomancy/swank-clojure https://github.com/technomancy/swank-clojure \\ https://github.com/technomancy/leiningen https://github.com/technomancy/leiningen
- kinleyd 14y agoThank you, I greatly appreciate your time and help. I will follow your suggestions which sound an awful lot more simple.
- kinleyd 14y agoYou were absolutely right. I've got leiningen running in one swat (sudo apt-get install leiningen). Will mosey out to get clojure-swank running on emacs next. :)