ruby / ruby/rubygems

Generated setup.rb in --standlone mode should interpolate platform at runtime

Open
#3,186 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bundler status: triage
Dominant language
Ruby
Stars
4k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
81

Description

In --standalone mode, for native extensions (rugged in this example) the generated setup.rb contains a line like

$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/x64-mingw32/2.3.0/rugged-0.25.0b2"

IMO the x64-mingw32 platform part should not be hard-coded here, but interpolated at runtime just like #{ruby_engine} and #{ruby_version}. Doing so would be a step in the right direction to actually support native extensions for multiple platforms in --standalone mode.

Using Bundler 1.12.3 with Ruby 2.3 on Windows.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue concerns generated setup.rb in --standalone mode; start by locating the standalone generator and the code that writes the native-extension path. Compare how ruby_engine and ruby_version are emitted with the platform component, then verify that the generated path selects the runtime platform and that standalone native-extension handling remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.