0

I have been working with eclipse + counterclockwise for clojure development, using only the default template for non-web based work. However, I would now like to connect my environment to my localhost apache server. I began a new project, and changed the template from default to clojure-app and it did give me a web based framework in the project.clj file, as follows:

(defproject guestbook "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:dependencies [[org.clojure/clojure "1.6.0"]
             [compojure "1.1.6"]
             [hiccup "1.0.5"]
             [ring-server "0.3.1"]]
:plugins [[lein-ring "0.8.10"]]
:ring {:handler guestbook.handler/app
     :init guestbook.handler/init
     :destroy guestbook.handler/destroy}
:aot :all
:profiles
{:production
{:ring
{:open-browser? true, :stacktraces? false, :auto-reload? false}}
:dev
{:dependencies [[ring-mock "0.1.5"] [ring/ring-devel "1.2.1"]]}})

Next, I try to set up ring through lein ring server in the terminal. But I get this error: "'ring' is not a task. See 'lein help'." I am not sure how to proceed, or exactly what I can do to get the localhost server up.

nmac
  • 610
  • 1
  • 10
  • 20
  • with your project.clj I am able to run lein ring (the failure comes when it tries to find the handler namespace, I only have your project.clj). Are you actually starting ring from the directory with project.clj in it? – noisesmith Jul 22 '14 at 02:45
  • No I'm starting it from my user directory. Like so: `~ user $ lein ring server` If I try to start from project.clj it denies me permission. – nmac Jul 22 '14 at 17:53
  • 1
    hey thanks for your help, but after such a painful set up experience, I migrated over to light table. Much smoother set up. – nmac Jul 22 '14 at 18:28
  • 1
    Just to clarify, project.clj is not a directory or executable, but you cannot run lein ring unless project.clj is inside your current working directory. This is something you need to figure out if you ever plan to use lein from outside your IDE. – noisesmith Jul 22 '14 at 19:54
  • hey I got around to following your suggestion, spot on. – nmac Jul 25 '14 at 19:14
  • possible duplicate of [lein-autodoc with Leiningen 2](http://stackoverflow.com/questions/13978057/lein-autodoc-with-leiningen-2) – Paul Sweatte Jan 29 '15 at 22:07

0 Answers0