-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LicenseFinder fails to run on Ruby projects using non-standard path for bundler #862
Comments
We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story. The labels on this github issue will be updated when the story is started. |
We made some changes with the new docker image. Not sure if it fixes this or not |
The workaround described in #828 fixed a similar issue for me, maybe it will work for you as well? |
Thanks! The workaround in #828 (comment) worked for me. I noticed the problem also resolved if I commented out these lines: LicenseFinder/lib/license_finder/package_managers/bundler.rb Lines 63 to 64 in 4d2390f
I wonder if those lines can now be dropped with Bundler v2.2+. UPDATE: It seems this works only because the list of Bundler specs are empty? |
@stanhu This bundler section seems to be very finicky and we havent had time to dive into it. If we fix one situation it seems to break another. I'm glad you were able to find a workaround! |
Still struggling with this, I'm using |
If a project is using Ruby/Bundler from a non-standard location and
license_finder
is available from a different Ruby (like system Ruby),license_finder
will fail to generate a report.Consider the following example
gem install license_finder
, and is available at/usr/local/lib/ruby
./custom-ruby
(Ruby 2.7), and dependencies are installed using/custom-ruby/bin/bundle install
and gets installed to/custom-ruby/lib/ruby/gems/2.7.0/gems/
Because LicenseFinder uses
Bundler
library under the hood, which default to the system location, it can't find the libraries there. Because this is not a case ofbundle install --path=<path>
, there is no reference of this custom path in the project files.Proposal
A way to specify a custom Ruby/Bundler path to license_finder so that the Bundler library used under the hood will be from that location, and will look there for gems instead of system location.
The text was updated successfully, but these errors were encountered: