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

Conflict between jekyll-sass-converter / sass-embedded (jekyll dep) and alpine #4

Open
RagingRoosevelt opened this issue Jan 21, 2023 · 4 comments

Comments

@RagingRoosevelt
Copy link

RagingRoosevelt commented Jan 21, 2023

Trying to install jekyll (gem install jekyll step) fails on a dependency installation of sass-embedded (I think required by jekyll-sass-converter). I've tried specifying all of the recent versions of sass-embedded but all fail with

NotImplementedError: sass_embedded for x86_64-linux-musl not available at https://github.com/sass/dart-sass-embedded/releases/tag/<X.Y.Z>

Searching further, it looks like the -musl specifier is a alpine thing. Someone in the comments of a sass-embedded issue pointed to this note from jekyll. Following the hint in that readme, it appears that the following steps will help this build successfully:

  1. Add the following to the Gemfile:
    # This is necessary to deal with incompatibility with alpine in future
    # versions of sass-converter
    gem "jekyll-sass-converter", "~> 1.0"
    
    and optionally
    gem "jekyll-paginate", "~> 1.1.0"
    
  2. In the dockerfile, remove everything after gem update bundler
  3. If the user copies the Gemfile, it is no longer necessary to bundle init, so starting up for the first time becomes
    1. bundle install
    2. bundle update
    3. bundle exec jekyll new --force --skip-bundle .
    4. bundle exec jekyll serve --livereload
@BillRaymond
Copy link
Owner

Thank you for introducing this issue here. A lot has changed since I created that video, so I am producing a new one. However, I am going to re-type what you are suggesting:

  1. Run:
bundle exec jekyll new --force --skip-bundle .
  1. In the gemfile, add the line:
gem "jekyll-sass-converter", "< 3.0"'
  1. Run bundle install
  2. Run bundle update

Now you can run bundle exec jekyll serve --livereload

I will update this document but am working on a new video series and a new repo for this topic. I will leave this comment open so I remember to share the details with you when ready.

@trainmore
Copy link

Hey, Bill. Thank you so much for this helpful tutorial. I ran into this same issue earlier today, and was able to work around it by updating all rubygems in the dockerfile:
# Update the Ruby bundler and install Jekyll
RUN gem update --system
RUN gem update bundler && gem install bundler jekyll

Not sure if that is helpful, but wanted to share. Thanks again.

@trainmore
Copy link

gem "jekyll-sass-converter", "< 3.0"'

There appears to be an extra backtick here in this code snippet above.

Step 3. (er 2) should read
gem "jekyll-sass-converter", "< 3.0"

image

@trainmore
Copy link

trainmore commented Apr 5, 2023

Upon further testing, @RagingRoosevelt provided a working solution already. However, I still had to run bundle init after building and opening the container in VS Code to create the initial Gemfile for editing:

On STEP 6: Create a dockerfile and a Docker container, remove the install of jekyll from the last line (14) of the code snippet:
updated:
RUN gem update bundler && gem install bundler #jekyll

On to STEP 7: Build the Jekyll website
In the terminal window for the container in Dev Container:
bundle init

Then open the newly created Gemfile to add the following:
# This is necessary to deal with incompatibility with alpine in future
# versions of sass-converter
gem "jekyll-sass-converter", "~> 1.0"

Then, continue on with STEP 7: Build the Jekyll website as written:
# --- Decision time!
# Either install Jekyll 3.9.x for for Official ....
...

Hope this is helpful or useful @BillRaymond

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

No branches or pull requests

3 participants