I can't initialize neither swank nor clojure-jack-in
Asked Answered
C

4

8

I've a problem. I've installed clojure, slime, slime-repl and elein using marmalade. Now I open my project and call elein-swank. I get this:

Starting swank..
error in process filter: slime-presentation-init-keymaps: Symbol's function definition is void: slime-define-both-key-bindings
error in process filter: Symbol's function definition is void: slime-define-both-key-bindings

and If I try clojure-jack-in I get

Debugger entered--Lisp error: (error "Could not start swank server: That's not a task. Use \"lein help\" to list all tasks.
signal(error ("Could not start swank server: That's not a task. Use \"lein help\" to list all tasks.\n"))
error("Could not start swank server: %s" "That's not a task. Use \"lein help\" to list all tasks.\n")
  clojure-jack-in-sentinel(#<process swank> "exited abnormally with code 1\n")

What can I do?

Cirilo answered 25/11, 2011 at 3:12 Comment(0)
R
6

I'm not sure what elein is, but I think for clojure-jack-in you need to install the swank-clojure plugin:

lein plugin install swank-clojure 1.3.3
Rudolph answered 25/11, 2011 at 4:15 Comment(4)
nop..it doesn't work neither...I install it but I receive the same message than beforeCirilo
Make sure you have the latest versions of swank-clojure and leiningen. Type "lein help" on the command line to see if you have a jack-in task. If not, you're missing the swank-clojure part...Coir
Also call lein deps in the project dir before trying to jack-in. If you're missing some deps, lein will download them, but will output additional line(s) which may confuse clojure-jack-in parsing (it happened to me just yesterday).Coir
FYI, the install command should be lein plugin install swank-clojure 1.3.3.Melar
C
4

update: as of 2013, M-x nrepl-jack-in is preferred


The jack-in method is the preferred one, but you may also try the old favorite: run

$ lein swank

from the project's main dir, and then:

M-X slime-connect

from emacs. You still need swank-clojure:

$ lein plugin install swank-clojure 1.3.3
Coir answered 25/11, 2011 at 6:57 Comment(1)
To be more precise - clojure-jack-in and the whole swank-clojure support was removed in clojure-mode 2.0.0. nrepl.el is now the only game in town.Denim
K
1

this happened to me when i cloned someone else's clojure project from an older version. their project.clj had:

:dev-dependencies [[lein-clojars "0.5.0"]
                   [swank-clojure "1.2.1"]]

which is incorrect, i think, if you're using M-x clojure-jack-in. removing these lines, running lein deps and jacking in worked for me.

Kahle answered 29/3, 2012 at 3:35 Comment(0)
K
0

If you're using lein 2, then try adding {:user {:plugins [[lein-swank "1.4.4"]] } } to ~/.lein/profiles.clj. see the Plugins section of https://github.com/technomancy/leiningen/wiki/Upgrading and https://github.com/technomancy/swank-clojure

Kotick answered 24/12, 2012 at 23:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.