-
Notifications
You must be signed in to change notification settings - Fork 40
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
Issues with building website locally #753
Comments
Originally posted by @annplaksin in #752 (comment) |
With the latest Ruby+Devkit it should work locally (without Docker). Just upgraded the other day (also from a 2.x version on Win) and it worked very well (without any compatibility issues which I had before, too). I'll look into the docker thing. Can you post the full command you are using? |
I added curly brackets to make it run in PowerShell. |
Hmm, there seems to be a bigger issue with the jekyll docker image: |
Jekyll has had problems with the most recent versions of ruby (3.4.1). I am using ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81 x86_64-darwin22 on MacOS Sonoma 14.6.1 and Jekyll 4.3.4. On another MacOS with Sequoia 15.1, I had particular problems running jekyll. In this case I am running Ruby 2.7.2 with jekyll 4.3.2 (I could not get ruby 3 to work). Jekyll officially supports Ruby versions 2.7 to 3.2 (at least as of last year), but the exact versions depend on the specific Jekyll version you are using. Jekyll 4.3.2 (latest version is 4.4.1, which I do not know the ruby dependency of):
Jekyll 4.2.x and earlier:
Here are the dependencies for GitHub Pages: https://pages.github.com/versions which says they are using Jekyll 3.10.0... |
All ruby 2.x versions reached end of life almost two years ago: https://endoflife.date/ruby, so probably should be upgraded to 3.x at some point. Nonetheless, Jekyll installation guide still says that they support Ruby 2.7 (or higher ofc), and you are right, it is quite hard to figure out what ruby version exactly is supported by latest Jekyll, at least there seem to be no official indication apart from "2.7 or higher". From personal experience, I just upgraded Ruby to version 3.4 the other day, and it works without issues with the jekyll 4.4 gem (and its depedencies) we have in the repo here. I don't know about Ruby on MacOS, but did you try the installation guide here: https://jekyllrb.com/docs/installation/macos/? On a side note, we do not use the GH pages jekyll gem, that you pointed to, anymore (because it was always on older gem versions). |
@annplaksin OK, I think I am getting a clearer picture of what is happening with the Docker build. There is a segmenation fault thrown by sass-embedded: But internally it is probably caused by google-protobuf: So a workaround would be to include the following line in your Gemfile: gem 'google-protobuf', force_ruby_platform: RUBY_PLATFORM.include?('linux-musl') This makes the segmentation fault go away, indeed, and the installation of the deps in the Docker container runs fine. However, when the website gets generated in the Docker container, it runs into another issue:
That seems to be related to the base image used in the Jekyll docker image: Above comment reads:
And, unfortunately, the Jekyll Docker image uses an alpine 3.15 base image Which brings us back to the issue mentioned above (#753 (comment)) that the maintenance of the Docker image seems to be stale right now. With little chance to get it updated in the near future :( . (It remains to be seen whether Jekyll or Github will be able to officially adopt the Docker images in the future.) |
So one option would be to drop the support for building the website with Docker. Another one would be to create a custom Docker image that supports the necessary versions and deps. (e.g., https://dev.to/cuongnp/setting-up-a-local-development-environment-for-jekyll-with-docker-d8k) What do you think @bwbohl ? |
@craigsapp Here is another guide to install ruby on latest macos: https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/ (the page is advertising a proprietary tool: Ruby on Mac, but when you read further, there are very detailed instructions about the installation process and possible issues). |
As you might know I’m a fan of controlled environments, that would make a +1 for a docker image ;-) |
Memo to future self: There is an option to declare the actual ruby version used for the setup. This would require a ruby File.read(".ruby-version").strip
gem "xyz", "~> 1.2.3" Cf. end of paragraph in https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/#recommended-way-to-automatically-switch-to-the-correct-version However, this would probably break the build for anyone not having the exact same ruby version installed. |
Originally posted by @annplaksin in #752 (comment)
Originally posted by @annplaksin in #752 (comment)
The text was updated successfully, but these errors were encountered: