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?

Mark Karpov
  • 7,499
  • 2
  • 27
  • 62

1 Answers1

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"]]}}
Alex Ott
  • 80,552
  • 8
  • 87
  • 132
  • 1
    How does Leiningen know where to find cider-nrepl files? – Mark Karpov Aug 20 '14 at 09:41
  • 1
    It somehow works, it must be super-stupid question, but thanks anyway! – Mark Karpov Aug 20 '14 at 09:47
  • 1
    Lein downloads them from clojars, and it's loaded when CIDER starts new nrepl session or connects to the existing... – Alex Ott Aug 20 '14 at 10:21
  • 1
    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. – noisesmith Aug 20 '14 at 14:04
  • 2
    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. – Yu Shen Nov 12 '14 at 03:34
  • @YuShen https://stackoverflow.com/questions/28149409/clojure-profiles-clj-not-getting-honored-in-some-projects-when-using-cider – user7610 Mar 08 '15 at 15:58
  • 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\\.lein\profiles.clj once I put the customization at the right directory, it works as expected. No more problem. – Yu Shen Mar 10 '15 at 01:52