You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this weird error. When I do something like this gem install http-parser --platform=ruby
I get the output
Building native extensions. This could take a while...
ERROR: Error installing http-parser:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/3.0.0/gems/http-parser-1.2.3/ext
/usr/bin/ruby -I/usr/lib/ruby/site_ruby/3.0.0 -rrubygems /var/lib/gems/3.0.0/gems/rake-13.0.6/exe/rake RUBYARCHDIR\=/var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0-static/http-parser-1.2.3 RUBYLIBDIR\=/var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0-static/http-parser-1.2.3
rake aborted!
ArgumentError: wrong number of arguments (given 2, expected 1)
/var/lib/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<main>'
Tasks: TOP => default => x86_64-linux/libhttp-parser-ext.so => x86_64-linux/http-parser/http_parser.o => x86_64-linux/http-parser
(See full trace by running task with --trace)
rake failed, exit code 1
Gem files will remain installed in /var/lib/gems/3.0.0/gems/http-parser-1.2.3 for inspection.
Results logged to /var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0-static/http-parser-1.2.3/gem_make.out
HOWEVER ....
When I go to the directory /var/lib/gems/3.0.0/gems/http-parser-1.2.3/ (note that I dont include the /ext/ part)
And I execute the command
/usr/bin/ruby -I/usr/lib/ruby/site_ruby/3.0.0 -rrubygems /var/lib/gems/3.0.0/gems/rake-13.0.6/exe/rake RUBYARCHDIR=/var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0-static/http-parser-1.2.3 RUBYLIBDIR=/var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0-static/http-parser-1.2.3
The built native extensions should be installed into $GEM_HOME/extensions/<platform>/<ruby-abi>/<gem-name>-<gem-version>, but this gem installs it into $GEM_HOME/gems/<gem-name>-<gem-version>/ext/<platform>.
Moreover, it bundles an ancient version of the http-parser library that contains multiple vulnerabilities and it doesn’t even try to use a system-provided libhttp-parser. This gem is dangerous.
I have this weird error. When I do something like this
gem install http-parser --platform=ruby
I get the output
HOWEVER ....
When I go to the directory /var/lib/gems/3.0.0/gems/http-parser-1.2.3/ (note that I dont include the /ext/ part)
And I execute the command
/usr/bin/ruby -I/usr/lib/ruby/site_ruby/3.0.0 -rrubygems /var/lib/gems/3.0.0/gems/rake-13.0.6/exe/rake RUBYARCHDIR=/var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0-static/http-parser-1.2.3 RUBYLIBDIR=/var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0-static/http-parser-1.2.3
I get the correct output:
in the /var/lib/gems/3.0.0/gems/http-parser-1.2.3/ext directory I get the above output again.
So I think there might be something wrong with the packaging
The text was updated successfully, but these errors were encountered: