0

Clojure を使い始めるためにHeroku チュートリアルに取り組んでいますが、ファイルの名前と場所に問題があります。

指示通り、ソースファイルworld.cljを src:に置きますsrc/hello/world.clj。これが今の私のディレクトリです

C:\Users\a\CLOJURE\P2\helloworld\src\hello\world.clj

これは私のproject.clj

(defproject helloworld "1.0.0-SNAPSHOT"
  :description "helloworld project to test heroku and clojure"
  :url "http://helloworld.herokuapp.com"
  :license {:name "license1"
            :url "http://example.com/FIXME"}
  :dependencies [[org.clojure/clojure "1.4.0"]
                 [compojure "1.1.1"]
                 [ring/ring-jetty-adapter "1.1.0"]
                 [ring/ring-devel "1.1.0"]
                 [ring-basic-authentication "1.0.1"]
                 [environ "0.2.1"]
                 [com.cemerick/drawbridge "0.0.6"]]
  :min-lein-version "2.0.0"
  :plugins [[environ/environ.lein "0.2.1"]]
  :hooks [environ.leiningen.hooks]
  :profiles {:production {:env {:production true}}})

これをローカルで実行しようとするとlein run -m hello.world 5000

次のエラーが表示されます

  C:\Users\a\CLOJURE\P2>lein run -m hello.world 5000

  java.io.FileNotFoundException: Could not locate hello/world__init.class or 
  hello/world.clj on classpath:
  ....

ファイルと命名規則を整理するための最良の方法を説明できますか?


編集

CLASSPATH環境変数として作成して追加しましC:\Users\a\CLOJURE\P2\helloworld\src\helloたが、それでも同じエラーが発生します。

4

1 に答える 1

1

Here is:

$ cd clojure_project
$ lein run -m hello.world 5000

http://pastie.org/8379858

于 2013-10-05T16:39:40.943 に答える