Clojure lein ring服务器:“;那';“这不是一项任务”;
我正在尝试为compojure构建hello world示例,但它无法启动ring任务Clojure lein ring服务器:“;那';“这不是一项任务”;,clojure,leiningen,compojure,luminus,Clojure,Leiningen,Compojure,Luminus,我正在尝试为compojure构建hello world示例,但它无法启动ring任务 $ lein version Leiningen 1.7.1 on Java 1.7.0_65 OpenJDK 64-Bit Server VM $ lein new compojure test Created new project in: /home/myaccount/test Look over project.clj and start coding in compojure/core.clj $
$ lein version
Leiningen 1.7.1 on Java 1.7.0_65 OpenJDK 64-Bit Server VM
$ lein new compojure test
Created new project in: /home/myaccount/test
Look over project.clj and start coding in compojure/core.clj
$ cd test/
$ lein ring server
That's not a task. Use "lein help" to list all tasks.
我也试过在夜光上使用hello world,它也表示找不到该任务或其他例子,lein抱怨我使用了错误数量的参数,即使我直接从他们的角度出发
我怀疑您缺少
project.clj
文件中的ring和compjure插件:
(defproject compojure "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"]]
:plugins [[lein-ring "0.8.8"]
[compojure "1.1.6"]]
;; once you have the above, you'll see that you need
;; to configure ring. This is the most simple example:
:ring {:handler compojure.core/handler})
当然,您必须在src/compojure/core.clj
中定义一个处理函数!看到或看到
(defproject compojure "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"]]
:plugins [[lein-ring "0.8.8"]
[compojure "1.1.6"]]
;; once you have the above, you'll see that you need
;; to configure ring. This is the most simple example:
:ring {:handler compojure.core/handler})