Fork me on GitHub
#tools-deps
<
2019-10-20
>
andy.fingerhut21:10:32

This is probably too far off the beaten path to matter to anyone, but I noticed recently that Homebrew is also supported on Linux and Windows with WSL, and so tried out 'brew install clojure' on a Linux system. It seems to set things up in a way that is problematic for clojure finding the system-wide deps.edn file. I know there is the clojure install script for Linux, which is what I have always used before today, and will continue to do so. Just wanted to point this out in case anyone else tries it.

alexmiller22:10:58

What’s the actual problem you saw? clojure actually no longer needs that file

andy.fingerhut22:10:45

After brew install clojure completed with no apparent problems, I tried clojure -Sdescribe and got this message, which at the time stopped me from further experimentation:

$ clojure -Sdescribe
cp: cannot stat 'PREFIX/example-deps.edn': No such file or directory
but I can try other things if you think it would be useful to know.

andy.fingerhut22:10:07

A kind of unusual thing I noted about the results after brew install clojure completed was that Homebrew creates a /home/linuxbrew/.linuxbrew directory, where linuxbrew is a new directory, not the name of any user account on the machine, and puts all (or at least the ones I have seen) brew-installed files inside of that dir.

andy.fingerhut22:10:29

Comparing to my works-better macOS install via brew install clojure earlier, it appears that the Linux clojure shell script has one occurrence of PREFIX that is not replaced with the install directory.

andy.fingerhut23:10:21

I see what happened -- I tried this on an Ubuntu Linux system with minimal install, and it had no ruby executable installed. brew install clojure's install.sh script uses ruby to replace occurrences of the string PREFIX with the install dir. That step of install.sh script failed, leaving the clojure shell script in its original unmodified form.

andy.fingerhut23:10:45

sudo apt-get install ruby, brew uninstall clojure, then brew install clojure made the install go better.

andy.fingerhut23:10:10

Strange that the Homebrew install went well without installing ruby itself.

seancorfield23:10:36

I thought brew used Ruby to do pretty much everything?

seancorfield23:10:05

Perhaps the clojure recipe needs to be updated to explicitly state ruby is a dependency?

seancorfield23:10:36

(I assume brew can be used to install ruby?)