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

brakeman 6.2.1 ships binaries that are linked against ruby 3.1.0 #1869

Closed
kirillrdy opened this issue Sep 4, 2024 · 4 comments
Closed

brakeman 6.2.1 ships binaries that are linked against ruby 3.1.0 #1869

kirillrdy opened this issue Sep 4, 2024 · 4 comments

Comments

@kirillrdy
Copy link

kirillrdy commented Sep 4, 2024

Background

Brakeman version: ?
6.2.1

Rails version: ?
Ruby version: ?
3.3.4

Link to Rails application code: ?

Issue

What problem are you seeing?

I am using ruby 3.3.4 but brakeman ships with binaries that were linked against ruby 3.1

error: auto-patchelf could not satisfy dependency libruby.so.3.1 wanted by /nix/store/wnhsnqh5r6kw0x7l12ccyak7q662nmkd-wrapped-ruby-for-hl-web-3.3.4-dev/ruby/3.3.0/gems/brakeman-6.2.1/bundle/ruby/3.1.0/gems/strscan-3.1.0/lib/strscan.so
error: auto-patchelf could not satisfy dependency libruby.so.3.1 wanted by /nix/store/wnhsnqh5r6kw0x7l12ccyak7q662nmkd-wrapped-ruby-for-hl-web-3.3.4-dev/ruby/3.3.0/gems/brakeman-6.2.1/bundle/ruby/3.1.0/gems/strscan-3.1.0/ext/strscan/strscan.so
error: auto-patchelf could not satisfy dependency libruby.so.3.1 wanted by /nix/store/wnhsnqh5r6kw0x7l12ccyak7q662nmkd-wrapped-ruby-for-hl-web-3.3.4-dev/ruby/3.3.0/gems/brakeman-6.2.1/bundle/ruby/3.1.0/gems/io-console-0.7.2/lib/io/console.so
error: auto-patchelf could not satisfy dependency libruby.so.3.1 wanted by /nix/store/wnhsnqh5r6kw0x7l12ccyak7q662nmkd-wrapped-ruby-for-hl-web-3.3.4-dev/ruby/3.3.0/gems/brakeman-6.2.1/bundle/ruby/3.1.0/gems/io-console-0.7.2/ext/io/console/console.so

Other Error

Run Brakeman with --debug to see the full stack trace.

Stack trace:

?
@kirillrdy kirillrdy changed the title brakeman 6.2.0 ships binaries that rely on ruby 3.1.0 brakeman 6.2.1 ships binaries that rely on ruby 3.1.0 Sep 4, 2024
@kirillrdy kirillrdy changed the title brakeman 6.2.1 ships binaries that rely on ruby 3.1.0 brakeman 6.2.1 ships binaries that are linked against ruby 3.1.0 Sep 4, 2024
@dima4p
Copy link

dima4p commented Sep 15, 2024

/usr/local/rvm/rubies/ruby-3.3.5/lib/ruby/3.3.0/bundled_gems.rb:75:in 'require': libruby.so.3.1: cannot open shared object file: No such file or directory - /usr/local/rvm/gems/ruby-3.3.5@tv/gems/brakeman-6.2.1/bundle/ruby/3.1.0/gems/io-console-0.7.2/lib/io/console.so (LoadError)
Ruby 3.3.5 Rails 7.2.1
command: bundle exec rails console

@presidentbeef
Copy link
Owner

Hey @kirillrdy - sorry I missed your original message.

Two short term options:

  • Use gem 'brakeman', require: false so it doesn't interfere with commands like rails console
  • Switch to using brakeman-lib instead so it doesn't come with pre-packaged libraries.

The conversation of standard libraries to gems is killing me 😞

@dima4p
Copy link

dima4p commented Sep 15, 2024

  • gem 'brakeman', require: false

Thanks, adding gem 'brakeman', require: false fixes the problem, but adding gem 'guard-brakeman'
returns it.

@presidentbeef
Copy link
Owner

presidentbeef commented Oct 17, 2024

Will be addressed in next release with #1872

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

3 participants