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

New
ianwillie
Hello Brian, I have some problems with running the code in your book. I like the style of the book very much and I have learnt a lot as...
New
yulkin
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
New
JohnS
I can’t setup the Rails source code. This happens in a working directory containing multiple (postgres) Rails apps. With: ruby-3.0.0 s...
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
fynn
This is as much a suggestion as a question, as a note for others. Locally the SGP30 wasn’t available, so I ordered a SGP40. On page 53, ...
New
digitalbias
Title: Build a Weather Station with Elixir and Nerves: Problem connecting to Postgres with Grafana on (page 64) If you follow the defau...
New
hazardco
On page 78 the following code appears: <%= link_to ‘Destroy’, product, class: ‘hover:underline’, method: :delete, data: { confirm...
New
tkhobbes
After some hassle, I was able to finally run bin/setup, now I have started the rails server but I get this error message right when I vis...
New
gorkaio
root_layout: {PentoWeb.LayoutView, :root}, This results in the following following error: no “root” html template defined for PentoWeb...
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
Devtalk
Reading something? Working on something? Planning something? Changing jobs even!? If you’re up for sharing, please let us know what you’...
1021 17094 374
New
malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
PragmaticBookshelf
“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin Even when you’re ultimately right about what the future ho...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
foxtrottwist
A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New

Sub Categories: