This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-24
Channels
- # announcements (1)
- # aws (140)
- # beginners (41)
- # calva (47)
- # cider (43)
- # clj-kondo (36)
- # clojure (178)
- # clojure-europe (12)
- # clojure-gamedev (2)
- # clojure-italy (1)
- # clojure-nl (17)
- # clojure-russia (3)
- # clojure-spec (37)
- # clojure-uk (97)
- # clojurescript (173)
- # core-async (16)
- # cursive (18)
- # data-science (2)
- # datascript (6)
- # datomic (32)
- # dirac (16)
- # duct (16)
- # events (2)
- # figwheel-main (7)
- # fulcro (8)
- # graalvm (18)
- # immutant (3)
- # joker (2)
- # kaocha (8)
- # nrepl (6)
- # nyc (2)
- # off-topic (62)
- # quil (3)
- # re-frame (18)
- # reitit (6)
- # ring-swagger (1)
- # shadow-cljs (119)
- # spacemacs (4)
- # specter (2)
- # tools-deps (10)
- # vim (58)
- # xtdb (9)
Hi, new to duct, any idea why I get db-spec null is missing a required parameter
when adding the following at the end of config.edn
of a fresh lein new duct simple-api +api +ataraxy +example +sqlite
?
:duct.migrator/ragtime
{:migrations [#ig/ref :simple-api.migration/example]}
[:duct.migrator.ragtime/sql :simple-api.migration/example]
{:up ["CREATE TABLE example (id int)"]
:down ["DROP TABLE example"]}
I did the lein duct setup
This was at the REPL, and the template did generate a dev.edn
like so:
{:duct.database/sql
{:connection-uri "jdbc:sqlite:db/dev.sqlite"}}
Most of the time I've used the dev
namespace. The system
and the config
are accessible in it.
https://github.com/jahson/blog-film-ratings/blob/master/dev/src/dev.clj#L12
https://github.com/jahson/blog-film-ratings/blob/master/resources/film_ratings/config.edn here's an example that should work
Hitting another hurdle with duct.database.sql.Boundary cannot be cast to clojure.lang.IFn
...
Ahhh... solved by moving the :duct.database/sql
into the profile. Really, anything not beginning with :duct.module
or :duct.profile
must be in a profile.
Almost right. You can put anything here as long, as it inherits from :duct/module
(https://github.com/duct-framework/module.sql/blob/master/src/duct_hierarchy.edn) or :duct/profile
(https://github.com/duct-framework/core/blob/master/src/duct_hierarchy.edn).
The doc about profiles is not great at the moment, but there's bits of information scattered around.
Like in issues https://github.com/duct-framework/core/issues/19#issuecomment-520406836
Or, in the actual source https://github.com/duct-framework/core/blob/52babf6f0df4846d7e3bf3bc8b16ee47a6898b4c/src/duct/core.clj#L183
Most of the time I've used the dev
namespace. The system
and the config
are accessible in it.
https://github.com/jahson/blog-film-ratings/blob/master/dev/src/dev.clj#L12
Almost right. You can put anything here as long, as it inherits from :duct/module
(https://github.com/duct-framework/module.sql/blob/master/src/duct_hierarchy.edn) or :duct/profile
(https://github.com/duct-framework/core/blob/master/src/duct_hierarchy.edn).
The doc about profiles is not great at the moment, but there's bits of information scattered around.
Like in issues https://github.com/duct-framework/core/issues/19#issuecomment-520406836
Or, in the actual source https://github.com/duct-framework/core/blob/52babf6f0df4846d7e3bf3bc8b16ee47a6898b4c/src/duct/core.clj#L183