Having trouble running clojurescript repl

1,550 views
Skip to first unread message

Sean Neilan

unread,
Apr 25, 2012, 9:40:18 PM4/25/12
to clo...@googlegroups.com
Hi All,

I'm not sure if this has been asked before.

I followed the quickstart guide: https://github.com/clojure/clojurescript/wiki/Quick-Start and did

git clone git://github.com/clojure/clojurescript.git
cd clojurescript
./script/bootstrap
Then I tried
rmc-235-244:clojurescript seanneilan$ ./script/repl
Clojure 1.3.0-beta1
user=> 
which worked

But, when I did 
user=> (require '[cljs.repl :as repl])
I got
FileNotFoundException Could not locate cljs/repl__init.class or cljs/repl.clj on classpath:   clojure.lang.RT.load (RT.java:430)

I tried running
rmc-235-244:clojurescript seanneilan$ ./script/repljs

But I got
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate cljs/repl__init.class or cljs/repl.clj on classpath: 
at clojure.lang.Util.runtimeException(Util.java:153)
at clojure.lang.Compiler.eval(Compiler.java:6417)
at clojure.lang.Compiler.eval(Compiler.java:6372)
at clojure.core$eval.invoke(core.clj:2745)
at clojure.main$eval_opt.invoke(main.clj:296)
at clojure.main$initialize.invoke(main.clj:315)
at clojure.main$null_opt.invoke(main.clj:348)
at clojure.main$main.doInvoke(main.clj:426)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:405)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate cljs/repl__init.class or cljs/repl.clj on classpath: 
at clojure.lang.RT.load(RT.java:430)
at clojure.lang.RT.load(RT.java:398)
at clojure.core$load$fn__4636.invoke(core.clj:5377)
at clojure.core$load.doInvoke(core.clj:5376)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5191)
at clojure.core$load_lib.doInvoke(core.clj:5228)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:602)
at clojure.core$load_libs.doInvoke(core.clj:5262)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:602)
at clojure.core$require.doInvoke(core.clj:5343)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at user$eval1.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6406)
... 11 more

I'm not sure what's going on. Thank you for your time!

-Sean

nchurch

unread,
Apr 26, 2012, 12:25:32 AM4/26/12
to Clojure
Did you try using lein-cljsbuild (together with the instructions on
Using Clojurescript in a Web Page on Quick Start)? That works fine
for me. The instructions on the lein-cljsbuild REPL are here (repl
listen should be enough to get you going):

https://github.com/emezeske/lein-cljsbuild/blob/0.1.8/doc/REPL.md

On Apr 25, 6:40 pm, Sean Neilan <sneil...@gmail.com> wrote:
> Hi All,
>
> I'm not sure if this has been asked before.
>
> I followed the quickstart guide:https://github.com/clojure/clojurescript/wiki/Quick-Startand did
> s...@seanneilan.com

David Nolen

unread,
Apr 26, 2012, 12:27:44 AM4/26/12
to clo...@googlegroups.com
sounds like you didn't set CLOJURESCRIPT_HOME or that it was set incorrectly.


--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Sean Neilan

unread,
Apr 26, 2012, 12:30:28 AM4/26/12
to clo...@googlegroups.com
Holy shnikes! That did it!

Thank you so much!

I'll submit a patch to the documentation.

nchurch

unread,
Apr 26, 2012, 12:49:24 AM4/26/12
to Clojure
BTW, I pushed a minimal lein-cljsbuild project with REPL here:

https://github.com/nchurch/ctest

On Apr 25, 9:30 pm, Sean Neilan <s...@seanneilan.com> wrote:
> Holy shnikes! That did it!
>
> Thank you so much!
>
> I'll submit a patch to the documentation.
>
> On Wed, Apr 25, 2012 at 11:27 PM, David Nolen <dnolen.li...@gmail.com>wrote:
>
>
>
>
>
>
>
> > sounds like you didn't set CLOJURESCRIPT_HOME or that it was set
> > incorrectly.
>
> > On Wed, Apr 25, 2012 at 9:40 PM, Sean Neilan <sneil...@gmail.com> wrote:
>
> >> Hi All,
>
> >> I'm not sure if this has been asked before.
>
> >> I followed the quickstart guide:
> >>https://github.com/clojure/clojurescript/wiki/Quick-Startand did
> >> s...@seanneilan.com

Guofeng Zhang

unread,
Apr 26, 2012, 5:36:22 AM4/26/12
to clo...@googlegroups.com
Trying ctest.

if I clone the project then run " lein cljsbuild auto" in it, I got:
Copying 3 files to D:\projects\app\clojure\contrib\ctest\.lein-plugins
Compiling ClojureScript.
Error: Could not find or load main class clojure.main

If I run "lein deps", then run "lein cljsbuild auto", I got:
That's not a task. Use "lein help" to list all tasks.

Do I need extra configuration for my environment?

Leiningen 1.7.1 on Java 1.7.0_03 Java HotSpot(TM) 64-Bit Server VM
Windows 7

Thanks

nchurch

unread,
Apr 26, 2012, 2:48:31 PM4/26/12
to Clojure
It sounds like lein deps is not getting all the dependencies (there
should be four files to .lein-plugins and one to lib); it must be a
windows-specific issue as I have no problem cloning the project on
Mac; and unfortunately I do not have access to Windows, so can't say
what the problem may be. There may be a Windows issue with lein-
cljsbuild; see this thread:

http://groups.google.com/group/clojure/browse_thread/thread/52e41094d69f6577

I wonder if you could copy the dependencies manually. Another thing
you could try is to intall lein-cljsbuild globally with lein plugin
install.

Guofeng Zhang

unread,
Apr 27, 2012, 1:09:29 AM4/27/12
to clo...@googlegroups.com
I need to copy or install lein-cljsbuild-0.1.8.jar to LEIN's plugins directory. Then each steps works well.

Thanks for your help.

Sean Corfield

unread,
Apr 27, 2012, 2:17:11 AM4/27/12
to clo...@googlegroups.com
On Thu, Apr 26, 2012 at 10:09 PM, Guofeng Zhang <guo...@radvision.com> wrote:
> I need to copy or install lein-cljsbuild-0.1.8.jar to LEIN's plugins directory. Then each steps works well.

This command should do that for you:

lein plugin install lein-cljsbuild 0.1.8
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)
Reply all
Reply to author
Forward
0 new messages