-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Summary
When using Bundler in a development environment where a local gem is loaded via the gemspec directive in the Gemfile,
OCRAN raises an error during gemspec detection.
Specifically, OCRAN assumes that all loaded gems have a valid gemspec file located within the Ruby installation directory tree.
However, in the case of local development gems, even though spec.loaded_from is correctly set to the gemspec file,
the file resides outside of the standard installation tree, causing OCRAN to raise an error.
Example error message:
Gem spec [path] does not exist in the Ruby installation. Don't know where to put it.
Cause
- Bundler correctly sets
spec.loaded_fromfor local development gems. - However, OCRAN verifies that the gemspec file must exist within the Ruby installation directory,
and treats anything outside as an error. - This mismatch between OCRAN's assumptions and the actual behavior in development environments leads to runtime errors.
Expected Behavior
Although no definitive policy has been decided at this time,
it is generally expected that local development gems should be handled gracefully and included in the package when appropriate.
Current Workaround
- Avoid using the
gemspecdirective in the Gemfile during development. - Manually adjust
$LOAD_PATHas needed in tools likebin/console.
References
- This issue is not due to Ruby itself or Bundler specification changes.
- Bundler correctly handles local development gems and sets proper paths for
spec.loaded_from.
Notes
This issue is recorded for tracking purposes only.
No immediate fix is planned at this time.