github / pages-gem

A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages
http://pages.github.com
MIT License
1.82k stars 350 forks source link

bundle install or update of github-pages fails #819

Closed Merganser2 closed 2 years ago

Merganser2 commented 2 years ago

This issue affects

What did you do (e.g., steps to reproduce)

What did you expect to happen?

What happened instead?

An error occurred while installing unf_ext (0.0.8), and Bundler cannot continue.

In Gemfile: github-pages was resolved to 223, which depends on github-pages-health-check was resolved to 1.17.9, which depends on dnsruby was resolved to 1.61.9, which depends on simpleidn was resolved to 0.2.1, which depends on unf was resolved to 0.1.4, which depends on unf_ext

Additional information

Further up there were some other errors making me think I missed some setup step:

Ruby31-x64/lib/ruby/3.1.0 -r ./siteconf20220221-7320-1auhwk.rb extconf.rb checking for -lstdc++... extconf.rb failed Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

parkr commented 2 years ago

More information should be present in the mkmf.log and would be helpful to have.

It looks like pre-compiled binaries for unf_ext exist for Ruby 3.0: https://github.com/knu/ruby-unf_ext/blob/master/CHANGELOG.md

Perhaps you need to install Ruby 3.0 instead of Ruby 3.1 and try again until unf_ext releases a new version with support for Ruby 3.1.

parkr commented 2 years ago

Yes, it looks like an issue with Ruby 3.1 on Windows: https://github.com/knu/ruby-unf_ext/issues/65. It's not yet supported. Subscribe to that issue for updates.

Merganser2 commented 2 years ago

Yes I got it to work with Ruby 3.0.3 on Windows 11, had to also install webrick gem (chose 1.7 for some reason). Apologies for missing your suggestion about mkmf.log, I uninstalled before copying it. I do remember that it was a very short entry that looked something like something from a cpp header (maybe, if I recall correctly). Just a few lines. Thanks for promptly helping me with this workaround. I am wondering if this should be documented somewhere.