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

bundle and jekyll serve both fail in jekyll/jekyll docker container #829

Closed
3 tasks done
mattpopovich opened this issue Dec 30, 2022 · 2 comments
Closed
3 tasks done

Comments

@mattpopovich
Copy link
Contributor

Checklist

  • I have read the tutorials and know the correct effect of the functional design.
  • There are no similar reports on existing issues (including closed ones).
  • I found the bug on the latest code of the master branch.

Describe the bug

The README states that we can use the docker image jekyll/jekyll to serve the website:

docker run -it --rm \
    --volume="$PWD:/srv/jekyll" \
    -p 4000:4000 jekyll/jekyll \
    jekyll serve

It appears that no longer works:

533f44d8ff78:/workspaces/jekyll-theme-chirpy# jekyll serve
fatal: detected dubious ownership in repository at '/workspaces/jekyll-theme-chirpy'
To add an exception for this directory, call:

        git config --global --add safe.directory /workspaces/jekyll-theme-chirpy
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 13.0.6
Using bundler 2.3.25
Using public_suffix 5.0.1
Using colorator 1.1.0
Using concurrent-ruby 1.1.10
Using eventmachine 1.2.7
Using http_parser.rb 0.8.0
Using ffi 1.15.5
Using forwardable-extended 2.6.0
Using google-protobuf 3.21.12 (x86_64-linux)
Using mercenary 0.4.0
Using racc 1.6.2
Using parallel 1.22.1
Using rainbow 3.1.1
Using yell 2.2.2
Using rb-fsevent 0.11.2
Using rexml 3.2.5
Using liquid 4.0.3
Using rouge 4.0.1
Using safe_yaml 1.0.5
Using unicode-display_width 2.3.0
Using webrick 1.7.0
Using jekyll-paginate 1.1.0
Using addressable 2.8.1
Using i18n 1.12.0
Using em-websocket 0.5.3
Using ethon 0.16.0
Using rb-inotify 0.10.1
Using pathutil 0.16.2
Using nokogiri 1.13.10 (x86_64-linux)
Using kramdown 2.4.0
Using terminal-table 3.0.2
Using typhoeus 1.4.0
Using listen 3.7.1
Using kramdown-parser-gfm 1.1.0
Using html-proofer 3.19.4
Using jekyll-watch 2.2.1
Installing sass-embedded 1.57.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /usr/gem/gems/sass-embedded-1.57.1/ext/sass
/usr/local/bin/ruby -I/usr/local/lib/ruby/site_ruby/3.1.0 -rrubygems /usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/exe/rake
RUBYARCHDIR\=/usr/gem/extensions/x86_64-linux-musl/3.1.0/sass-embedded-1.57.1 RUBYLIBDIR\=/usr/gem/extensions/x86_64-linux-musl/3.1.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
/usr/gem/gems/sass-embedded-1.57.1/ext/sass/Rakefile:226:in `default_sass_embedded'
/usr/gem/gems/sass-embedded-1.57.1/ext/sass/Rakefile:21:in `block (2 levels) in <top (required)>'
/usr/gem/gems/sass-embedded-1.57.1/ext/sass/Rakefile:21:in `fetch'
/usr/gem/gems/sass-embedded-1.57.1/ext/sass/Rakefile:21:in `block in <top (required)>'
Tasks: TOP => default => install => embedded.rb => sass_embedded
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /usr/gem/gems/sass-embedded-1.57.1 for inspection.
Results logged to /usr/gem/extensions/x86_64-linux-musl/3.1.0/sass-embedded-1.57.1/gem_make.out

  /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:102:in `run'
  /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/ext/rake_builder.rb:28:in `build'
  /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:171:in `build_extension'
  /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:205:in `block in build_extensions'
  /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:202:in `each'
  /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:202:in `build_extensions'
  /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/installer.rb:843:in `build_extensions'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/source/rubygems.rb:207:in `install'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/installer/gem_installer.rb:54:in `install'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/worker.rb:62:in `apply_func'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/worker.rb:57:in `block in process_queue'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/worker.rb:54:in `loop'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/worker.rb:54:in `process_queue'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

An error occurred while installing sass-embedded (1.57.1), and Bundler cannot continue.

In Gemfile:
  jekyll-theme-chirpy was resolved to 5.4.0, which depends on
    jekyll-archives was resolved to 2.2.1, which depends on
      jekyll was resolved to 4.3.1, which depends on
        jekyll-sass-converter was resolved to 3.0.0, which depends on
          sass-embedded

To Reproduce

Steps to reproduce the behavior:

Create a docker container using the jekyll/jekyll image, mount chirpy code, attempt to bundle or jekyll serve.

docker run -it --rm \
    --volume="$PWD:/srv/jekyll" \
    -p 4000:4000 jekyll/jekyll \
    jekyll serve

Expected behavior

The website is served at port 4000 successfully.

Screenshots

Environment

Command Version
ruby -v
gem -v
bundle -v
bundle exec jekyll -v
bundle info jekyll-theme-chirpy

Desktop

Tested on both Ubuntu 20.04 and M1 Mac running Monterey 12.6.2.

Smartphone

Additional context

This used to work. Not sure if the docker image is still supported or if I'm doing something wrong. I will investigate a fix in the meantime but you will probably beat me to it per usual!

@mattpopovich
Copy link
Contributor Author

I should have done a little bit more searching... #826 solves this error.

@cotes2020
Copy link
Owner

Hi @mattpopovich,

The image jekyll/jekyll runs on linux-musl, see the log you posted:

NotImplementedError: sass_embedded for x86_64-linux-musl not available at https://github.com/sass/dart-sass-embedded/releases/tag/1.57.1

And the jekyll-sass-converter docs mentions that the Dart VM for jekyll-sass-converter 3.x(a dependency of Jekyll 4.3) does not support linux-mul.

So, it is necessary to lock the version of jekyll-sass-converter to 2.X in the Gemfile when running Chirpy 5.4 with image jekyll/jekyll.

cotes2020 added a commit that referenced this issue Jan 11, 2023
Also, make the division formula backward compatible with `jekyll-sass-converter 2.x` (#848, #849)

Ref: https://github.com/jekyll/jekyll-sass-converter#migrate-from-2x-to-3x
Gaur4vGaur added a commit to Gaur4vGaur/Gaur4vGaur.github.io that referenced this issue Jan 28, 2023
author Gaurav Gaur <[email protected]> 1673866009 +0000
committer Gaurav Gaur <[email protected]> 1674946094 +0000

Jan23 upstream merge (#7)

* chore(editorconfig): keep trailing spaces in Markdown (cotes2020#830)

* feat(i18n): add Czech language (cotes2020#833)

* fix: correct encoding of spaces in share URLs (cotes2020#835)

Resolves cotes2020#835

* fix: post's image would cover the PWA update alert

* feat(i18n): add Finnish translations (cotes2020#843)

* docs: update tutorials

- remove outdated content
- append instructions for SASS overrides (cotes2020#827)

* chore(deps): lock `jekyll-sass-converter` to `v2.x` on Linux-musl (cotes2020#829)

Also, make the division formula backward compatible with `jekyll-sass-converter 2.x` (cotes2020#848, cotes2020#849)

Ref: https://github.com/jekyll/jekyll-sass-converter#migrate-from-2x-to-3x

* chore(bundler): deprecate `:install_if` option in Gemfile

* feat(i18n): add Italian translation (cotes2020#850)

* fix:  copy command line incomplete(`.gp` part)

Co-authored-by: Jarda Beran <[email protected]>
Co-authored-by: MatyIRG <[email protected]>
Co-authored-by: Cotes Chung <[email protected]>
Co-authored-by: Kalle Lahtinen <[email protected]>
Co-authored-by: Eduardo <[email protected]>

feat(i18n): add Czech language (cotes2020#833)

fix: correct encoding of spaces in share URLs (cotes2020#835)

Resolves cotes2020#835

fix: post's image would cover the PWA update alert

feat(i18n): add Finnish translations (cotes2020#843)

chore(bundler): deprecate `:install_if` option in Gemfile

feat(i18n): add Italian translation (cotes2020#850)
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

2 participants