bundle exec jekyll serve --livereload
But I've been unable to serve the site and receive the following error when I try to bundle install
or bundle update
: Installing eventmachine 1.2.7 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
Any help would be appreciated.Hi folks. I've been having a hell of a time just trying to run jekyll serve. As of two days ago this command worked:
bundle exec jekyll serve --livereload
But I've been unable to serve the site and receive the following error when I try tobundle install
orbundle update
:Installing eventmachine 1.2.7 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
Any help would be appreciated.
For context: I'm on a new Mac with the M1 chip. From the bit of research I've done, it seems like the issue may be this: https://stackoverflow.com/questions/65075687/issues-serving-jekyll-to-localhost-eventmachine-1-2-7-has-an-error-when-install
Your issue is as you see building the mentioned gems native parts, meaning that your machine is probably lacking something, you could debug this issue by trying to install said gem locally with gem install YOUR_GEM
I am assuming that you are missing some build tools needed to build said gem
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby' /Users/katana/MIJE/sandbox-mije-jekyll/vendor/bundle/ruby/3.1.0/bundler/gems/eventmachine-9cb13a8a6236/lib/eventmachine.rb:8:in 'require': dlopen(/Users/katana/MIJE/sandbox-mije-jekyll/vendor/bundle/ruby/3.1.0/bundler/gems/eventmachine-9cb13a8a6236/lib/rubyeventmachine.bundle, 0x0009): symbol not found in flat namespace '_SSL_get1_peer_certificate' - /Users/katana/MIJE/sandbox-mije-jekyll/vendor/bundle/ruby/3.1.0/bundler/gems/eventmachine-9cb13a8a6236/lib/rubyeventmachine.bundle (LoadError)
Thanks @anwait_gitlab. I did manage to install the eventmachine gem. But I'm still unable to jekyll serve because of this issue:
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby' /Users/katana/MIJE/sandbox-mije-jekyll/vendor/bundle/ruby/3.1.0/bundler/gems/eventmachine-9cb13a8a6236/lib/eventmachine.rb:8:in 'require': dlopen(/Users/katana/MIJE/sandbox-mije-jekyll/vendor/bundle/ruby/3.1.0/bundler/gems/eventmachine-9cb13a8a6236/lib/rubyeventmachine.bundle, 0x0009): symbol not found in flat namespace '_SSL_get1_peer_certificate' - /Users/katana/MIJE/sandbox-mije-jekyll/vendor/bundle/ruby/3.1.0/bundler/gems/eventmachine-9cb13a8a6236/lib/rubyeventmachine.bundle (LoadError)
Update: I solved this issue by doing a gem update --system and upgrading everything to the latest version: openssl@3 and ruby-3.1.1
_data
) and images (stuff that I want to go in assets
). Is there a way to configure Jekyll so that both of these things can be served from a specific path? I know I can add directories with include, but is there a way to like, remap the included files? I want to put _data/mysubmodule/images/*.*
=> /assets/images/*.*
So I found this code in a Jekyll layout:
{% if site.dark-theme == "auto" %}
{% capture scss_sheet %}
{% include style.scss %}
@media (prefers-color-scheme: dark) {
{% include style-dark.scss %}
}
{% endcapture %}
{% elsif site.dark-theme %}
{% capture scss_sheet %}{% include style-dark.scss %}{% endcapture %}
{% else %}
{% capture scss_sheet %}{% include style.scss %}{% endcapture %}
{% endif %}
My question is: What does {% include style-dark.scss %}
mean? There's no such file, and the VSCode explanations are kind of confusing. Thank you
Dependency Error: Yikes! It looks like you don't have tzinfo 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 tzinfo gem in your Gemfile as well. The full error message from Ruby is: 'cannot load such file -- tzinfo' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
jekyll 4.2.2 | Error: tzinfo
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/external.rb:73:in `rescue in block in require_with_graceful_fail': tzinfo (Jekyll::Errors::MissingDependencyException)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/external.rb:58:in `block in require_with_graceful_fail'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/external.rb:57:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/external.rb:57:in `require_with_graceful_fail'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/utils/win_tz.rb:15:in `calculate'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll.rb:135:in `set_timezone'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll.rb:123:in `block in configuration'
from <internal:kernel>:90:in `tap'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll.rb:122:in `configuration'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:44:in `configuration_from_options'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:83:in `block (2 levels) in init_with_program'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
from C:/Ruby31-x64/bin/jekyll:25:in `load'
from C:/Ruby31-x64/bin/jekyll:25:in `<main>'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/external.rb:60:in `require': cannot load such file -- tzinfo (LoadError)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/external.rb:60:in `block in require_with_graceful_fail'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/external.rb:57:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/external.rb:57:in `require_with_graceful_fail'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/utils/win_tz.rb:15:in `calculate'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll.rb:135:in `set_timezone'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll.rb:123:in `block in configuration'
from <internal:kernel>:90:in `tap'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll.rb:122:in `configuration'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:44:in `configuration_from_options'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:83:in `block (2 levels) in init_with_program'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from C:/Ruby31-x64/lib/ruby/gem
_site
folder/_site
subdomain, you get a weird mix of the original theme I cloned from GitHub and my visual modifications, but with none of my content.