Nick
Nick

Reputation: 9041

Clojure-koans run error:

I'm trying to learn Clojure by Clojure-koans; however, Clojure-koans could not run:

~/Downloads/clojure-koans-2012-10-18_18-42/script $> ./run
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
Error: Could not find or load main class clojure.main

But I can start clojure by lein repl. And by emacs cider-jack-in.

What should I do to get Clojure-koans run?

Edit: Problem solved by edit the dependencies in project.clj in src folder: (changed to the latest clojure 1.6.0)

:dependencies [[org.clojure/clojure "1.6.0"]

Should I answer my own question? or how could I mark the question as solved?

Upvotes: 2

Views: 378

Answers (2)

trptcolin
trptcolin

Reputation: 2340

I suggest either cd .. && ./script/run (I'm guessing the shell script may assume being run one directory up) or cloning the clojure-koans repo and running lein koan run (also from the project root directory).

Upvotes: 1

ponzao
ponzao

Reputation: 20934

Have you run lein deps in the project? From the documentation (https://github.com/functional-koans/clojure-koans):

The only things you'll need to run the Clojure Koans are:

JRE 1.5 or higher

clojure-1.5.1.jar

You can use Leiningen to automatically install the Clojure jar in the right place. Leiningen will also get you a couple more jarfiles, including JLine, which allows you some of the functionality of readline (command-line history, for example).

Upvotes: 2

Related Questions