Fork me on GitHub
#sql
<
2018-06-13
>
bwstearns16:06:36

So I'm trying to follow the setup for https://github.com/JarrodCTaylor/authenticated-compojure-api and I'm getting the following error Caused by: org.postgresql.util.PSQLException: This ResultSet is closed and I followed the issue to the call in query_defs.clj and found :start (conman/connect! pool-spec) but I'm kinda stumped on where to go from there. Anyone run into this before?

seancorfield16:06:27

Sounds like you're trying to realize a lazy sequence outside the scope of a connection?

bwstearns16:06:22

That's what's confusing me though, I haven't modified any code.

bwstearns16:06:33

Maybe the template has a bug :thinking_face:

seancorfield16:06:00

Have you specified the environment variables correctly? There are a lot of moving parts in that template.

bwstearns16:06:58

ah. that might be part of it. Thought they were specified in profiles.clj, I'll try the env vars

seancorfield16:06:03

Looks like you can edit the generated ./profiles.clj file to set default values for them.

seancorfield16:06:22

There are a lot of libraries in that template that I have no experience with so if you're having problems, I'd recommend pinging the author (who is not in this channel) @jarrodctaylor

bwstearns16:06:15

ok cool. yeah I was looking through it, definitely a lot (got confused for a second by the sendinblue references since I hadn't heard of them before haha)

seancorfield16:06:18

I tend to be wary of templates that dump a whole big ball of libraries on me, unless I'm already familiar with those libraries.

seancorfield16:06:55

(I pretty much never use templates to start a new project, beyond the built-in app template)

bwstearns16:06:24

That's fair. I'd used the compojure-api one before and it had worked nicely out of the box so when I saw the authed one I figured I'd give it a go and save myself the hassle of writing auth. I might just go back to the simple one.

jarrodctaylor22:06:12

@bwstearns The following gets an example project up with a successful test run for me. - lein new authenticated-compojure-api example-auth - cd example-auth - psql < script/init_database.sql - lein migratus migrate && lein with-profile test migratus migrate - lein test

bwstearns22:06:20

@jarrodctaylor thanks for popping in. I just tried running that and it bombed out on the lein migratus migrate step.