昨天晚上我花了一些時間弄亂了我的leinigen profiles.clj,以擺脫在我的項目中啓動蘋果酒時所打印的所有錯誤。今天,我去了終端(我喜歡在工作時保持開放),但它不起作用。我認爲這是一個蘋果酒問題,所以我嘗試了Emacs,但即使在Emacs中,如果我不在項目中,repl也不會啓動。如何在項目之外運行lein repl?
這裏的錯誤:
Error loading refactor-nrepl.middleware: clojure.lang.ArityException: Wrong number of args (4) passed to: StringReader, compiling:(abnf.clj:186:28)
Exception in thread "Thread-4" java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context, compiling:(NO_SOURCE_PATH:0:0)
...
Caused by: java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context
我的〜/ .lein/profiles.clj
{:user {:plugins [[lein-try "0.4.3"]
[refactor-nrepl "1.1.0"]
[cider/cider-nrepl "0.9.1"]]
:dependencies [[org.clojure/tools.nrepl "0.2.12"]
[acyclic/squiggly-clojure "0.1.4"]
^:replace [org.clojure/tools.nrepl "0.2.12"]
[refactor-nrepl "1.1.0"]]}}
事物的版本時蘋果酒在項目
; CIDER 0.9.1 (Java 1.8.0_45, Clojure 1.7.0, nREPL 0.2.12)
開始對於Clojure,Leinigen,Emacs等我還是很新的,所以我不確定爲什麼每一個g以上使得我的蘋果酒錯誤消失了,但它確實發生了。我得到的蘋果酒錯誤與nrepl版本過低有關,並沒有安裝某些東西(如refactor-nrepl)。
我知道我可以做一個空的項目,這是我最終可能做的。這只是我撓頭,我曾經能夠在任何地方發射,現在我不能。 –