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

Could not find gem 'bundler (~> 1.12)' in any of the sources #749

Closed
2 of 5 tasks
lgyjg opened this issue Jan 3, 2017 · 5 comments
Closed
2 of 5 tasks

Could not find gem 'bundler (~> 1.12)' in any of the sources #749

lgyjg opened this issue Jan 3, 2017 · 5 comments

Comments

@lgyjg
Copy link

lgyjg commented Jan 3, 2017

  • 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.
  • I have updated all gems with bundle update.
  • 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?

@justinrummel
Copy link
Contributor

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

@mmistakes
Copy link
Owner

@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.

@lgyjg
Copy link
Author

lgyjg commented Jan 3, 2017

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

@HeidiHansen
Copy link

HeidiHansen commented Feb 2, 2019

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

@samkellerhals
Copy link

samkellerhals commented Mar 4, 2019

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants