How to tell brew to use system ruby?

I am running brew on linux/ppc64le platform in which ruby 2.6.3 (system) is already installed.

When running brew, I get following error:

$ brew
Error: Cannot find a vendored version of ruby for your ppc64le
processor on Linuxbrew!
Error: Failed to install vendor Ruby.

I would like to ask which config/unix environment that could set Ruby to that of on my system? Much thanks in advance

EDIT: I decide to go ahead compiling my own version of portable ruby 2.6.3 for linux-ppc64le. If you would like to give it a go, feel free to modify your vendor-install.sh:

diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh
index fdd491362..645847476 100644
--- a/Library/Homebrew/cmd/vendor-install.sh
+++ b/Library/Homebrew/cmd/vendor-install.sh
@@ -39,6 +39,11 @@ then
       ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3/portable-ruby-2.6.3.armv6_linux.bottle.tar.gz"
       ruby_SHA="78e36e4671fd08790bfbfda4408d559341c9872bf48a4f6eab78157a3bf3efa6"
       ;;
+    ppc64le)
+      ruby_URL="https://raw.githubusercontent.com/runlevel5/linuxbrew-ppc64le/master/portable-ruby-2.6.3.ppc64le_linux.bottle.tar.gz"
]+      ruby_SHA="e083051b98d125a62c646c32a7d3795113a70ac462ea6db7339ac6579100a292"
+      ;;
   esac
 fi

Hi. We do not support ppc64le processors. There is nothing we can do for you right now, sorry.

Thanks. I was hoping to be able to contribute to add support for ppc64le.

If the system version is already installed and is 2.6.z it should be using that. If it is not you may be able to figure out why by debugging https://github.com/Homebrew/brew/blob/master/Library/Homebrew/utils/ruby.sh and submitting a PR.

You can set the environment variables export HOMEBREW_DEVELOPER=1 HOMEBREW_RUBY_PATH=… to specify a Ruby executable.

1 Like

Note that this shouldn’t be necessary though so if you figure out why it’s the case we’d love to know :smile: