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

Seems that there might be an issue with Jekyll/Gem dependencies? #134

Open
jedpittman opened this issue Aug 14, 2021 · 2 comments
Open

Seems that there might be an issue with Jekyll/Gem dependencies? #134

jedpittman opened this issue Aug 14, 2021 · 2 comments

Comments

@jedpittman
Copy link
Contributor

@thadk
I noticed that perhaps the codeforboston.org could use one or two minor updates and remembered you'd mentioned you'd done some work recently on it. It's been a while since I did anything.....so really starting from scratch. Curious if you or @mzagaja have any thoughts.

When I try to follow the instructions to build the site, I am getting a failure when I attempt Jekyll Build. Here's my output. I'm on windows 10, using the RubyInstaller first, then doing a build of a cloned repo I have locally. I tried to get the version of jekyll to see if maybe that was the issue?

C:\GitHub\codeforboston.org>jekyll build
Resolving dependencies...
C:/Ruby30-x64/lib/ruby/3.0.0/bundler/spec_set.rb:91:in block in materialize': Could not find github-pages-205 in any of the sources (Bundler::GemNotFound) from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/spec_set.rb:86:in map!'
from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/spec_set.rb:86:in materialize' from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/definition.rb:190:in specs'
from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/definition.rb:259:in specs_for' from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/definition.rb:241:in requested_specs'
from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/runtime.rb:91:in block in definition_method' from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/runtime.rb:20:in setup'
from C:/Ruby30-x64/lib/ruby/3.0.0/bundler.rb:149:in setup' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:52:in require_from_bundler'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/exe/jekyll:11:in <top (required)>' from C:/Ruby30-x64/bin/jekyll:23:in load'
from C:/Ruby30-x64/bin/jekyll:23:in `

'


So after some further digging, I found that I had a version of ruby that was too new and the dependencies were outdated.

C:\GitHub\codeforboston.org>bundle install
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
minitest-5.14.1 requires ruby version ~> 2.2, which is incompatible with the
current version, ruby 3.0.2p107

So I then kept down the rabbit hole and found this to be the case:
https://bundler.io/guides/updating_gems.html

And using bundle update did not fix anything. I still end up with this error:

C:\GitHub\codeforboston.org>jekyll build
C:/Ruby30-x64/lib/ruby/3.0.0/bundler/runtime.rb:302:in check_for_activated_spec!': You have already activated i18n 1.8.10, but your Gemfile requires i18n 0.9.5. Prepending bundle execto your command may solve this. (Gem::LoadError) from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/runtime.rb:31:inblock in setup'
from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/spec_set.rb:159:in each' from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/spec_set.rb:159:in each'
from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/runtime.rb:26:in map' from C:/Ruby30-x64/lib/ruby/3.0.0/bundler/runtime.rb:26:in setup'
from C:/Ruby30-x64/lib/ruby/3.0.0/bundler.rb:149:in setup' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:52:in require_from_bundler'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/exe/jekyll:11:in <top (required)>' from C:/Ruby30-x64/bin/jekyll:23:in load'
from C:/Ruby30-x64/bin/jekyll:23:in `

'

@thadk
Copy link
Member

thadk commented Aug 15, 2021

I’ve not installed Jekyll on my machine for many years because it always involves so much Ruby version troubleshooting like this that I’m slow at. One idea would be to submit a pull request and use the deploy preview (and your text editor markdown preview up front) to make sure it is building correctly.

@mzagaja
Copy link
Member

mzagaja commented Aug 15, 2021

At some point jekyll/github pages went in different directions. Jekyll 4 is not available as a GitHub pages thing, so using the GitHub pages gem locks you in to their version. Instead of following the (now outdated) instructions, try bundle install and then bundle exec jekyll serve to get it working. If that works, you can update the README for the next traveler. TY for taking a stab at updating the site :).

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