0

I have a static website hosted by github pages, based on Jekyll. It used to properly work, but after about a year without updates, I did a merge from the forked repository, and now I can't get it to work on my local machine.

- $ bundle install
- $ bundle exec jekyll serve --trace

Last command returns:

Configuration file: /home/user/user.github.io/_config.yml
            Source: /home/user/user.github.io
       Destination: /home/user/user.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
"Fetching external posts from medium.com:"
bundler: failed to load command: jekyll (/home/user/gems/bin/jekyll)
NameError: uninitialized constant HTTParty::ConnectionAdapter::OpenSSL
Did you mean?  Open3
  /home/user/gems/gems/httparty-0.21.0/lib/httparty/connection_adapter.rb:211:in `attach_ssl_certificates'
  /home/user/gems/gems/httparty-0.21.0/lib/httparty/connection_adapter.rb:117:in `connection'
  /home/user/gems/gems/httparty-0.21.0/lib/httparty/connection_adapter.rb:80:in `call'
  /home/user/gems/gems/httparty-0.21.0/lib/httparty/request.rb:197:in `http'
  /home/user/gems/gems/httparty-0.21.0/lib/httparty/request.rb:154:in `perform'
  /home/user/gems/gems/httparty-0.21.0/lib/httparty.rb:612:in `perform_request'
  /home/user/gems/gems/httparty-0.21.0/lib/httparty.rb:526:in `get'
  /home/user/gems/gems/httparty-0.21.0/lib/httparty.rb:645:in `get'
  /home/user/user.github.io/_plugins/external-posts.rb:14:in `block in generate'
  /home/user/user.github.io/_plugins/external-posts.rb:12:in `each'
  /home/user/user.github.io/_plugins/external-posts.rb:12:in `generate'
  /home/user/gems/gems/jekyll-4.3.2/lib/jekyll/site.rb:193:in `block in generate'
  /home/user/gems/gems/jekyll-4.3.2/lib/jekyll/site.rb:191:in `each'
  /home/user/gems/gems/jekyll-4.3.2/lib/jekyll/site.rb:191:in `generate'
  /home/user/gems/gems/jekyll-4.3.2/lib/jekyll/site.rb:79:in `process'
  /home/user/gems/gems/jekyll-4.3.2/lib/jekyll/command.rb:28:in `process_site'
  /home/user/gems/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:65:in `build'
  /home/user/gems/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:36:in `process'
  /home/user/gems/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
  /home/user/gems/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `each'
  /home/user/gems/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
  /home/user/gems/gems/jekyll-4.3.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
  /home/user/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
  /home/user/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
  /home/user/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
  /home/user/gems/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
  /home/user/gems/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
  /home/user/gems/gems/jekyll-4.3.2/exe/jekyll:15:in `<top (required)>'
  /home/user/gems/bin/jekyll:23:in `load'
  /home/user/gems/bin/jekyll:23:in `<top (required)>'

I'm using:

  • node v12.16.2
  • ruby v2.5.0

[UPDATE] Based on spickermann's comments, I updated node and ruby to v18.14.2 and v3.0.5 respectively. Now, bundle install gives me:

Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Ignoring json-2.6.3 because its extensions are not built. Try: gem pristine json --version 2.6.3
Ignoring mini_racer-0.4.0 because its extensions are not built. Try: gem pristine mini_racer --version 0.4.0
Ignoring nokogiri-1.10.9 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.9
Ignoring racc-1.6.2 because its extensions are not built. Try: gem pristine racc --version 1.6.2
Ignoring sassc-2.4.0 because its extensions are not built. Try: gem pristine sassc --version 2.4.0
Ignoring sassc-2.2.1 because its extensions are not built. Try: gem pristine sassc --version 2.2.1
Fetching gem metadata from https://rubygems.org/........
Invalid gemspec in [/home/user/gems/specifications/eventmachine-1.2.7.gemspec]: /home/user/gems/specifications/eventmachine-1.2.7.gemspec:40: syntax error, unexpected ')', expecting '.' or &. or :: or '['
eeze, ["~> 0.5.1"])
                  ^
/home/user/gems/specifications/eventmachine-1.2.7.gemspec:46: syntax error, unexpected `end', expecting end-of-input
  end
  ^~~
The gemspec for eventmachine-1.2.7 at /home/user/gems/specifications/eventmachine-1.2.7.gemspec was missing or broken. Try running `gem pristine eventmachine -v 1.2.7` to fix the cached spec.

I then tried to gem pristine eventmachine -v 1.2.7 but I get the following error:

Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Ignoring json-2.6.3 because its extensions are not built. Try: gem pristine json --version 2.6.3
Ignoring mini_racer-0.4.0 because its extensions are not built. Try: gem pristine mini_racer --version 0.4.0
Ignoring nokogiri-1.10.9 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.9
Ignoring racc-1.6.2 because its extensions are not built. Try: gem pristine racc --version 1.6.2
Ignoring sassc-2.4.0 because its extensions are not built. Try: gem pristine sassc --version 2.4.0
Ignoring sassc-2.2.1 because its extensions are not built. Try: gem pristine sassc --version 2.2.1
Invalid gemspec in [/home/user/gems/specifications/eventmachine-1.2.7.gemspec]: /home/user/gems/specifications/eventmachine-1.2.7.gemspec:40: syntax error, unexpected ')', expecting '.' or &. or :: or '['
eeze, ["~> 0.5.1"])
                  ^
/home/user/gems/specifications/eventmachine-1.2.7.gemspec:46: syntax error, unexpected `end', expecting end-of-input
  end
  ^~~
ERROR:  While executing gem ... (NoMethodError)
    undefined method `platform' for nil:NilClass
Beinje
  • 572
  • 3
  • 18
  • You are using the latest version of those gems, but a very old and unmaintained version of Ruby. I suggest updating Ruby to at least 3.1.3 or 3.2.1. Same for Node, where I would propose version 18 or 19. And then try again. – spickermann Mar 05 '23 at 14:46
  • Thank you for the hint. I did install Ruby 3.0.5 (because some gems required version <3.1.2) and Node v18 LTS. Now `bundle install` returns error messages like `gemspec for eventmachine-1.2.7 at /home/user/gems/specifications/eventmachine-1.2.7.gemspec was missing or broken` and when I follow up trying to fix that, I get `ERROR: While executing gem ... (NoMethodError) undefined method 'platform' for nil:NilClass`. Any idea what is going on ? – Beinje Mar 05 '23 at 21:32
  • I would try to manually `gem install eventmachine` first and then retry running `bundle`. If there is still an error, it might be worth copy'n'pasting the whole error message, including the stacktrace into your question. – spickermann Mar 06 '23 at 07:12
  • @spickermann I tried installing eventmachine manually, but I still get errors. I updated my post with the new message and trace. – Beinje Mar 07 '23 at 09:55
  • @Beinje Seems to be related to OpenSSL somehow - are you on an M1 Mac? See https://stackoverflow.com/questions/74339443/cant-install-jekyll-fatal-error-openssl-ssl-h-file-not-found/74340336#74340336 - I hope this helps. – Christian Mar 25 '23 at 00:18
  • 1
    @Christian no, I am under Linux Ubuntu 20.04. I guess I broke something but I'm not skilled enough with node and gems to fix it. I ended up reinstalling a clean virtual environment with latest versions and it's OK now. Thank you for your help anyway ! – Beinje Mar 29 '23 at 13:51

0 Answers0