Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to make the it work as dev-dependency #2

Open
murtaza52 opened this issue Jan 5, 2012 · 3 comments
Open

Unable to make the it work as dev-dependency #2

murtaza52 opened this issue Jan 5, 2012 · 3 comments

Comments

@murtaza52
Copy link

Hi,

I am having a weired problem. When I place ring-serve as a dev-dependency, the repl is not able to find it in its path. I have tried it both with eclipse and clooj and both fail to find it and give me the following exception -

=> (use 'ring.util.serve)

<

FileNotFoundException java.io.FileNotFoundException: Could not locate ring/util/serve__init.class or ring/util/serve.clj on classpath: >

Below is my project.clj -

(defproject ring-hello "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"][ring "1.0.1"][compojure "1.0.0"]]
:dev-dependencies[[lein-eclipse "1.0.0"][ring-serve "0.1.2"]])

It however works when I have the ring-serve in the dependencies section!

Can someone please help?

Thanks,
Murtaza

@weavejester
Copy link
Owner

What happens if you try it with just lein repl?

@steni
Copy link

steni commented Aug 3, 2012

I am having the same problem in Emacs.

Having done clojure-jack-in, when I use the repl in emacs, I get:

Could not locate ring/util/serve__init.class or ring/util/serve.clj on classpath:
[Thrown class java.io.FileNotFoundException]

However, when I use lein repl, then:

(use 'ring.util.serve)
nilWarning: html-mode not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic html-mode or change the name. (hiccup/core.clj:9)
Warning: base-url not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic base-url or change the name. (hiccup/core.clj:294)

@upgradingdave
Copy link

Fwiw, I also ran into the exception:

 => (use 'ring.util.serve)
#<
FileNotFoundException java.io.FileNotFoundException: Could not locate ring/util/serve__init.class or ring/util/serve.clj on classpath: >

until I realized that leiningen 2.x no longer supports :dev-dependencies. I switched to use :profiles and that fixed it for me:

(defproject ring-example "0.1.0-SNAPSHOT"
  :description "First steps with ring"
  :url "http://dev.upgradingdave.com/ring-example"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.4.0"]
                 [ring/ring-core "1.1.6"]
                 [ring/ring-jetty-adapter "1.1.6"]]
  :profiles { :dev {:dependencies [[ring-serve "0.1.3-SNAPSHOT"]]}})

I also updated the logger to work with jetty 7+ here (and taged it as 0.1.3-SNAPSHOT): https://github.com/upgradingdave/ring-serve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants