What I want:
I have a clojure program on a remote site, let's call it
What I want to do is connect to a
nrepl-ritz from my laptop, preferably using
nrepl-ritz-jack-in. The jack in works fine for a local program, but doesn't seem to connect to a remote program.
C-x C-f on
Emacs appears to hang. If I go to the
*nrepl-server* buffer, I see this:
Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.flatland.drip.Main.invoke(Main.java:117) at org.flatland.drip.Main.start(Main.java:88) at org.flatland.drip.Main.main(Main.java:64) Caused by: java.lang.AssertionError: Assert failed: project at leiningen.ritz_nrepl$start_jpda_server.invoke(ritz_nrepl.clj:23) at leiningen.ritz_nrepl$ritz_nrepl.doInvoke(ritz_nrepl.clj:95)
(and tons of other lines, too…)
I am using
drip on my laptop, but not on
mccarthy, so clearly
nrepl-ritz-jack-in is not detecting that it's a remote file. Regular old
nrepl-jack-in will work as expected in this case, however.
I also tried starting an
mattox@mccarthy$ lein ritz-nrepl nREPL server started on port 42874
From my laptop I forward a port so local
42874 connects to
ssh -L 42874:localhost:42874 -N mccarthy
Then, from my local Emacs:
This gives me a connection:
; nREPL 0.1.7-preview user>
So to test it out, I run
It gives me a nice table of threads.
user> (/ 1 0)
This hangs, but sometimes shows a hidden debugging buffer with some restarts available. If I tell it to pass the exception back to the program, it never gives control back to the REPL.
I've done plenty of searches but have not been able to get anything more specific than "make sure lein is on your path" (And I did do that, on both machines…).