13

I know it is possible to use CounterClockwise inside Eclipse, but I have been trying to get Leiningen to work so that I could use ClojureScript.

I downloaded leiningen using git clone. It then says run the script. I have tried lein self-install from inside PowerShell and inside the git bash environment.

In each I get an error about failing to download leiningen (which I thought I had with the git clone? hmm). It is interesting because one reads instructions that include things that don't make sense to Windows.

For example, inside Powershell, Windows doesn't understand export HTTP_CLIENT. It was only inside the git bash that I got a message that it is possible my HTTP client's certificate store does not have the correct certificate authority.

It then suggests this command, which runs ok, export HTTP_CLIENT="curl --insecure -f -L -o" but it doesn't fix the problem.

2 Answers 2

9

The most recommended method AFAIK is to download the script lein.bat and putting it on the PATH environment variable. I've tested this method on several systems (XP, Windows 7). There is no need to build leiningen from a git checkout yourself. If you have a Windows with Powershell installed lein self-install should download the core .jar file inside a directory .lein in your user directory. Else, make sure you install either wget.exe or curl.exe and put it on the PATH.

4
  • 2
    I would only add that it's useful to read lein.bat if you want to see how to modify where lein installs itself when you run lein.bat.
    – georgek
    Commented Apr 12, 2013 at 6:18
  • For some reason, I ran into a problem with that, or the next step. I have the directory containing lein and curl as well as wget on the path. Do I need to put c:\bin\lein\lein.bat on the path, or just up to the folder where lein exists? Commented Apr 25, 2013 at 23:41
  • For some reason, I ran into problems. I have the directory containing lein and curl as well as wget on the path. Do I need to put c:\bin\lein\lein.bat on the path, or just up to the folder where lein exists? If I use cygwin is it a different file that I download instead of lein.bat? Anyway, when I ran lein self-install it just moved one file, as I had tried to do this earlier. Then I tried > lein new mytest and it downloaded a lot, but stopped with error: Could not find artifact leiningen-core:leiningen-core:jar:2.2.0-SNAPSHOT in clojars( clojars.org/repo ). Commented Apr 25, 2013 at 23:55
  • The PATH only contains directories, separated by semicolons. I suggest you enter #clojure or #leiningen on Freenode IRC, so people can assist you while you try further. Commented Apr 26, 2013 at 7:24
1

There is an installer for Leiningen on Windows. You just need to install Java SE 7 JDK and Leiningen for Windows. This page has detailed instructions with screen shots: http://leiningen-win-installer.djpowell.net/

Leiningen for Windows creates a PATH variable and Clojure REPL shortcut among other things. From the REPL you can create, build, and automate your Clojure project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.