Skip to content
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

With bundler v1.16.2 bundle audit is no longer being found #191

Closed
mrosePTC opened this issue May 24, 2018 · 10 comments
Closed

With bundler v1.16.2 bundle audit is no longer being found #191

mrosePTC opened this issue May 24, 2018 · 10 comments

Comments

@mrosePTC
Copy link

With the recent release of bundler 1.16.2, bundle audit is no longer being found by bundler.

With the latest ruby:2.5 docker container:

$ ruby --version
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
$ cat Gemfile
source "https://rubygems.org"
gem "bundler-audit", "~> 0.6.0"
$ bundle install
bundle install
Fetching gem metadata from https://rubygems.org/..
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 1.16.2
Fetching thor 0.20.0
Installing thor 0.20.0
Fetching bundler-audit 0.6.0
Installing bundler-audit 0.6.0
Bundle complete! 1 Gemfile dependency, 3 gems now installed.
Bundled gems are installed into `/usr/local/bundle`
$ bundle audit
Could not find command "audit".
$ /usr/local/bundle/bin/bundle-audit
No vulnerabilities found

The audit command is not being found by bundle, but calling out the full path to the gem will succeed.

@olbrich
Copy link

olbrich commented May 25, 2018

This may be related to the recent release of rubygems 2.7.7

@mrosePTC
Copy link
Author

From the same environment, the gem version is reporting as 2.7.7

$ gem --version
2.7.7

@iainbeeston
Copy link

iainbeeston commented Jun 5, 2018

I'm seeing this as well, however I can reproduce on linux but not mac (on mac it works as expected). I'm using rubygems 2.7.7, bundler 1.16.2 and ruby 2.5.1. I've tried clearing caches and uninstalling/reinstalling and I still see the same issue.

However, if instead of running bundle audit I run bundle exec bundler-audit it works

@olbrich
Copy link

olbrich commented Jun 5, 2018

@iainbeeston how did you install ruby on your linux box? I've run into some strange bugs when using the ruby-ng package on ubuntu.

@iainbeeston
Copy link

My "linux box" is actually circleci (so a docker container)

@postmodern
Copy link
Member

Is bundler-audit installed globally via gem install? I don't think bundler looks in the current bundle for additional CLI commands.

@mrosePTC
Copy link
Author

In the docker container, I would assume that it is. Though the most recent ruby:2 image no longer has this issue. I can no longer reproduce the issue.

@iainbeeston
Copy link

Sorry, not sure if those questions are directed at me or not. In my case ruby is preinstalled on the docker container. I'm installing bundler-audit via my Gemfile (not gem install)

@postmodern
Copy link
Member

If you install bundler-audit via the Gemfile, then bundle exec will be required to run it. If you want it globally accessible, then simply gem install it.

@ypresto
Copy link

ypresto commented Jul 11, 2018

Confirmed it works with bundle exec bundle audit on CircleCI! (via Gemfile)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants