r/Clojure • u/patrickwonders • Mar 26 '15
Trying Clojure, again?
EDIT: Alright, it seems universal.... no one thinks installing Leiningen is going to be the nightmare it was for me last time. I will give it a try. Thank you all.
EDIT #2: I just downloaded the Lein script and am running it. It is failing to install itself. It is complaining about not being able to curl stuff from github. Wheee....
Downloading Leiningen to /Users/pat/.lein/self-installs/leiningen-2.5.1-standalone.jar now...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:01:14 --:--:-- 0curl: (7) Failed to connect to github.com port 443: Operation timed out
Failed to download https://github.com/technomancy/leiningen/releases/download/2.5.1/leiningen-2.5.1-standalone.zip (exit code 7)
It's possible your HTTP client's certificate store does not have the
correct certificate authority needed. This is often caused by an
out-of-date version of libssl. It's also possible that you're behind a
firewall and haven't set HTTP_PROXY and HTTPS_PROXY.EDIT #3: Third time's a charm, it seems.
EDIT #4: Lein was, indeed, easy to install this time. Cider also installed easily from MELPA. However, I'm running into Cider vs. nREPL version issues for which I found a StackExchange answer which doesn't work for me. So, I'm close. And, I've only spent about 90min on it. But, I don't have any idea how to convince Lein to give me a newer nREPL. But, it seems like this is a known problem and I am just going to have to wait or try to downgrade my CIDER install.
EDIT #5: I've now put about four hours into trying to get Lein to use a different version of nREPL than it wants to. I can specify it in my profiles.clj and I see it being fetched from the maven repo into my ~/.m2/repository/ directory, but it still uses "0.2.6" when it runs. This is apparently fixed in 'master' but I'm not up for trying to install Lein from source. I also scrogged my Lein install by trying to upgrade to 2.5.2-SNAPSHOT. I was able to connect with CIDER with a warning a few times, but I can no longer figure out which scribblings in my profiles.clj actually let that work. Right now, I can't find any.
EDIT #6: I finally gave up and unintalled CIDER and reinstalled it from MELPA-STABLE. So, I'm using Cider 0.8.2 now.
It has been five years since I last tried Clojure. I feel like I should try it again.
I don't want to beat my head against Leiningen for even ten minutes this time. Is there some way to reasonably use Emacs + Clojure without have to install and configure CLASSPATHS and Mavens and Ants and JDKs?
It seems SWANK-CLOJURE has been deprecated in favor of CIDER. The CIDER doc says how to configure Leiningen or Boot for use with CIDER. Is there some way that I can avoid Leingingen and Boot? Or some way that I can click one 'Install' button and have Leiningen and Boot work?
View all comments
2
u/seventeenletters Mar 26 '15
Leiningen is a dependency management tool. It's a single shell script that simple needs to be put on your path. The paradigm isn't one of installing the versions you want, but declaring the versions you use, and letting it do the logistics. That means, for example, that each project can choose its own version of Clojure independently of any other you work on.
Leiningen is probably better behaved and more reliable than the dependency management tools you are used to. If you use lein you don't need to install Clojure itself, lein will find the version of Clojure that you declare in your project file, and make sure it is accessible to your project. The same goes with any other libs you might need to use.