Skip to content

bundle binstubs --gemfile argument #9307

@martinthomson

Description

@martinthomson

Describe the problem as clearly as you can

I have a setup that uses bundler in a build configuration to install dependencies. The point of this is to install the binaries that are associated with gems.

The invocation for bundle install needs to refer to multiple different gemfiles, so I use the --gemfile argument. The same argument does not exist for bundle binstubs. It would be nice if it did.

Did you try upgrading rubygems & bundler?

Unfortunately, I need to support people with a wide range of bundler versions, so my ability to take a fix is limited. That doesn't mean I won't ask in anticipation of a time when the "fix" is widely enough deployed to rely on.

Post steps to reproduce the problem

See below.

Which command did you run?

The following commands are what I use:

bundle install --gemfile=...
BUNDLE_GEMFILE=... bundle binstubs --all

There are also overrides for BUNDLE_PATH and BUNDLE_BIN in place.

What were you expecting to happen?

A --gemfile argument that matches bundle install is what I expected to see.

What happened instead?

I'm not entirely clear on the direction this project intends to take with configuration of the tools, but I find environment variables quite a bit harder to work with than direct command-line arguments. Mostly because of the potential for spooky action at a distance: I don't control the environment in which the toolchain I develop runs, so anything in the user environment potentially interacts with whatever controls I have. Also, for a range of reasons, I am often forced to work with relative paths, which I very much do not want leaking into environment variables (you can see how that manifests in the code I linked). However, if that is the intended direction, I'm happy to accept that conclusion and try to work around its limitations.

If not included with the output of your command, run bundle env and paste the output below

See above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions