I just finished my first ever production project with Clojure (yay!) and thoroughly loved the experience of using clojure, lein and lein-ring. Thanks much for contributing such a great deal to the ecosystem.
When we started to package the app up for production, we chose the lein uberjar way for which I needed to have a -main function. After I set all of this up and ran lein ring server-headless, I got more output that said compiling ... and so on. It didn't affect me, so I moved on.
After doing this, when I was editing a file, I kept getting the error saying that the file was readonly. I can however force save the file and it all turns out to be ok but then I don't think this is the right way (and it gets troublesome if I have to do it everytime).
Here is a gist of the smallest code set to reproduce this issue.
The steps that I followed to get this were:
Open a cmd window at project location
run lein ring server-headless and this is what I see:
>lein ring server-headless
Compiling win-ro-problem-test.handler
2015-08-21 16:41:36.198:INFO::main: Logging initialized @2486ms
2015-08-21 16:41:38.596:INFO::main: Logging initialized @1279ms
2015-08-21 16:41:42.000:INFO:oejs.Server:main: jetty-9.2.10.v20150310
2015-08-21 16:41:42.032:INFO:oejs.ServerConnector:main: Started ServerConnector@7ca22ff0{HTTP/1.1}{0.0.0.0:3000}
2015-08-21 16:41:42.032:INFO:oejs.Server:main: Started @4715ms
Started server on port 3000
I then open up handler.clj in an editor window
Go over to http://localhost:3000/foo and verify that the response is shown
Come back to editor window, change response to something else and save (file still isn't readonly)
Go over to the browser and refresh, verifying that the new response is shown
Come back to the editor, file is now readonly.
If I revert the change I made, then the readonly issue goes away. This means that that change is the one that is causing the problem. Also in the gist, i've added the diff of the changes I made to get to the version where I can generate a jar with lein uberjar.
Do let me know if you need any other details. Many thanks.
Hello,
I just finished my first ever production project with Clojure (yay!) and thoroughly loved the experience of using clojure, lein and lein-ring. Thanks much for contributing such a great deal to the ecosystem.
When we started to package the app up for production, we chose the
lein uberjar
way for which I needed to have a-main
function. After I set all of this up and ranlein ring server-headless
, I got more output that saidcompiling ...
and so on. It didn't affect me, so I moved on.After doing this, when I was editing a file, I kept getting the error saying that the file was readonly. I can however force save the file and it all turns out to be ok but then I don't think this is the right way (and it gets troublesome if I have to do it everytime).
Here is a gist of the smallest code set to reproduce this issue.
The steps that I followed to get this were:
run
lein ring server-headless
and this is what I see:handler.clj
in an editor windowhttp://localhost:3000/foo
and verify that the response is shownIf I revert the change I made, then the readonly issue goes away. This means that that change is the one that is causing the problem. Also in the gist, i've added the diff of the changes I made to get to the version where I can generate a jar with
lein uberjar
.Do let me know if you need any other details. Many thanks.