Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem using redis-clojure with Leiningen
    text
    copied!<p>Hey, I'm new to Clojure and Leiningen and a bit stuck. I've managed to setup a project with Leiningen. I'm able to compile it into an uberjar and run the <code>repl</code>. I've also managed to load a dependency named <code>aleph</code> to run a simple concurrent webserver.</p> <p>The next step for me is to use <code>redis-clojure</code> to access redis. But here I'm stuck. This is my <code>project.clj</code>:</p> <pre><code>(defproject alpha "0.0.1-SNAPSHOT" :description "Just an alpha test script" :main alpha.core :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] [aleph, "0.1.2-SNAPSHOT"] [redis-clojure "1.2.4"]]) </code></pre> <p>And here is my <code>core.clj</code>: Note that I only added the line <code>(:requre redis)</code> according to the example from redis-clojure.</p> <pre><code>(ns alpha.core (:require redis) (:gen-class)) (use `aleph.core 'aleph.http) (defn alpha [channel request] (let [] (enqueue-and-close channel {:status 200 :header {"Content-Type" "text/html"} :body "Hello Clojure World!"})) (println (str request))) (defn -main [&amp; args] (start-http-server alpha {:port 9292})) </code></pre> <p>When I try to run <code>lein repl</code> this happens:</p> <pre><code>java.io.FileNotFoundException: Could not locate redis__init.class or redis.clj on classpath: (core.clj:1) </code></pre> <p>Yes, I have run <code>lein deps</code> and the redis-clojure jar is available in my <code>lib</code> directory. I'm probably missing something trivial, but I've been at this issue for a few hours now and not getting any closer to a solution. Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload