1

I am deploying a Clojure project built on luminus on Ubuntu server. When I try to start my server I get the following exception:

Exception Directory does not exist: resources  ring.middleware.file/ensure-dir (file.clj:12)

This is my project.clj file

(defproject big5 "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [lib-noir "0.5.0"]
                 [compojure "1.1.5" :exclusions [ring/ring-core]]
                 [com.cemerick/friend "0.1.5"]
                 [ring-server "0.2.7"]
                 [clabango "0.5"]
                 [korma "0.3.0-RC6"]
                 [mysql/mysql-connector-java "5.1.6"]
                 [com.taoensso/timbre "2.7.1"]
                 [com.taoensso/tower "2.0.1"]
                 [com.postspectacular/rotor "0.1.0"]
                 [markdown-clj "0.9.19"]
                 [clj-json "0.5.3"]
                 [clj-time "0.6.0"]
                 [log4j "1.2.17"
                  :exclusions
                  [javax.mail/mail
                   javax.jms/jms
                   com.sun.jdmk/jmxtools
                   com.sun.jmx/jmxri]]
                 [org.slf4j/slf4j-log4j12 "1.7.5"]]
  :plugins [[lein2-eclipse "2.0.0"]
            [lein-ring "0.8.7"]
            [lein-midje "3.0.0"]]
  :ring {:handler big5.handler/war-handler
         :init    big5.handler/init
         :destroy big5.handler/destroy}
  :profiles
  {:production {:ring {:open-browser? false
                       :stacktraces?  false
                       :auto-reload?  false}}
   :dev {:dependencies [[ring-mock "0.1.3"]
                        [ring/ring-devel "1.1.8"]
                        [midje "1.5.1"]]}}
  :min-lein-version "2.0.0")
juan.facorro
  • 9,791
  • 2
  • 33
  • 41
oloo
  • 319
  • 2
  • 9
  • thanks. I realised that git does not commit empty folders and my resources folder was empty – oloo Mar 20 '14 at 15:17

1 Answers1

1

I believe Leiningen uses the resources directory as the classpath root. Typically resources/public is where you store your static web assets like images, javascript, and stylesheets. If you create those directories you should be good.

Here are some references for you:

Resources in Clojure applications

Serving static files with ring/compojure - from a war

Finally, from the luminus documentation itself:

http://www.luminusweb.net/docs#anatomy_of_a_luminus_application

Community
  • 1
  • 1
Kevin
  • 24,871
  • 19
  • 102
  • 158