This project is archived and is in readonly mode.
GemDependency#add_load_paths does not get them all (and is not tested)
-
Andreas Fuchs
Argh, this is entirely the wrong fix. The right thing, of course, is to load the Gem specification from the locally installed .specification file and use the require_paths declared therein.
The patch (against v2.1.0) that I'm attaching does this. (Includes a test case.)
-
Pratik
- Tag set to bug, gem, patch, railties
- Assigned user set to Rick
-
Matt Harvey
- Title changed from GemDependency fails for gems that search for files in bin/ to GemDependency#add_load_paths does not get them all (and is not tested)
- Tag changed from bug, gem, patch, railties to bug, gem, patch, railties
This is a good concept. The test is not actually hitting your change, though. It's not really your fault, since you followed a pattern that was not hitting the lines that you removed anyway. That's because GemDependency.unpacked_paths is always empty in the test cases.
I came upon this after I had a related problem; hpricot does not load when an unpacked and built version under vendor is the only version present on the system. That failure is due to the fact that its compiled extensions are located in subdirectories of ext rather than in ext itself. It would be nice if such subdirectories were reliably listed in the require_paths of .specfication, but at least in the case of hpricot, we can't count on that.
My patch was going to conflict with yours, and yours did not apply, so I have integrated the two into a new patch (attached).
It is probably worth noting that, in the same vein, the .specification for rmagick, at least on my system, does not include bin in the require_paths. I included something to address that as well.
-
Matt Jones
This is now handled via the standard Gem specificiation loader used in #1128. OK to close.
-
Pratik
- State changed from new to duplicate
