Installation of cider-nrepl
Asked Answered
B

1

20

I've installed CIDER 0.7.0 and now when I start it inside of Emacs (via M-x cider-jack-in RET), I get the following warning:

WARNING: CIDER's version (0.7.0) does not match cider-nrepl's version (not installed)

I've downloaded cider-nrepl and found out that it consists of closure code, not emacs lisp code. Since I've started exploring Clojure world just today, and there is no installation instructions on the project page, could you tell me how can I install cider-nrepl?

Betrothed answered 20/8, 2014 at 7:32 Comment(0)
I
27

You need to put it into lein project.clj or into global lein configuration. Excerpt from official documentation:

Use the convenient plugin for defaults, either in your project's project.clj file or in the :user profile in ~/.lein/profiles.clj.

:plugins [[cider/cider-nrepl "0.7.0"]]

A minimal profiles.clj for CIDER would be:

{:user {:plugins [[cider/cider-nrepl "0.7.0"]]}}
Interwork answered 20/8, 2014 at 9:31 Comment(7)
How does Leiningen know where to find cider-nrepl files?Betrothed
It somehow works, it must be super-stupid question, but thanks anyway!Betrothed
Lein downloads them from clojars, and it's loaded when CIDER starts new nrepl session or connects to the existing...Interwork
The whole purpose of leiningen is to find dependencies, and provide the right versions for each run or build. It uses repos like maven central, sonatype, and clojars to find the deps.Borstal
I don't know why adding :plugins [[cider/cider-nrepl "0.7.0"]] at ~/.lein/profiles.clj does not work. But the same expression: :plugins [[cider/cider-nrepl "0.7.0"]] at the project.clj of my project worked as expected.Thereupon
@YuShen #28149909Callisthenics
I realized that my problem was that I mistook the directory for profiles.clj in Windows. It's not at ~/.lein but at C:\Users\<user_id_in_windows>\.lein\profiles.clj once I put the customization at the right directory, it works as expected. No more problem.Thereupon

© 2022 - 2024 — McMap. All rights reserved.