rb_loader: metacall gem not available in distributable - Ruby cannot call other languages via metacall()

Open
#782 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
docker, python, ruby

Research direction

Start by running metacall simulation/issue_rb_gem/repro.py and inspect works.rb, fails.rb, target.py, and repro.py to reproduce the missing gem on Windows and Linux. Trace how rb_loader assembles each distributable and verify that the metacall Ruby gem is included. Done means the failing Ruby caller works in both distributables while the existing callee case remains working.

Written by the indexing model from the issue text.

Description

When a Ruby finction uses require 'metacall' to call other language via metacall(), it fails with:

      LoadError: cannot load such file -- metacall

This happens on both the Windows installer and the Linux Docker distributable. The metacall Ruby gem is not bundled with rb_loader.

Ruby as a callee (being called from Python/Node) works fine.
Ruby as a caller (calling out to another language) is broken.

Files: https://github.com/avik22835/polyglot-intel/tree/main/simulation/issue_rb_gem

  • works.rb - plain Ruby function, no require metacall
  • fails.rb - Ruby function with require 'metacall', calls Python via metacall()
  • target.py - Python function being called
  • repro.py - driver, runs both cases

Run with :
metacall simulation/issue_rb_gem/repro.py

Output on Windows:

Image

Output on Linux:

Image

Expected:

The metacall gem should be bundled with rb_loader so Ruby finctions can call other languages via metacall() in cross-language call chains.

Dominant language
C
Stars
1.8k
Forks
266
Avg merge
2d 16h
Merged PRs (30d)
14

Getting set up

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.

More from metacall/core

All issues in metacall/core

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.