Skip to content

Binstub installation conflicts when ruby configured with --enable-load-relative #2955

@deivid-rodriguez

Description

@deivid-rodriguez

When ruby has been configured with the --enable-load-relative option, the ruby-core installer generates binstubs like the following:

#!/bin/sh
# -*- ruby -*-
_=_\
=begin
bindir="${0%/*}"
exec "$bindir/ruby" "-x" "$0" "$@"
=end
#!/usr/bin/env ruby
#
# This file was generated by RubyGems.
#
# The application 'bundler' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

This kind of binstub is not supported by rubygems, so when a binstub installed by ruby-core installer is reinstalled, for example bundle, it will conflict and prompt the user, and if overwritten, it will install binstubs without the "load-relative prolog".

This was discovered at #2929 (comment), since this option is used at MacOS 2.6.3 ruby in our CI.

We should port this logic in ruby-core installer to rubygems. PR coming.

This issue is related to:

  • Network problems
  • Installing a library
  • Publishing a library
  • The command line gem
  • Other

Here are my current environment details:

$ gem env version
3.1.0.pre1

I will abide by the code of conduct.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions