Web Development with Clojure, Third Edition: migrations/create not working: p159

Title: Web Development with Clojure, Third Edition - migrations/create not working: p159

When I execute the command:

user=> (create-migration "add-users-table")
Execution error (IllegalArgumentException) at user/create-migration (user.clj:48).
find not supported on type: mount.core.DerefableState

user=> (prn env )
#object[mount.core.DerefableState 0x71f00724 {:status :pending, :val nil}]
nil

I downloaded the code and tried too, with the same error. Any suggestion?
Regards

#book-web-development-with-clojure-third-edition

1 Like

This is likely because you haven’t mounted the DB by starting the app.

(in-ns 'guestbook.user)
(start)
(create-migration "foo")
2 Likes

I was running the REPL in another terminal after starting the app with lein run… silly me :). It works as you mentioned, Thank you!

2 Likes