Clojure Lein - Changing Root Project Folder?
-
I'm starting to learn Clojure using using Lein, however I can't see to get lein to work properly. I used the Windows installer and everything seemed to work fine; no error message and all code I enter in REPL works fine. However when I try to run an example from the book I reading ("Programming Clojure" by Stuart Halloway) I get an error message. Specifically the book has a section on using libraries where it shows how to use an example from the source code provided. It shows to enter
(require 'examples.introduction)
. The error message I get is: FileNotFoundException Could not locate examples/introduction__init.class or examples/introduction.clj on classpath: clojure.lang.RT.load (RT.java:443) I know that the introduction.clj file exist at../Desktop/Programming/code/src/examples/introduction.clj
and there is also a project.clj file that exist at../Desktop/Programming/code/project.clj
From trying to provide the path in different formats, and what I've read online, it seems like I need to set the directory of my project for lein to find the../examples/introduction.clj
, but I haven't found how to do this. I've read the tutorial on lein website and have tried going through it step by step but still nothing. Can anyone provide guidance on how I can get lein to find the file that I specify using the(require)
? This is the first day I'm using Clojure. Thanks in advance. -
I'm starting to learn Clojure using using Lein, however I can't see to get lein to work properly. I used the Windows installer and everything seemed to work fine; no error message and all code I enter in REPL works fine. However when I try to run an example from the book I reading ("Programming Clojure" by Stuart Halloway) I get an error message. Specifically the book has a section on using libraries where it shows how to use an example from the source code provided. It shows to enter
(require 'examples.introduction)
. The error message I get is: FileNotFoundException Could not locate examples/introduction__init.class or examples/introduction.clj on classpath: clojure.lang.RT.load (RT.java:443) I know that the introduction.clj file exist at../Desktop/Programming/code/src/examples/introduction.clj
and there is also a project.clj file that exist at../Desktop/Programming/code/project.clj
From trying to provide the path in different formats, and what I've read online, it seems like I need to set the directory of my project for lein to find the../examples/introduction.clj
, but I haven't found how to do this. I've read the tutorial on lein website and have tried going through it step by step but still nothing. Can anyone provide guidance on how I can get lein to find the file that I specify using the(require)
? This is the first day I'm using Clojure. Thanks in advance.