Fork me on GitHub
#cider
<
2017-04-04
>
dpsutton11:04:45

inspect that variable exec-path. If your install of lein can be located here you've got a problem, but otherwise add it with (add-to-list exec-path "my/path\to\lein.bat")

jjttjj17:04:27

@dpsutton yeah the directory was there but not the .bat file, but even after I added it I'm still getting the same error. Same with trying the previous two release versions of cider-nrepl

dpsutton17:04:00

can you verify that c:\Users/justin/.lein/bin/lein.bat exists?

jjttjj17:04:03

yes it's there and works from the emacs shell

dpsutton17:04:31

can you M-x toggle-debug-on-error and then try again

dpsutton17:04:39

should give a stack trace so we can investigate a little more

dpsutton17:04:52

i don't think this is related to a particular version of cider but is local to you

jjttjj17:04:05

Hmm doesn't seem to give much more info:

Debugger entered--Lisp error: (error "Could not start nREPL server: The system cannot find the path specified.

")
  signal(error ("Could not start nREPL server: The system cannot find the path specified.
\n"))
  error("Could not start nREPL server: %s" "The system cannot find the path specified.
\n")
  nrepl-server-sentinel(#<process nrepl-server> "exited abnormally with code 1\n")

dpsutton17:04:51

let me run to lunch and i'll look into this later.

dpsutton17:04:05

can you run lein repl from the cmd line and verify that it starts up in this project?

jjttjj17:04:46

thanks for the help in advanced! Yeah I've been doing lein repl and then cider-connect to get around this

jjttjj17:04:40

so it's not incredibly high priority. I've mostly been using boot for a year which works fine with cider and have just done this workaround whenever working with lein, so it's not an incredibly high priority, just figured i'd get to the bottom of it

dpsutton17:04:58

wow. that's a long time to work around

dpsutton17:04:10

sorry about that

dpsutton17:04:09

;; On Windows, a failed start sends the "finished" event. On Linux it sends
     ;; "exited abnormally with code 1".

jjttjj17:04:57

Hmm, strange, I'm on windows

dpsutton17:04:07

yeah that's super bizarre

jjttjj17:04:11

ok it seems that my .lein/profiles.clj isn't being loaded

dpsutton17:04:21

how did you figure that out?

jjttjj17:04:24

the latest cider-nrepl snapshot is used no matter what i specify there

dpsutton17:04:35

what do you prefer?

dpsutton17:04:46

it's best to let them reference each other unless you have a specific objective

jjttjj17:04:14

oh ok so that's expected behavior then. i'm not picky but the latest if fine i guess, except that I was going to check if the latest version was the issue here

dpsutton17:04:29

what's in your lein profiles ?

dpsutton17:04:37

and what made you think it wasn't loaded

jjttjj17:04:58

profile is just {:user {:plugins [[cider/cider-nrepl "0.14.0"]]}}

dpsutton17:04:18

ah, yeah you can get rid of that. cider ensures it's matching version gets installed

jjttjj17:04:20

and the error message references version 15

dpsutton17:04:47

where does the error message reference 15?

jjttjj17:04:03

Starting nREPL server via "c:/Users/justin/.lein/bin/lein.bat" update-in :dependencies conj ^"[org.clojure/tools.nrepl \^"0.2.12\^" :exclusions [org.clojure/clojure]]^" -- update-in :plugins conj ^"[refactor-nrepl \^"2.3.0-SNAPSHOT\^"]^" -- update-in :plugins conj ^"[cider/cider-nrepl \^"0.15.0-SNAPSHOT\^"]^" -- repl :headless :host ::...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: The system cannot find the path specified.


error in process sentinel: Could not start nREPL server: The system cannot find the path specified.

jjttjj17:04:23

in the plugins there

dpsutton17:04:49

ok. remove that lein profiles file (or rename it so it's not seen for right now) and try to jack in again

dpsutton17:04:04

may not be the worst idea to nuke your cider maven directory

dpsutton17:04:09

~/.m2/repository/cider

dpsutton17:04:59

and if you can do this in a fresh copy of emacs without many buffers open and see if it's leaving any server buffers open with some more info in them

jjttjj17:04:07

hmmm so removing the profiles.clj didn't work

dpsutton17:04:13

be nice to know if we could find out what path can't be found

jjttjj17:04:17

nor did nuking the cider repo

dpsutton17:04:23

hmm. bummer

jjttjj17:04:57

but when i attempted to jack in after nuking the repo, it didn't fetch the cider-nrepl repo again, shouldn't that have happened?

dpsutton17:04:06

yeah absolutely

dpsutton17:04:38

you're not on windows 10 by any chance are you?

dpsutton17:04:39

and my longshot hunch is that it's hitting the linux subsystem which is why we are seeing the "exited abnormally with code1". this is a hail mary

dpsutton17:04:02

or perhaps lein isn't installed there

dpsutton17:04:24

so it's confused, as it asks if lein is installed, which it is (in windows) and then tries to run the linux command and it's not there

dpsutton17:04:57

no lie, if this is it i'm gonna be pretty stoked at the diagnosis

dpsutton17:04:02

how are you running emacs

jjttjj17:04:23

a taskbar shortcut that looks like it's just calling emacs.exe

dpsutton17:04:47

ok so you're not running it from the cmd line?

jjttjj17:04:55

hmm i could try compatibility mode for windows 8

dpsutton17:04:58

do you have the linux subsystem enabled or anything?

jjttjj17:04:13

not that i'm aware

jjttjj17:04:37

i have cygwin installed not sure if that could mess with anything

dpsutton17:04:58

i think that could be part of our problem

dpsutton17:04:09

and the thing that makes me suspicious is that we are getting the "linux" exit code

dpsutton17:04:23

can you put your exec-path here

dpsutton17:04:39

maybe the sentiment was correct but instead of linux subsystem we're hitting cygwin

jjttjj17:04:16

exec-path is a variable defined in `C source code'.
Its value is
("c:/Users/justin/.lein/bin/lein.bat" "c:/Rtools/bin" "c:/Rtools/gcc-4.6.3/bin" "C:/Program Files (x86)/NVIDIA Corporation/PhysX/Common" "C:/tools/ruby215/bin" "C:/ProgramData/Oracle/Java/javapath" "C:/Windows/system32" "C:/Windows" "C:/Windows/System32/Wbem" "C:/Windows/System32/WindowsPowerShell/v1.0/" "C:/ProgramData/chocolatey/bin" "C:/Program Files (x86)/Windows Live/Shared" "C:/Program Files/Java/jdk1.8.0_20/bin" "C:/Program Files (x86)/Plantronics/Spokes3G/" "C:/Program Files (x86)/Heroku/bin" "C:/Program Files (x86)/git/cmd" "C:/Program Files (x86)/GNU/GnuPG/pub" "C:/bin/strawberry/c/bin" "C:/bin/strawberry/perl/site/bin" "C:/bin/strawberry/perl/bin" "C:/Program Files (x86)/nodejs/" "C:/WINDOWS/system32" "C:/WINDOWS" "C:/WINDOWS/System32/Wbem" "C:/WINDOWS/System32/WindowsPowerShell/v1.0/" "C:/Program Files (x86)/Calibre2/" "C:/Program Files (x86)/Skype/Phone/" "C:/Program Files/Git/cmd" "C:/Program Files/TortoiseGit/bin" "C:/Program Files (x86)/Geth" "C:/Users/justin/Anaconda3" "C:/Users/justin/Anaconda3/Scripts" "C:/RailsInstaller/Git/cmd" "C:/RailsInstaller/Ruby2.1.0/bin" "C:/Users/justin/.lein/bin" "C:/Program Files/Java/jre1.8.0_25/bin" "C:/Users/justin/bin" "C:/bin/apache-maven-3.1.1/bin" "C:/Program Files/Boot2Docker for Windows" "C:/Program Files/R/R-3.2.2/bin" "C:/Program Files/R/R-3.2.0/bin/i386" "C:/Users/justin/AppData/Roaming/npm" "C:/Users/justin/AppData/Local/atom/bin" "C:/Program Files/MongoDB/Server/3.0/bin" "C:/Program Files (x86)/Graphviz2.38/bin" "C:/Program Files/Docker Toolbox" "%USERPROFILE%/AppData/Local/Microsoft/WindowsApps" "." "c:/ProgramData/chocolatey/lib/Emacs/tools/libexec/emacs/24.4/i686-pc-mingw32")

Original value was 
("." "C:/msys/local/bin" "c:/mingw/bin" "C:/msys/bin" "c:/Windows/system32" "c:/Windows" "c:/Windows/System32/Wbem" "c:/Windows/System32/WindowsPowerShell/v1.0/" "c:/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static" "C:/msys/home/Dani/bin" "c:/Program Files (x86)/Bazaar" "c:/msys/home/dani/emacs/emacs-24.4-build/lib-src" "%emacs_dir%/libexec/emacs/24.4/i686-pc-mingw32")

dpsutton17:04:17

and that would explain why we haven't redownloaded the cider nrepl middleware in maven

dpsutton17:04:28

alright that may be what's up

dpsutton17:04:35

the emacs may be a "cygwin" emacs

dpsutton17:04:55

go look in programdata/chocolatey/lib/emacs and see if there's a non mingw emacs

dpsutton17:04:03

runemacs.exe or just a plain jane emacs.exe

dpsutton17:04:14

or conversely, try to install lein in cygwin?

dpsutton17:04:28

based off of this comment from the above link: > Emacs would play nicer with other cygwin utilities if "~" meant the current user's home directory (Desktop's parent folder), instead of the appdata/roaming folder. Could the next version do this?

jjttjj17:04:31

ok sweet! the runemacs.exe seems to not be working but will attempt to install lein in cygwin

jjttjj17:04:04

Wooo got it working!

jjttjj17:04:59

I think I just upgraded the chocolatey version and that solved it

jjttjj17:04:43

alternatively programdata/chocolatey/lib/emacs might not have been the correct location and when i ran things from C:\ProgramData\chocolatey\lib\Emacs\tools\bin it just worked. Not sure if this would have worked prior to upgrading

jjttjj17:04:49

but thanks so much for you help!

dpsutton17:04:18

I'm really glad it's working