yokolet / clementine

Gem for ClojureScript on Rails Asset Pipeline
MIT License
123 stars 20 forks source link

ClassNotFoundException #8

Closed AshtonKem closed 1 year ago

AshtonKem commented 10 years ago
Exception in thread "main" java.lang.ClassNotFoundException: com.google.common.collect.ImmutableList
    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:190)
    at cljs.closure$eval5$loading__4784__auto____6.invoke(closure.clj:9)
    at cljs.closure$eval5.invoke(closure.clj:9)
    at clojure.lang.Compiler.eval(Compiler.java:6511)
    at clojure.lang.Compiler.eval(Compiler.java:6501)
    at clojure.lang.Compiler.load(Compiler.java:6952)
    at clojure.lang.RT.loadResourceScript(RT.java:359)
    at clojure.lang.RT.loadResourceScript(RT.java:350)
    at clojure.lang.RT.load(RT.java:429)
    at clojure.lang.RT.load(RT.java:400)
    at clojure.core$load$fn__4890.invoke(core.clj:5415)
    at clojure.core$load.doInvoke(core.clj:5414)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5227)
    at clojure.core$load_lib.doInvoke(core.clj:5264)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:603)
    at clojure.core$load_libs.doInvoke(core.clj:5298)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:603)
    at clojure.core$require.doInvoke(core.clj:5381)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at user$eval1.invoke(cljsc.clj:9)
    at clojure.lang.Compiler.eval(Compiler.java:6511)
    at clojure.lang.Compiler.load(Compiler.java:6952)
    at clojure.lang.Compiler.loadFile(Compiler.java:6912)
    at clojure.main$load_script.invoke(main.clj:283)
    at clojure.main$script_opt.invoke(main.clj:343)
    at clojure.main$main.doInvoke(main.clj:427)
    at clojure.lang.RestFn.invoke(RestFn.java:436)
    at clojure.lang.Var.invoke(Var.java:423)
    at clojure.lang.AFn.applyToHelper(AFn.java:167)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)

  (in /Users/pivotal/workspace/tracker-ui/app/assets/javascripts/tracker/collections/panel_items_clj.cljs)

Caused by the following namespace required into a js file

(ns tracker.PanelItemsClj)

Running java 1.7.0_51

AshtonKem commented 10 years ago

Digging a little deeper, it seems that clementine might not be playing well with the way we use guard and unicorn. I'll see if I can get a small test case to show the issue.

AshtonKem commented 10 years ago

Nope, happens when using rails s -p 4000. Looks like clementine didn't install/use the Guava dependencies that Clojurescript needs?

edbond commented 10 years ago

I think clementine uses vendored clojurescript https://github.com/yokolet/clementine/tree/master/ext and it may be very old. I would not use clementine, use lein cljs-build and add generated .js to your assets path in application.rb

edbond commented 10 years ago

sorry, I didn't see it's a clementine repo :)

edbond commented 10 years ago

You can try https://github.com/luke0x/clementine fork, he uses clojurescript as git submodule.

luke0x commented 10 years ago

My fork was to try suggestions found in various issues and blog posts but none of them worked. I put this on hold + still don't have a solution for auto-compiling of CLJS in dev mode in Rails.