1

I'm trying to get vimclojure going, and would appreciate any help as to what I've done wrong. Here is an error when I try to read project.clj in one of my lein projects:

; Use \p to close this buffer!

Could not determine the Namespace of the file.

This might have different reasons. Please check, that the ng server
is running with the correct classpath and that the file does not contain
syntax errors. The interactive features will not be enabled, ie. the
keybindings will not be mapped.

Reason:
Error executing Nail! (230)
connect: Connection refused

Here are the pertinent lines in ~/.vimrc

filetype off
call pathogen#runtime_append_all_bundles()
filetype plugin indent on
let g:vimclojure#HighlightBuiltins = 1
let g:vimclojure#ParenRainbow = 1
let vimclojure#NailgunClient = "/home/cnorton/bin/ng"
let vimclojure#WantNailgun = 1
:helptags ~/.vim/bundle/VimClojure/doc/

and nailgun is in CLASSPATH

export CLASSPATH=/usr/share/java:/home/cnorton/bin:$CLASSPATH
export VIMCLOJURE_SERVER_JAR="$HOME/bin/server-2.3.0.jar"

What am I missing and/or what have I done wrong? Thank you.

octopusgrabbus
  • 10,555
  • 15
  • 68
  • 131
  • Try using [lein-tarsier](https://github.com/sattvik/lein-tarsier) to manage the nailgun server. – Jeremy Jul 20 '12 at 00:36

1 Answers1

2
connect: Connection refused

You didn't start the server. Or misconfigured the server address/port.

kotarak
  • 17,099
  • 2
  • 49
  • 39
  • How do you start the nailgun server? I tried `$ java com.martiansoftware.nailgun.NGServer Exception in thread "main" ... Caused by: java.lang.ClassNotFoundException: com.martiansoftware.nailgun.NGServer at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) ...` – isomorphismes Feb 06 '13 at 11:13
  • 1
    You have to set up the classpath. A minimum would be `java -cp clojure.jar:vimclojure-server.jar vimclojure.nailgun.NGServer 127.0.0.1`. – kotarak Feb 06 '13 at 11:47
  • Replace the jar names with the actual location of the jars on your machine. (BTW, you probably want something like the lein-tarsier plugin.) (Or you want to look into nrepl and vim-foreplay.) – kotarak Feb 06 '13 at 11:49