helaili / jekyll-action

A GitHub Action to publish Jekyll based content as a GitHub Pages site
MIT License
250 stars 120 forks source link

`jekyll_picture_tag` and `libglib-2.0.so.0` error #97

Closed JavierSegoviaCordoba closed 3 years ago

JavierSegoviaCordoba commented 3 years ago

Crossposting an issue(https://github.com/libvips/ruby-vips/issues/308) I have that doesn't allow deploying the Jekyll page when it depends on jekyll_picture_tag

Dependency Error: Yikes! It looks like you don't have jekyll_picture_tag or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. If you've run Jekyll with `bundle exec`, ensure that you have included the jekyll_picture_tag gem in your Gemfile as well. The full error message from Ruby is: 'Could not open library 'glib-2.0.so.0': Error loading shared library glib-2.0.so.0: No such file or directory. Could not open library 'libglib-2.0.so.0': Error loading shared library libglib-2.0.so.0: No such file or directory' If you run into trouble, you can find helpful resources at jekyllrb.com/help/! 

Solution:

name: deploy

on: [ workflow_dispatch ]

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Bundler Cache
        uses: actions/cache@v2
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-gems-

      - name: Deploy
        uses:  helaili/jekyll-action@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          pre_build_commands: |
            apk --update add vips vips-tools
StevenMassaro commented 3 years ago

The issue you crossposted to makes it seem like you've worked around this issue, but I'm still seeing something similar. Were you able to get around this issue?

This presents for me as the following error:

Bundle complete! 8 Gemfile dependencies, 39 gems now installed.
Bundled gems are installed into `./vendor/bundle`
bundler: failed to load command: jekyll (/github/workspace/vendor/bundle/ruby/2.7.0/bin/jekyll)
LoadError: Could not open library 'glib-2.0.so.0': Error loading shared library glib-2.0.so.0: No such file or directory.
Could not open library 'libglib-2.0.so.0': Error loading shared library libglib-2.0.so.0: No such file or directory

Full logs attached. jekyll_picture_tag_logs.txt

JavierSegoviaCordoba commented 3 years ago

@StevenMassaro this is my workflow

name: deploy

on: [ workflow_dispatch ]

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Bundler Cache
        uses: actions/cache@v2
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-gems-

      - name: Deploy
        uses:  helaili/jekyll-action@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          pre_build_commands: |
            apk --update add vips vips-tools

I think the fix was the pre_build_commands argument.

StevenMassaro commented 3 years ago

Thank you for posting that, the resolution was as you suggested, adding the pre_build_commands.