ixkaito / frasco

Quick starter for Jekyll including full setup for Sass, PostCSS, Autoprefixer, stylelint, TypeScript, Webpack, ESLint, imagemin, Browsersync, etc.
https://ixkaito.github.io/frasco/
MIT License
132 stars 20 forks source link

An error occurred while installing http_parser.rb (0.6.0) #30

Closed lalegamero closed 4 years ago

lalegamero commented 6 years ago

I have used Frasco a few times without any issue. Today I was trying to create a new website project but during the installation process when typing npm install the following error occurs:

> frasco@0.8.1 preinstall C:\projects\_sites\frasco`
> bundle install --path vendor/bundle

Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using public_suffix 3.0.2
Using addressable 2.5.2
Using bundler 1.16.2
Using colorator 1.1.0
Using concurrent-ruby 1.0.5
Using eventmachine 1.2.6 (x64-mingw32)
Fetching http_parser.rb 0.6.0
Installing http_parser.rb 0.6.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/projects/frasco/vendor/bundle/ruby/2.4.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20180714-18112-1weg6o8.rb extconf.rb
creating Makefile

current directory:
C:/projects/frasco/vendor/bundle/ruby/2.4.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean
make: rm: Command not found
make: [Makefile:189: clean-static] Error 127 (ignored)
/bin/sh: rm: command not found
make: [Makefile:172: clean] Error 127 (ignored)

current directory:
C:/projects/frasco/vendor/bundle/ruby/2.4.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
make: echo: Command not found
make: *** [Makefile:264: ruby_http_parser-x64-mingw32.def] Error 127

make failed, exit code 2

Gem files will remain installed in
C:/projects/frasco/vendor/bundle/ruby/2.4.0/gems/http_parser.rb-0.6.0
for inspection.
Results logged to
C:/projects/frasco/vendor/bundle/ruby/2.4.0/extensions/x64-mingw32/2.4.0/http_parser.rb-0.6.0/gem_make.out

An error occurred while installing http_parser.rb (0.6.0), and Bundler cannot
continue.
Make sure that `gem install http_parser.rb -v '0.6.0' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  jekyll-feed was resolved to 0.9.3, which depends on
    jekyll was resolved to 3.8.1, which depends on
      em-websocket was resolved to 0.5.1, which depends on
        http_parser.rb
npm ERR! code ELIFECYCLE
npm ERR! errno 5
npm ERR! frasco@0.8.1 preinstall: `bundle install --path vendor/bundle`
npm ERR! Exit status 5
npm ERR!
npm ERR! Failed at the frasco@0.8.1 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\myAdminUserAccount\AppData\Roaming\npm-cache\_logs\2018-07-15T01_00_32_922Z-debug.log

Thanks in advance for your help!

ixkaito commented 6 years ago

@lalegamero Sorry for the late reply. Did you try gem install http_parser.rb -v '0.6.0' --source 'https://rubygems.org/'? Does this succeed?

lalegamero commented 6 years ago

@ixkaito Thanks for your response.

I also tried to manually install the http_parser with the command that you suggested and then continue with Frasco installation with the command npm install but unfortunatey I get the same error message:

An error occurred while installing http_parser.rb (0.6.0), and Bundler cannot continue. Make sure that gem install http_parser.rb -v '0.6.0' --source 'https://rubygems.org/' succeeds before bundling. ... ...

I've also tried to install the http_parser even before running the command npm install but always get the same error message.

I have no idea why! Any suggestion in order to solve this issue?

Thanks a lot for your help.

edheltzel commented 6 years ago

I'm sure you already did this but have you tried removing the .lock files? And re-running npm install usually helps me with Gem relayed issues.

lalegamero commented 6 years ago

Thanks for your suggestion @ginfuru.

I've also followed your advice but I'm still getting the same error message...

Are you guys running Frasco on Windows 10 by any chance?

Thanks!

edheltzel commented 6 years ago

@lalegamero I am not....

ixkaito commented 6 years ago

@lalegamero Me, either.

Could you try upgrading ruby to v2.5.0 or later? Please remove vendorand node_modules folders or clone the repository again before npm i.

wnstck commented 6 years ago

@lalegamero @ixkaito

I had a similar issue with http_parser on OSX. I tracked it down to an issue with a space in my path https://github.com/tmm1/http_parser.rb/issues/47 😔

@lalegamero maybe your issue involves setting a PATH to your \bin?

MahdiBaghbani commented 4 years ago

this annoys me, why having space would destroy my build (and time), aren't we living in 2019?

qompio commented 4 years ago

Wow this took me all morning and all sorts of trouble shooting. It was driving me mad! Taking the space out of the path worked! Thank you @wnstck.

ixkaito commented 4 years ago

Released v1.0.0. Please have a try.