Skip to content

fix: Use require instead of require_relative to load extension #366

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dividedmind
Copy link
Contributor

This pull request includes changes to the lib/appmap/agent.rb file to improve the loading of required files and handle potential directory differences for the appmap extension.

File loading improvements:

  • lib/appmap/agent.rb: Changed the require_relative "appmap" statement to require "appmap/appmap" to handle cases where the appmap extension might not be in the same directory.

In some environments, `gem install` places the extension .so in a separate directory tree than Ruby code, which makes it unfindable with `require_relative`.
@dividedmind dividedmind requested a review from kgilpin January 3, 2025 14:30
@dividedmind dividedmind self-assigned this Jan 3, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant