0

I dealing with project Symfony and Bootstrap 4 I would like to work with source bootstrap. For that I need ruby and all bundle.

I launch this command : bundler install and I have error install on http_parser.rb (0.6.0)

I launch this command : gem install http_parser.rb --source 'http://rubygems.org/' --install-dir '/dev/tmp/http'

but I have this error : C:/dev/Ruby24-x64/lib/ruby/gems/2.4.0/gems/make-0.3.1/bin/make:4:in': undefined local variable or method make' for main:Object (NameError) from C:/dev/Ruby24-x64/bin/make:22:inload' from C:/dev/Ruby24-x64/bin/make:22:in <main>'

So I installed make tools with : gem install make Successfully installed make-0.3.1 Parsing documentation for make-0.3.1 Done installing documentation for make after 0 seconds 1 gem installed

And I retry to install http_parser with : gem install http_parser.rb --source 'http://rubygems.org/' --install-dir '/dev/tmp/http'

But nothing change. I again this error : C:/dev/Ruby24-x64/lib/ruby/gems/2.4.0/gems/make-0.3.1/bin/make:4:in `<top (required)>': undefined local variable or method `make' for main:Object (NameError) from C:/dev/Ruby24-x64/bin/make:22:in `load' from C:/dev/Ruby24-x64/bin/make:22:in `<main>'

How install http_parser gem on windows OS ?

Why make don't run correctly but install correct ?

3
  • 1
    Did you install Ruby with the DevKit bundle? If not then reinstall and try again.
    – Casper
    Jun 18, 2018 at 16:13
  • To add on to @Casper's comment here is a link with instructions for installing the DevKit: rubyinstaller.org/add-ons/devkit.html Jun 18, 2018 at 16:50
  • 1
    Installed latest version of Ruby devKit 2.5 solved my issue. Warning Ruby devKit 2.4 don't run. @Casper post reply solution and I check that.
    – miltone
    Jun 19, 2018 at 11:48

1 Answer 1

1

The error indicates that Ruby needs to compile native (non-Ruby) code in order to install and use the http_parser gem.

To compile native code on Windows you need to install Ruby with the DevKit package. If you use RubyInstaller you just choose the Ruby+DevKit package instead of the plain Ruby package. This should allow the http_parser installation to complete.

1
  • WARNING : very careful about version of your Ruby DevKit. Thank you for response @Casper
    – miltone
    Jun 19, 2018 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.