jlangson

jlangson

Web Development with Clojure, Third Edition - reitit error in chapter 2 (page 43)

Hello,

I’ve been following along with the book and I am having an issue with “reitit” in Chapter 2. I downloaded the source code included with the book and diffed it to what I had typed. I can’t figure out what I am doing wrong.

As far as I can tell my project.clj and core.clj are the same as the book’s.

The error message is

Syntax error (FileNotFoundException) compiling at (ring_app/core.clj:1:1).
Could not locate reitit/ring/as__init.class, reitit/ring/as.clj or reitit/ring/as.cljc on classpath.

my code is here GitHub - jlangson/ring-app-demo

I am currently at commit 820154c337e2fbc988840bc895353c92f0a3636b

My suggestion is to add clarification to help avoid whatever is causing my error.

@Dmitri and @svmbrown (author tags added by @Margaret)

First Post!

Dmitri

Dmitri

Author of Web Development with Clojure

Hi, it looks like that might be an artifact of how you’re starting the app. It might be that the project wasn’t imported into intellij as a Leiningen project. Try reimporting it using File->New->From Existing Sources and make sure you select Leiningen in the menu.

If you start the app in the github repo using lein run from the terminal, you should see something like the following:

2021-04-15 12:29:30.111:INFO::main: Logging initialized @2866ms to org.eclipse.jetty.util.log.StdErrLog
2021-04-15 12:29:30.583:INFO:oejs.Server:main: jetty-9.4.31.v20200723; built: 2020-07-23T17:57:36.812Z; git: 450ba27947e13e66baa8cd1ce7e85a4461cacc1d; jvm 12.0.1+12
2021-04-15 12:29:30.638:INFO:oejs.AbstractConnector:main: Started ServerConnector@2ca132ad{HTTP/1.1, (http/1.1)}{0.0.0.0:3000}
2021-04-15 12:29:30.638:INFO:oejs.Server:main: Started @3393ms

and you’ll be able to navigate to localhost:3000 in the browser. So, the project itself looks like it’s working.

Where Next?

Popular Pragmatic Bookshelf topics Top

jon
Some minor things in the paper edition that says “3 2020” on the title page verso, not mentioned in the book’s errata online: p. 186 But...
New
johnp
Hi Brian, Looks like the api for tinydb has changed a little. Noticed while working on chapter 7 that the .purge() call to the db throws...
New
raul
Page 28: It implements io.ReaderAt on the store type. Sorry if it’s a dumb question but was the io.ReaderAt supposed to be io.ReadAt? ...
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
AleksandrKudashkin
On the page xv there is an instruction to run bin/setup from the main folder. I downloaded the source code today (12/03/21) and can’t see...
New
alanq
This isn’t directly about the book contents so maybe not the right forum…but in some of the code apps (e.g. turbo/06) it sends a TURBO_ST...
New
gilesdotcodes
In case this helps anyone, I’ve had issues setting up the rails source code. Here were the solutions: In Gemfile, change gem 'rails' t...
New
New
Henrai
Hi, I’m working on the Chapter 8 of the book. After I add add the point_offset, I’m still able to see acne: In the image above, I re...
New
ggerico
I got this error when executing the plot files on macOS Ventura 13.0.1 with Python 3.10.8 and matplotlib 3.6.1: programming_ML/code/03_...
New

Other popular topics Top

Devtalk
Hello Devtalk World! Please let us know a little about who you are and where you’re from :nerd_face:
New
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
PragmaticBookshelf
“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin Even when you’re ultimately right about what the future ho...
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
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
New
AstonJ
If you want a quick and easy way to block any website on your Mac using Little Snitch simply… File > New Rule: And select Deny, O...
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: