Fork me on GitHub
#tools-deps
<
2019-10-23
>
kommen06:10:17

@andy.fingerhut no, that is the part I didn’t understand but also didn’t investigate yet: how brew install clojure came to use truffleruby. truffleruby is not on my PATH…

delaguardo12:10:02

Are you using graalvm with ruby component installed?

delaguardo13:10:03

probably you have graalvm bin directory in your path that overrides /usr/bin

kommen13:10:52

no, that isn’t the case. also running ruby --version in the same shell as the brew commands shows that it uses a ruby version managed by rbenv

delaguardo13:10:06

that is right, but during formula installation it loads new shell session with limited number of tools installed. The best way to check it - brew install --interactive clojure

delaguardo13:10:27

As an example:

Install to this prefix: /usr/local/Cellar/clojure/1.10.1.478
/Users/delaguardo/.zshrc:29: command not found: starship
/Users/delaguardo/.zshrc:32: command not found: jenv
/Users/delaguardo/.zshrc:49: command not found: rbenv
clojure-tools % which ruby
/usr/bin/ruby
clojure-tools % ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]

andy.fingerhut13:10:02

In any case, I saw that Alex Miller has committed a change that I suggested where brew install clojure will run a shell script named install.sh such that it will run ruby using ${HOMEBREW_RUBY_PATH}, which Homebrew should consistently set to the full path name of its own internal ruby executable. This should make brew install clojure much more robust in the face of arbitrary user environments.

andy.fingerhut13:10:45

I don't think that commit is deployed "to the field" yet, but on its way in that direction.

kommen13:10:52

thanks @U04V4KLKC, that would explain it. I will check later

kommen13:10:00

@andy.fingerhut thanks for the info, I’ll make sure to test brew install clojure with the next release

delaguardo13:10:24

> In any case, I saw that Alex Miller has committed a change that I suggested where brew install clojure will run a shell script named install.sh such that it will run ruby using ${HOMEBREW_RUBY_PATH}, which Homebrew should consistently set to the full path name of its own internal ruby executable. This should make brew install clojure much more robust in the face of arbitrary user environments. I’m not sure that this is the best solution. Now brew-install repo has two almost identical scripts that are doing the same thing but differently (using different tools)

delaguardo13:10:59

recently I did some changes - https://github.com/clojure/brew-install/compare/1.10.1...DeLaGuardo:1.10.1 to create one cross-platform installation script

delaguardo13:10:21

Not in PR yet because I was hoping to find some time to build packages for other distribution platforms like debian’s ppa and rpm for centos