Something that works is putting ":injections [(require 'clojure.repl)]" in
.lein/profiles.clj.
It works (as evidenced by (doc ...) working in "lein repl") but I don't
know if that is the correct approach.
On Tuesday, November 19, 2013 4:57:48 PM UTC, Andy Smith wrote:
>
> Hi,
>
> total newbie here and have come unstuck with the repl configuration. How
> can I configure my leiningen project's clj file to call '(use
> 'clojure.math.numeric-tower)' when the repl is started with 'lein repl'? I
> have tried adding the command to the repl-options but I get a java
> exception when I start the repl :
>
> (defproject test "1.0.0-SNAPSHOT"
> :description "FIXME: write description"
> :dependencies [[org.clojure/clojure "1.3.0"]
> [org.clojure/math.numeric-tower "0.0.2"]])
> :repl-options {
> :init (clojure.core/use 'clojure.math.numeric-tower)}
>
>
>
> andy@Aspire-V3-571:~/projects/clojure/test$ lein repl
> Exception in thread "main" java.lang.ClassNotFoundException: org.clojure
> (project.clj:1)
> at clojure.lang.Compiler.analyze(Compiler.java:5206)
> at clojure.lang.Compiler.analyze(Compiler.java:5152)
> at clojure.lang.Compiler$VectorExpr.parse(Compiler.java:2592)
> at clojure.lang.Compiler.analyze(Compiler.java:5193)
> at clojure.lang.Compiler.analyze(Compiler.java:5152)
> at clojure.lang.Compiler$VectorExpr.parse(Compiler.java:2592)
> at clojure.lang.Compiler.analyze(Compiler.java:5193)
> at clojure.lang.Compiler.analyze(Compiler.java:5152)
> at clojure.lang.Compiler$MapExpr.parse(Compiler.java:2499)
> at clojure.lang.Compiler.analyze(Compiler.java:5195)
> at clojure.lang.Compiler.analyze(Compiler.java:5152)
> at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:4671)
> at clojure.lang.Compiler$FnMethod.parse(Compiler.java:4329)
> at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3174)
> at clojure.lang.Compiler.analyzeSeq(Compiler.java:5368)
> at clojure.lang.Compiler.analyze(Compiler.java:5191)
> at clojure.lang.Compiler.eval(Compiler.java:5422)
> at clojure.lang.Compiler.load(Compiler.java:5858)
> at clojure.lang.Compiler.loadFile(Compiler.java:5821)
> at clojure.lang.RT$3.invoke(RT.java:296)
> at leiningen.core$read_project$fn__2167.invoke(core.clj:127)
> at leiningen.core$read_project.invoke(core.clj:126)
> at leiningen.core$read_project.invoke(core.clj:130)
> at leiningen.core$_main.doInvoke(core.clj:320)
> at clojure.lang.RestFn.invoke(RestFn.java:410)
> at clojure.lang.AFn.applyToHelper(AFn.java:161)
> at clojure.lang.RestFn.applyTo(RestFn.java:132)
> at clojure.core$apply.invoke(core.clj:542)
> at leiningen.core$_main.invoke(core.clj:332)
> at user$eval73.invoke(NO_SOURCE_FILE:1)
> at clojure.lang.Compiler.eval(Compiler.java:5425)
> at clojure.lang.Compiler.eval(Compiler.java:5392)
> at clojure.core$eval.invoke(core.clj:2382)
> at clojure.main$eval_opt.invoke(main.clj:235)
> at clojure.main$initialize.invoke(main.clj:254)
> at clojure.main$script_opt.invoke(main.clj:270)
> at clojure.main$main.doInvoke(main.clj:354)
> at clojure.lang.RestFn.invoke(RestFn.java:457)
> at clojure.lang.Var.invoke(Var.java:377)
> at clojure.lang.AFn.applyToHelper(AFn.java:172)
> at clojure.lang.Var.applyTo(Var.java:482)
> at clojure.main.main(main.java:37)
> Caused by: java.lang.ClassNotFoundException: org.clojure
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at
> clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:270)
> at clojure.lang.RT.classForName(RT.java:1566)
> at clojure.lang.Compiler$HostExpr.maybeClass(Compiler.java:852)
> at clojure.lang.Compiler$HostExpr.access$300(Compiler.java:654)
> at clojure.lang.Compiler.analyzeSymbol(Compiler.java:5572)
> at clojure.lang.Compiler.analyze(Compiler.java:5173)
> ... 41 more
>
>
> Thanks for your help
>
> Andy
>
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.