Open cgeroux opened 10 months ago
One thing to consider here, is that setting up Hugo on github would likely be more involved and have to make use of github actions.
It's been a while -- what in particular is the issue with the Ruby gem stuff?
One example I run into frequently is something like:
$ jekyll serve /home/cgeroux/gems/gems/bundler-2.4.13/lib/bundler/runtime.rb:304:in
check_for_activated_spec!': You have already activated public_suffix 5.0.3, but your Gemfile requires public_suffix 4.0.7. Prepending bundle exec
to your command may solve this. (Gem::LoadError)
from /home/cgeroux/gems/gems/bundler-2.4.13/lib/bundler/runtime.rb:25:in block in setup' from /home/cgeroux/gems/gems/bundler-2.4.13/lib/bundler/spec_set.rb:165:in
each'
from /home/cgeroux/gems/gems/bundler-2.4.13/lib/bundler/spec_set.rb:165:in each' from /home/cgeroux/gems/gems/bundler-2.4.13/lib/bundler/runtime.rb:24:in
map'
from /home/cgeroux/gems/gems/bundler-2.4.13/lib/bundler/runtime.rb:24:in setup' from /home/cgeroux/gems/gems/bundler-2.4.13/lib/bundler.rb:162:in
setup'
from /home/cgeroux/gems/gems/jekyll-4.3.2/lib/jekyll/plugin_manager.rb:52:in require_from_bundler' from /home/cgeroux/gems/gems/jekyll-4.3.2/exe/jekyll:11:in
<top (required)>'
from /home/cgeroux/gems/bin/jekyll:25:in load' from /home/cgeroux/gems/bin/jekyll:25:in
I can get around that by putting "bundle exec" in front of it, but that means that I go from having to explain what 'jekyll build/serve" does to having to also explain what 'bundle exec" does which, if I am not careful might lead me into talking about Gemfiles more than I want to/am able to.
There are things I don't like about Hugo also... but not sure. Something I was considering. Rewriting in terms of Hugo would be a bit of work though.
I usually create a bundle for my ruby dependencies (this is similar to a python virtual environment). I do something like:
mkdir vendor
bundle prefix=vendor/bundle
This will install the gems in Gemfile
in the directory vendor/bundle
rather than doing a gem install ...
Then:
bundle exec jekyll s
each time you want to run the server. (This tells the system to use the gems in the bundle when running jekyll
).
The downside though is that you need to tell jekyll to ignore files in the bundle. For this project, I've already done this here:
https://github.com/acenet-arc/cloud_from_a_to_z/blob/master/_config.yml#L66
the ruby gem stuff is super annoying, and Hugo is faster. Not that the speed of jekyll really has an impact on our small site we are doing for this workshop. The biggest driver is how much of a pain the ruby gem stuff is.