Brew: Install on Manjaro Linux requires HOMEBREW_FORCE_VENDOR_RUBY

Created on 21 Jan 2020  路  13Comments  路  Source: Homebrew/brew

These questions are N/A as it did not install:

  • [ ] ran brew update and can still reproduce the problem?
  • [ ] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [ ] ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

Install on an up-to-date version of Manjaro Linux which is based upon Arch Linux.

What happened (include command output)

Unfortunately I hadn't configured a long scrollback yet and lost the output, but it was similar to https://stackoverflow.com/questions/54888582/ruby-cannot-load-such-file-active-support-core-ext-object-blank with that same message cannot load such file -- active_support/core_ext/object/blank (LoadError), except ruby version 2.7.0. If you need it, I can destroy the vendor-provided ruby and try reinstalling.

Looking at the script, I noticed that https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh checks for HOMEBREW_FORCE_VENDOR_RUBY. The command HOMEBREW_FORCE_VENDOR_RUBY=1 sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" succeeded.

What you expected to happen

==> Installation successful! message.

I think that at the minimum, a recommendation on https://docs.brew.sh/Homebrew-on-Linux to try HOMEBREW_FORCE_VENDOR_RUBY could help. Another possibility is to fallback to downloading ruby if the installation fails.

Step-by-step reproduction instructions (by running brew commands)

Install Manjaro Linux, install all updates, and then run the script from https://docs.brew.sh/Homebrew-on-Linux

Output of brew config and brew doctor commands

N/A, not installed by the time it broke. UPDATE:
brew config:

HOMEBREW_VERSION: 2.2.4-2-g23108f3
ORIGIN: https://github.com/Homebrew/brew
HEAD: 23108f3c736030070ca1e4673652c20c503a7d02
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/linuxbrew-core
Core tap HEAD: bafaf942e6834f22e0c99ac5f1ff57b1541fd599
Core tap last commit: 2 days ago
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CACHE: /home/ben/.cache/Homebrew
HOMEBREW_LOGS: /home/ben/.cache/Homebrew/Logs
CPU: quad-core 64-bit skylake
Homebrew Ruby: 2.6.3 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/bin/ruby
Clang: N/A
Git: 2.25.0 => /home/linuxbrew/.linuxbrew/bin/git
Curl: 7.68.0 => /usr/bin/curl
Kernel: Linux 5.3.18-1-MANJARO x86_64 GNU/Linux
OS: Manjaro Linux (Juhraya)
Host glibc: 2.30
/usr/bin/gcc: 9.2.0
glibc: N/A
gcc: N/A
xorg: N/A

brew doctor:

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: python is symlinked to python3
This will confuse build scripts and in general lead to subtle breakage.
good first issue help wanted linux outdated

All 13 comments

  • [ ] ran brew config and brew doctor and included their output with your issue?

@jcrben Please do this anyway; we need this information and you can provide it now.


Assigning to Linux folks. My take on potential actionables here would be:

  • handle Rubies that are "too new" with an automatic vendor fallback
  • adjust the docs to document the workaround
  • adjust the docs/brew doctor to document supported distros

Possible fix here: https://github.com/dawidd6/install/commit/ce775bd082816d98645d202884f79079c9432d6c

Tested it in debian:unstable Docker container with ruby2.7 package installed and set as /usr/bin/ruby. Seems to work.

@dawidd6 If you wanted to improve ruby.sh then https://github.com/Homebrew/brew/blob/master/Library/Homebrew/utils/ruby.sh#L45 is what would need tweaked to have e.g. a maximum_ruby_version. Alternatively, the logic could be tweaked to just ensure that the major/minor Ruby versions match.

Added brew config and brew doctor output.

Tested it in debian:unstable Docker container with ruby2.7 package installed and set as /usr/bin/ruby. Seems to work.

@MikeMcQuaid Since there is no Library/Homebrew/vendor/bundle/ruby/2.7.0 directory, am I correct in understanding that Ruby 2.7 will definitely not work with Homebrew?

@MikeMcQuaid Since there is no Library/Homebrew/vendor/bundle/ruby/2.7.0 directory, am I correct in understanding that Ruby 2.7 will definitely not work with Homebrew?

As-is: yes. We should install a vendored Ruby in that situation.

@dawidd6 If you wanted to improve ruby.sh then https://github.com/Homebrew/brew/blob/master/Library/Homebrew/utils/ruby.sh#L45 is what would need tweaked to have e.g. a maximum_ruby_version. Alternatively, the logic could be tweaked to just ensure that the major/minor Ruby versions match.

https://github.com/Homebrew/brew/issues/6952#issuecomment-577197101

@dawidd6 @jcrben Are either of you interested in tackling this task?

I'll leave it for someone else this time.

@jcrben Are you interested in tackling this task of specifying a maximum_ruby_version? If so, feel free to open a work-in-progress PR if you have any questions or need some help along the way.

Don't see myself taking this on anytime soon.

@emreerhan Would you be interested in submitting a PR to resolve this issue? It's a good first issue to tackle. If so, feel free to open a work-in-progress PR if you have any questions or need some help along the way.
See https://github.com/Homebrew/brew/issues/6952#issuecomment-577197101

Not sure how to link PR's to issues, but here's my PR: https://github.com/Homebrew/brew/pull/6977

Not sure how to link PR's to issues, but here's my PR: #6977

In you git commit log message add:

Fixes #6952
Was this page helpful?
0 / 5 - 0 ratings

Related issues

DomT4 picture DomT4  路  3Comments

MikeMcQuaid picture MikeMcQuaid  路  3Comments

rtobrien picture rtobrien  路  3Comments

VagelisD picture VagelisD  路  3Comments

stejmurphy picture stejmurphy  路  4Comments