Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Breaks when trying to install dart-sass-embedded #150

Closed
ProfaneServitor opened this issue Dec 25, 2022 · 6 comments
Closed

Breaks when trying to install dart-sass-embedded #150

ProfaneServitor opened this issue Dec 25, 2022 · 6 comments

Comments

@ProfaneServitor
Copy link

ProfaneServitor commented Dec 25, 2022

When I try to deploy a site using github actions, and it uses sass, this error appears:

Fetching html-pipeline 2.14.3
Installing html-pipeline 2.14.3
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/github/workspace/vendor/bundle/ruby/2.7.0/gems/sass-embedded-1.57.1/ext/sass
/usr/local/bin/ruby -I/usr/local/lib/ruby/2.7.0/rubygems -rrubygems
/github/workspace/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake
RUBYARCHDIR\=/github/workspace/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux-musl/2.7.0/sass-embedded-1.57.1
RUBYLIBDIR\=/github/workspace/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux-musl/2.7.0/sass-embedded-1.57.1
rake aborted!
NotImplementedError: sass_embedded for x86_64-linux-musl not available at
https://github.com/sass/dart-sass-embedded/releases/tag/1.57.1
/github/workspace/vendor/bundle/ruby/2.7.0/gems/sass-embedded-1.57.1/ext/sass/Rakefile:226:in
`default_sass_embedded'
/github/workspace/vendor/bundle/ruby/2.7.0/gems/sass-embedded-1.57.1/ext/sass/Rakefile:21:in
`block (2 levels) in <top (required)>'
/github/workspace/vendor/bundle/ruby/2.7.0/gems/sass-embedded-1.57.1/ext/sass/Rakefile:21:in
`fetch'
/github/workspace/vendor/bundle/ruby/2.7.0/gems/sass-embedded-1.57.1/ext/sass/Rakefile:21:in
`block in <top (required)>'
/github/workspace/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in
`<main>'
Tasks: TOP => default => install => embedded.rb => sass_embedded
(See full trace by running task with --trace)

rake failed, exit code 1

github-pages.yml:

name: Build and deploy Jekyll site to GitHub Pages

on:
  push:
    branches:
      - main # or master before October 2020

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  jekyll:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    # Use GitHub Actions' cache to shorten build times and decrease load on servers
    - uses: actions/cache@v2
      with:
        path: vendor/bundle
        key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
        restore-keys: |
          ${{ runner.os }}-gems-

    # Standard usage
    - uses:  helaili/jekyll-action@v2
      with:
        token: ${{ secrets.YOUR_CUSTOM_TOKEN }}

Specifying direct links to repository, or placing a copy in vendor doesn't work either. It stubbornly tries to pull from the same place anyway.

# Gemfile
gem 'sass-embedded', git: 'https://github.com/ntkme/sass-embedded-host-ruby.git' # Completely ignored
@PaulSt
Copy link

PaulSt commented Dec 31, 2022

Got a similar error:

sass-embedded-1.57.1-x86_64-linux-gnu requires rubygems version >= 3.3.22, which
is incompatible with the current version, 3.1.6

it was sufficient to fix an older version of the sass converter in my local Gemfile

gem "jekyll-sass-converter", "~> 2.0"

@UlyssesZh
Copy link

This is because this action uses ruby:2.7-alpine Docker image, which uses musl, which cannot build Dart (dart-lang/sdk#40906), which bases Dart Sass, which bases the Ruby gem sass-embedded, which is used by jekyll-sass-converter since v3 and thus used by jekyll. There are several possible solutions:

  • On the jekyll-action side, we can use another Ruby Docker image instead of those of Alpine.
  • Use jekyll-sass-converter v2 instead of v3 (can be achieved by using an older version of jekyll).

@PaulSt got a seemingly similar but actually a totally different error.

UlyssesZh added a commit to UlyssesZh/UlyssesZh.github.io that referenced this issue Jan 3, 2023
@y377
Copy link

y377 commented Jan 7, 2023

hi !@UlyssesZh

On the jekyll-action side, we can use another Ruby Docker image instead of those of Alpine.

Can I replace the mirror image myself? If available, what should I do?

@y377
Copy link

y377 commented Jan 7, 2023

遇到了类似的错误:

sass-embedded-1.57.1-x86_64-linux-gnu requires rubygems version >= 3.3.22, which
is incompatible with the current version, 3.1.6

在我的本地修复旧版本的 sass 转换器就足够了Gemfile

gem "jekyll-sass-converter", "~> 2.0"

This method works and solves my construction problem, thank you very much!

itrich added a commit to SovereignCloudStack/newsletter that referenced this issue Jan 11, 2023
itrich added a commit to SovereignCloudStack/newsletter that referenced this issue Jan 11, 2023
philou added a commit to murex/EventStormingJournal that referenced this issue Jan 18, 2023
lexming added a commit to lexming/lexming.github.io that referenced this issue Jan 22, 2023
gstavrinos added a commit to roboskel/roboskel.github.io that referenced this issue Feb 9, 2023
@qitianshi
Copy link

This workaround of fixing jekyll-sass-converter to v2 is a temporary stopgap at best. v2 uses Ruby Sass, which was deprecated in 2018 and reached end of life in March 2019 (4 years ago!), and it's missing important Dart Sass features like @use, built-in modules, and scoping.

So keeping jekyll-sass-converter at v2 means the build will fail for any project that uses new Sass syntax from the past 4 years, clearly not a great solution.

In the meantime, if my project relies on Dart Sass features, are there other GitHub Actions that let me use jekyll-sass-converter v3 or do I have to write the workflow myself?

jgarland21 added a commit to jgarland21/jgarland21.github.io that referenced this issue Mar 9, 2023
DGCK81LNN added a commit to DGCK81LNN/blog that referenced this issue Mar 28, 2023
grzegorz-jakubiak added a commit to grzegorz-jakubiak/grzegorz-jakubiak.github.io that referenced this issue May 19, 2023
grzegorz-jakubiak added a commit to grzegorz-jakubiak/grzegorz-jakubiak.github.io that referenced this issue May 29, 2023
@helaili
Copy link
Owner

helaili commented Jun 6, 2023

As per the updated README there won't be any new changes to this action.
Thanks!

@helaili helaili closed this as completed Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants