jekyll-docker
jekyll-docker copied to clipboard
Can't install Bootstrap gem
Hey everyone,
I tried to add Bootstrap to my Jekyll project via the Gemfile. When using the jekyll/jekyll or jekyll/builder image, this leads to the following error:
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:319:in `check_for_activated_spec!': You have already activated concurrent-ruby 1.1.5, but your Gemfile requires concurrent-ruby 1.1.9. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
So I tried the jekyll/minimal image but it failed as well because the minimal image doesn't support C based gems.
So what else can I do?
Thanks in advance Fred
Running the jekyll/minimal image like this:
docker run --rm --volume "$PWD:/srv/jekyll" -p 4000:4000 --env JEKYLL_ENV=development jekyll/minimal:3.8 sh -c "apk add libc-dev g++ make && jekyll serve --future -s src"
fixed the missing support for C based gems. But it brought me back to the initial error.
The error message says
Prepending `bundle exec` to your command may solve this.
So where do I need to add this?
Adding bundle exec before jekyll serve leads to another error:
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find rake-13.0.6 in any of the sources (Bundler::GemNotFound)
Did I mention that I have no idea how Ruby works (that's why I wanted to lock it away in a container in the first place) and that I hate to learn the very specific errors of a new language to be able to use it?