java.io.IOException: Permission denied. Please check your access rights for /usr/local/bin/lein/repl-port
at leiningen.repl$repl.invokeStatic (repl.clj:385)
leiningen.repl$repl.doInvoke (repl.clj:316)
clojure.lang.RestFn.invoke (RestFn.java:425)
leiningen.repl$repl.invokeStatic (repl.clj:374)
leiningen.repl$repl.invoke (repl.clj:316)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.RestFn.applyTo (RestFn.java:132)
use the ` at beginning and end
So, brew updated lein to 2.9.1 and now I get this. Did a bunch of searching the web but no obvious clues. Have checked various rights on folders and stuff but most seem fine. Lein works, just not the repl.
So maybe something with opening ports? :thinking_face:
Hi, I'm using yogthos/migratus
to establish code based migrations for my application. I store them in a migrations/ dir under src/clj/. I'm able to run lein run and the migrations appear just fine. However, when I switch to lein uberjar
, the code based migrations don't appear in the class path. Am I missing something? I searched a lot but I can't seem to find any direct clues. Closest thing I saw was this. https://github.com/yogthos/migratus/issues/63 Please let me know if this isn't the right channel for this.
whats ur db spec?
as for running from jar, you need your jar entry point to deal with migrations
so, the jar defines a main-class, that usually resolves to a (defn -main[&args])
that -main should handle the “migrate” case
as for the db-spec, I think migratus expects something like
{:store :database
:init "init.sql"
:migration-dir "migrations"
:db "jdbc:url...."}
@mattias504 what version were you using previously? curious, but may not know your answer
I would think perhaps you have an old file there somehow though that has wrong permissions. Maybe can delete it hah
@lpanda2014 why not store things like discussed in that linked issue?
hmm i tried doing that (putting the clj files in the resources/migrations/ folder) and they were added to the classpath but the migrations wouldn't run
^ @mikerod
Thanks for answering - I think it was 2.9.0? I also realized now that it works normally if I run in a project directory. Just the standalone repl that complains.
I also have no file “/usr/local/bin/lein/repl-port”, so maybe I’m missing something or it’s a message that requires more of the reader 😅
So, when doing cider-jack-in I get this. I assume it is some general version mismatch, but maybe it gives someone something:
For information about GNU Emacs and the GNU system, type C-h C-a.
[nREPL] Starting server via /usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.5.3\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.19.0-SNAPSHOT\"\] -- repl :headless :host localhost...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: clojure.lang.Compiler$CompilerException: Syntax error compiling var at (cider/nrepl/middleware/pprint.clj:74:3).
#:clojure.error{:phase :compile-syntax-check, :line 74, :column 3, :source "cider/nrepl/middleware/pprint.clj", :symbol var}
at clojure.lang.Compiler.analyzeSeq (Compiler.java:7114)
clojure.lang.Compiler.analyze (Compiler.java:6789)
clojure.lang.Compiler.analyze (Compiler.java:6745)
clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3820)
@mattias504 > Just the standalone repl that complains. ah, I never use this, but when in a project dir it does make a repl-port file. seems like that is just a permission issue where lein is running then perhpaps
And you have a question it looks like a cider problem. I think you probably just need to use a newer version of cider
Ah, cool. Haven’t checked Cider version. Thanks!
@mattias504 in modern cider, if you are doing clj (not cljs) I think you want to use cider-jack-in-clj
too, I’m not sure how it compares to cider-jack-in
since that still exists too (maybe it defaults to that or something)
but yeah, I’m wondering if an older jack-in used some too old auto-injected nrepl deps
or perhaps you are providing old versions of middleware in your :dependencies
somehow that are clashing. remember to check ~/.lein/profiles.clj
if you have some setup
I’m new to this stuff - mostly everything is pretty recently installed. Didn’t know about the newer jack-in. That’s the problem with information on the internet 😛
What isyour M-x cider-version
And I’m out-of-touch with the new jack-in’s and how they relate, there is cider-jack-in-clj
, cider-jack-in-cljs
, cider-jack-in-clj&cljs
, and cider-jack-in
new ones make sense to me, not sure what cider-jack-in
does now though
There is a #cider channel though and this may also be in it’s doc pages, so I’ll leave it at that for exploration
if you are up-to-date you think, then perhaps the injection is fine, and maybe your project is throwing an old nrepl middleware on the path some other way.
lein
2.9.x+ I believe changed it’s own clj version to 1.10, which perhaps introduced new compile-time syntax failures. So if you came from 2.9.0, I am a little surprised you’d break to 2.9.1, but there could be more here than I am aware of.
Try updating your CIDER install, it should be using nrepl 0.6.0 and cider-nrepl 0.21.1