Search code examples
clojureleiningenvimclojurenailgun

Why is nailgun server throwing 'Could not determine the Namespace of the file' error?


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.


Solution

  • connect: Connection refused
    

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