Minimal-mistakes: Could not find gem 'bundler (~> 1.12)' in any of the sources

Created on 3 Jan 2017  ·  5Comments  ·  Source: mmistakes/minimal-mistakes

  • [ ] This is a question about using the theme.
  • [ ] I believe this to be a bug with the theme --- not Jekyll, GitHub Pages or one of the bundled plugins.
  • [ ] This is a feature request.
  • [x] I have updated all gems with bundle update.
  • [x] I have tested locally with bundle exec jekyll build.

Environment informations

  • Minimal Mistakes version:
  • jekyll version: 3.3.1
  • gem version: 2.6.8
  • Bundler version 1.13.7
  • Operating system: ubuntu 16.04LTS

Expected behavior

the command "jekyll serve -w --host=0.0.0.0" could be run successful

Steps to reproduce the behavior

when I set my server host run the command "jekyll serve -w --host=0.0.0.0" in project root directory that make the external network could access my blog.
but I received an ERROR as follow:

ts@ts-OptiPlex-3020:~/blog/Jekyll/mmDoc/webSrc$ jekyll serve -w --host=0.0.0.0

WARN: Unresolved specs during Gem::Specification.reset:
      listen (< 3.1, ~> 3.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/usr/lib/ruby/vendor_ruby/bundler/resolver.rb:203:in `rescue in start': Bundler could not find compatible versions for gem "bundler": (Bundler::VersionConflict)
  In Gemfile:
    bundler (~> 1.12)

  Current Bundler version:
    bundler (1.11.2)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?

Could not find gem 'bundler (~> 1.12)' in any of the sources
    from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:199:in `start'
    from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:183:in `resolve'
    from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:198:in `resolve'
    from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:137:in `specs'
    from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:182:in `specs_for'
    from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:171:in `requested_specs'
    from /usr/lib/ruby/vendor_ruby/bundler/environment.rb:18:in `requested_specs'
    from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:13:in `setup'
    from /usr/lib/ruby/vendor_ruby/bundler.rb:92:in `setup'
    from /var/lib/gems/2.3.0/gems/jekyll-3.3.1/lib/jekyll/plugin_manager.rb:36:in `require_from_bundler'
    from /var/lib/gems/2.3.0/gems/jekyll-3.3.1/exe/jekyll:9:in `<top (required)>'
    from /usr/local/bin/jekyll:22:in `load'
    from /usr/local/bin/jekyll:22:in `<main>'

I have uninstall and reinstall the bundler to the 1.13.7 and the error also
any one who can help me?

Support

Most helpful comment

Note: I forked the repo because I wanted to have full control to customize it.

Rather than creating a new issue, I'm going to comment here. I believe this should be reopened. A fix for this, if you don't have two versions of Bundler installed and you simply just have a newer or different version of bundler than minimal-mistakes supports, then the docs should state the required bundler version and how to add a bundler version. This solution was difficult to find! The fix that worked for me to install the correct version of bundler in addition to the one I already had was:

(current version for minimal mistakes is v 1.15, but I already had 2+ installed)

gem install bundler -v 1.15
bundle _1.15_ install

All 5 comments

with two different versions of "listen" and "bundler" being displayed, I'm wondering if you have duplicate versions installed. You may need to bundle clean --force

@lgyjg Doesn't look like you're running Jekyll the prescribed way of using Bundler.

  1. Run bundle update to verify all gems in your Gemfile are current
  2. Run Jekyll with bundle exec jekyll serve if you don't it likely won't use the current gems. Always prepend any Jekyll command with bundle exec, ie: bundle exec jekyll build, bundle exec jekyll serve, bundle exec jekyll serve -w --host=0.0.0.0, etc.

after I run bundle clean --force, the bundler version 3.2.2 has been removed:

ts@ts-OptiPlex-3020:~/blog/Jekyll/mmDoc/webSrc$ sudo bundle clean --force
...
Removing listen (3.0.6)
......
Removing builder (3.2.2)
......

and then run :jekyll serve -w --host=0.0.0.0, it also has the same error
but the way of mmistakes is ok. whether my way is wrong?
thanks all

Note: I forked the repo because I wanted to have full control to customize it.

Rather than creating a new issue, I'm going to comment here. I believe this should be reopened. A fix for this, if you don't have two versions of Bundler installed and you simply just have a newer or different version of bundler than minimal-mistakes supports, then the docs should state the required bundler version and how to add a bundler version. This solution was difficult to find! The fix that worked for me to install the correct version of bundler in addition to the one I already had was:

(current version for minimal mistakes is v 1.15, but I already had 2+ installed)

gem install bundler -v 1.15
bundle _1.15_ install

@HeidiHansen I agree with you, I also forked the repo for full control and it may clarify this to other users if it was explicitly stated which bundler version is required. Thanks for pointing this out, installing v 1.15 fixed this for me as well!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

halirutan picture halirutan  ·  4Comments

satwikkansal picture satwikkansal  ·  4Comments

z0ph picture z0ph  ·  3Comments

svoner picture svoner  ·  3Comments

m1evankaiser picture m1evankaiser  ·  3Comments