Search code examples
emacsclojureleiningenread-eval-print-loopcider

Executing Clojure in Emacs with `cider-jack-in`


I'm trying to run Clojure emacs with cider package installed. I use Emacs 24.5.1 on Mac OS X 10.10.4.

I downloaded lein script and copied the script in ~/Dropbox/bin. I checked with lein repl that Clojure works fine.

cider package is installed with M-x package-install. I edited the ~/.emacs.d/init.el to specify the lein script: (add-to-list 'exec-path "~/Dropbox/bin") with the hint from Can't launch `lein` REPL in Emacs.

However, when I started emacs and run M-x cider-jack-in, I have this error message:

enter image description here

When I started lein repl and executed M-x cider-connect (http://xahlee.info/clojure/clojure_emacs_cider.html), I can have the cider-repl running in Emacs.

enter image description here

What might be wrong?


Solution

  • Another easy solution is to just use homebrew. While homebrew is overkill just for installing lein, if you already use it, then all you need to do is run

    brew update
    brew install leiningen
    

    and your done. I use homebrew to install emacs and some other useful apps, so I already have it on my system.