This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-18
Channels
- # alda (8)
- # aws (1)
- # bangalore-clj (1)
- # beginners (55)
- # boot (114)
- # capetown (2)
- # cljs-dev (51)
- # cljsjs (1)
- # cljsrn (14)
- # clojure (119)
- # clojure-belgium (6)
- # clojure-brasil (9)
- # clojure-conj (2)
- # clojure-greece (1)
- # clojure-korea (2)
- # clojure-poland (12)
- # clojure-russia (64)
- # clojure-spec (12)
- # clojure-uk (60)
- # clojurescript (159)
- # code-reviews (2)
- # component (4)
- # core-matrix (2)
- # cursive (79)
- # datascript (7)
- # datomic (2)
- # defnpodcast (4)
- # events (2)
- # hoplon (13)
- # jobs (2)
- # lein-figwheel (1)
- # off-topic (10)
- # om (42)
- # onyx (60)
- # pedestal (5)
- # perun (7)
- # rdf (4)
- # re-frame (4)
- # reagent (21)
- # ring-swagger (25)
- # schema (1)
- # spacemacs (52)
- # specter (1)
- # utah-clojurians (1)
- # yada (5)
So I did the steps on this page : https://github.com/boot-clj/boot/wiki/For-Cursive-Users
but now I see this error message :
C:\Users\rwobb\Desktop\myfw1app>boot run
clojure.lang.ExceptionInfo: No such namespace: io
data: {:file
"C:\\Users\\rwobb\\AppData\\Local\\Temp\\boot.user7408732611522524514.clj",
:line 15}
java.lang.RuntimeException: No such namespace: io
...
boot.main/-main/fn main.clj: 196
boot.main/-main main.clj: 196
...
boot.App.runBoot App.java: 399
boot.App.main App.java: 488
...
Boot.main Boot.java: 258
@micha : here it is :
(def version "0.1.0-SNAPSHOT")
(task-options!
aot {:namespace #{'myfw1app.main}}
pom {:project 'myfw1app
:version version
:description "FIXME: write this!"}
jar {:main 'myfw1app.main
:file (str "myfw1app-" version "-standalone.jar")})
(set-env! :resource-paths #{"src" "resources"}
;; the org.clojure/clojure dependency here only affects
;; what is bundled in the uberjar via the build task so
;; be careful if it is different to the version you have
;; configured for Boot!
:dependencies '[[org.clojure/clojure "RELEASE"]
[framework-one "RELEASE"]
; comment this out if you don't want
; to use http-kit at all:
[http-kit "RELEASE"]])
(deftask build []
(comp (aot) (pom) (uber) (jar) (target :dir #{"target"})))
(deftask run
[p port PORT int "the port on which to run the application."
c config ARG=VAL {kw str} "the config map for the application."]
(require '[myfw1app.main :as app])
((resolve 'app/start) port config))
(defn- generate-lein-project-file!
[& {:keys [keep-project] :or {:keep-project true}}]
(let [pfile (io/file "project.clj")
pname (or (get-env :project) 'boot-project)
pvers (or (get-env :version) "0.1.0-SNAPSHOT")
prop #(when-let [x (get-env %2)] [%1 x])
head (list* 'defproject pname pvers
(concat
(prop :url :url)
(prop :license :license)
(prop :description :description)
[:dependencies (get-env :dependencies)
:source-paths (vec (get-env :source-paths))]))
proj (pp-str (concat head (mapcat identity (get-env :lein))))]
(if-not keep-project (.deleteOnExit pfile))
(spit pfile proj)))
(deftask lein-generate
"Generate a leiningen `project.clj` file.
This task generates a leiningen `project.clj` file based on the boot
environment configuration, including project name and version (generated
if not present), dependencies, and source paths. Additional keys may be added
to the generated `project.clj` file by specifying a `:lein` key in the boot
environment whose value is a map of keys-value pairs to add to `project.clj`."
[] (generate-lein-project-file! :keep-project true))
and the
namespace must have already been compiled by the time the clojure compiler tries to compile the (
expression
the only thing I have done is make a template and did the changes so I can work in Cursive with it
if you are going to use a name in a namespace in your program, you must require that namespace first
and you get a "no such namespace" error when evaluating that code because you have not require
that namespace
you will get the same error in any clojure program if you use a name in a namespace that has not been require
d
nope, I see this :
boot.user=> (require '[clojure.string :as str])
nil
boot.user=> str/ends-with?
CompilerException java.lang.RuntimeException: No such var: str/ends-with?, compiling:(C:\Users\rwobb\AppData\Local\Temp\boot.user3676501736451595417.clj:7:1)
Im will try this framework : https://github.com/framework-one/fw1-clj