Load-file not working in REPL

Hello All,

I am learning clojure, I wrote a clojure code that needs to load a file, strangely I found load-file does not work in REPL, but works when I execure the program with clj. Take a look at screen shot attached:

Is there any thing I am missing?

Thank you.

I found the answer. I installed leiningen with brew. That should not be done. Go to its website and follow the installation instructions. It works like charm.

Add and evaluate a namespace declaration in the start of a clojure file, even for loose files that aren’t in projects. A number of confusing errors clear up which are easy to think have other causes.

1 Like

If you had used an absolute path, instead of classpath-relative file path, it probably would have worked. Looks like the brew package is ignorant of lein’s project-relative classpath setup. Weird.

1 Like