mmistakes / minimal-mistakes

:triangular_ruler: Jekyll theme for building a personal site, blog, project documentation, or portfolio.
https://mmistakes.github.io/minimal-mistakes/
MIT License
12.39k stars 25.56k forks source link

Dependencies conflict for GitHub.com #206

Closed lyndell closed 8 years ago

lyndell commented 8 years ago

Tried building this for github.com, where I'll use it, but dependencies conflict.

tech@wrkstn minimal_mistakes.gitrepo $ 
tech@wrkstn minimal_mistakes.gitrepo $ bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies..................................................................................................................................................................................................
Bundler could not find compatible versions for gem "jekyll":
  In Gemfile:
    octopress (~> 3.0) ruby depends on
      jekyll (~> 2.5) ruby

    octopress (~> 3.0) ruby depends on
      octopress-hooks (~> 2.0) ruby depends on
        jekyll (>= 2.0) ruby

    github-pages (>= 0) ruby depends on
      jekyll (= 2.4.0) ruby
Bundler could not find compatible versions for gem "yajl-ruby":
  In Gemfile:
    octopress (~> 3.0) ruby depends on
      jekyll (~> 2.5) ruby depends on
        pygments.rb (~> 0.6.0) ruby depends on
          yajl-ruby (~> 1.2.0) ruby

    github-pages (>= 0) ruby depends on
      pygments.rb (= 0.6.0) ruby depends on
        yajl-ruby (~> 1.1.0) ruby
Bundler could not find compatible versions for gem "redcarpet":
  In Gemfile:
    octopress (~> 3.0) ruby depends on
      jekyll (~> 2.5) ruby depends on
        redcarpet (~> 3.1) ruby

    github-pages (>= 0) ruby depends on
      redcarpet (= 2.2.2) ruby
tech@wrkstn minimal_mistakes.gitrepo $ 
tech@wrkstn minimal_mistakes.gitrepo $ 

Used the following in the Gemfile:

source "https://rubygems.org"

gem 'github-pages'
gem 'jekyll-sitemap'
gem 'octopress', '~> 3.0'
doyard commented 8 years ago

I have the same problem and don't know why the author uses jekyll(2.5.3) while the latest stable version is 2.4.0.

update: I have resolved this problem. You don't need to install the github-pages which is designed for jekyll 2.4.0. Detele the Gemfile.lock And just use bundle install to install the dependencies. Everything will be ok!

@lyndell

lyndell commented 8 years ago

It works, but how will it build on GitHub, which says put the following in the Gemfile:

source 'https://rubygems.org'
gem 'github-pages'
mmistakes commented 8 years ago

It will build just fine. The theme's demo site is hosted with GitHub Pages and I have zero issues. I made absolutely no changes to the Gemfile that's in the gh-pages repo. It's using Jekyll 2.5.3 and not the github-pages gem. There really isn't many differences between Jekyll 2.5.3 and the github-pages gem anyways... the biggie being it disables plugins and a few other things that helps you test builds locally in the same environment GH uses when hosting your site.

If you're having problems with dependencies when using github-pages gem then just remove Gemfile and Gemfile.lock and use this instead and run bundle install as noted by @chamhaw above.

source 'https://rubygems.org'
gem 'github-pages'