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

[Docker/alpine]: missing dependency for nokogiri #839

Open
3 of 4 tasks
kevinnls opened this issue Jun 22, 2022 · 0 comments · May be fixed by #840
Open
3 of 4 tasks

[Docker/alpine]: missing dependency for nokogiri #839

kevinnls opened this issue Jun 22, 2022 · 0 comments · May be fixed by #840

Comments

@kevinnls
Copy link

kevinnls commented Jun 22, 2022

Before submitting an issue, please be sure to

This issue affects

  • The site generated by GitHub Pages
  • Building sites locally

The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting seeking support in other forums.

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

  1. enable the jemoji plugin in _config.yml
  2. make image_alpine
  3. SITE=/path/to/site make server

What did you expect to happen?

a running local server

What happened instead?

build failed because the nokogiri gem couldn't access the shared library ld-linux-aarch64.so.1

Additional information


NB this does not affect the image built from Dockerfile.alpine@e9d9768.

However I feel it would be nice to include the required library in the image because

  • emoji are used quite often while blogging today
  • most users of the Docker images are likely to prefer the Alpine one for local development thanks to it's smaller size on disk
@kevinnls kevinnls linked a pull request Jun 22, 2022 that will close this issue
tim-kuntz added a commit to tim-kuntz/rails_panel that referenced this issue Apr 4, 2024
There were 2 issues that were breaking the build and tests.

1. Updating Ruby Gems itself without specifying a version causes it to
   update to the latest version which requires Ruby 3. Instead, we
   specify the latest version compatible with Ruby 2.6.

Compatibility versions found here:
https://rubygems.org/api/v1/versions/rubygems-update.json

2. The version of Alpine Linux shipping with the Ruby 2.6 image is
   missing a shared library needed to load nokogiri. Adding `gcompat`
   corrects this.

More information found here:
github/pages-gem#839
tim-kuntz added a commit to tim-kuntz/rails_panel that referenced this issue Apr 4, 2024
There were 2 issues that were breaking the build and tests.

1. Updating Ruby Gems itself without specifying a version causes it to update to the latest version which requires Ruby 3. Instead, we specify the latest version compatible with the installed Ruby.

Compatibility versions found here:
https://rubygems.org/api/v1/versions/rubygems-update.json

2. All builds were having issues with missing shared libraries. In the case of the Ruby 2.6 images it was nokogiri and for the Ruby 3.0 image it was sqlite3. A common fix for all the builds was to configure Bundler to consider the platform during dependency resolution.

More information found here:
https://bundler.io/v1.14/whats_new.html
sparklemotion/sqlite3-ruby#434
github/pages-gem#839 - alt. fix for Ruby 2.6
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

Successfully merging a pull request may close this issue.

1 participant