simonpeter

simonpeter

Web Development with Clojure, Third Edition: (create-migration "guestbook") not working (page 9)

When I try the command to create a pair of migration files I get an error.

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

user=>

Linux Ubuntu 20.04 LTS, OpenJDK 14.0.2

Marked As Solved

bishax

bishax

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

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

Also Liked

simonpeter

simonpeter

Thank you, I tried that and it worked.

Hopefully that can be added to the instructions in the book so that people like me who are learning Clojure as they are learning how to make web apps using it can be less confused.

bmads_51

bmads_51

Dmitri Sotnikov @dmitri and Scot Brown @svmbrown

Working through this now and encountered same issue, so thanks for this thread!

In addition, I found on p. 9

A common beginner error that you may encounter is forgetting to start the
database connection. If you do get this error, don’t worry—just run (start) and try again. In fact, any error that mentions mount.core.DerefableState is probably due to forgetting to run (start).

But I agree. There should be an additional sentence telling the reader to not only start the REPL (which it does) but to also ‘(start)’ especially since we are a long way from p. 9!

Where Next?

Popular Pragmatic Bookshelf topics Top

sdmoralesma
Title: Web Development with Clojure, Third Edition - migrations/create not working: p159 When I execute the command: user=> (create-...
New
mikecargal
Title: Hands-On Rust (Chapter 11: prefab) Just played a couple of amulet-less games. With a bit of debugging, I believe that your can_p...
New
herminiotorres
Hi! I know not the intentions behind this narrative when called, on page XI: mount() |> handle_event() |> render() but the correc...
New
conradwt
First, the code resources: Page 237: rumbl_umbrella/apps/rumbl/mix.exs Note: That this file is missing. Page 238: rumbl_umbrella/app...
New
Charles
In general, the book isn’t yet updated for Phoenix version 1.6. On page 18 of the book, the authors indicate that an auto generated of ro...
New
rainforest
Hi, I’ve got a question about the implementation of PubSub when using a Phoenix.Socket.Transport behaviour rather than channels. Before ...
New
EdBorn
Title: Agile Web Development with Rails 7: (page 70) I am running windows 11 pro with rails 7.0.3 and ruby 3.1.2p20 (2022-04-12 revision...
New
andreheijstek
After running /bin/setup, the first error was: The foreman' command exists in these Ruby versions: That was easy to fix: gem install fore...
New
a.zampa
@mfazio23 I’m following the indications of the book and arriver ad chapter 10, but the app cannot be compiled due to an error in the Bas...
New
dachristenson
I’ve got to the end of Ch. 11, and the app runs, with all tabs displaying what they should – at first. After switching around between St...
New

Other popular topics Top

AstonJ
There’s a whole world of custom keycaps out there that I didn’t know existed! Check out all of our Keycaps threads here: https://forum....
New
AstonJ
Just done a fresh install of macOS Big Sur and on installing Erlang I am getting: asdf install erlang 23.1.2 Configure failed. checking ...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
AstonJ
Seems like a lot of people caught it - just wondered whether any of you did? As far as I know I didn’t, but it wouldn’t surprise me if I...
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
PragmaticBookshelf
Author Spotlight James Stanier @jstanier James Stanier, author of Effective Remote Work , discusses how to rethink the office as we e...
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
New

Sub Categories: