I just tried it and it worked for me. What happened the first time I tried it was that I missed a step: setting the current directory as the project's. I see that this step is also missing from your description, maybe that's the reason it doesn't work in your case.
- Create a new project using
lein new remote
. - Change the current directory
cd remote
. - Start the nREPL server from the project folder with
lein repl :headless
(which I realize now is also different from your description). - Open a new console and start the nREPL client
lein repl :connect localhost:port/repl
in~/.
. - Create the file for the ns in
~/remote/src/remote/one.clj
. - From the client evaluate
(compile 'remote.one)
.
(Using Leiningen 2.3.4 on Java 1.7.0 Java HotSpot(TM) 64-Bit Server VM
and Clojure 1.5.1
).