don't have jekyll-paginate or one of its dependencies installed

前端 未结 7 1006
清歌不尽
清歌不尽 2020-12-28 15:16

I have installed this jekyll theme. But faced with one issue.

If I do:

bundle exec jekyll serve

All work fine (_site f

7条回答
  •  粉色の甜心
    2020-12-28 15:37

    I recently ran into this problem.

    Here is a full list of steps for running Jekyll site (github pages) on MacOS

    Install bundler and jekyll

    Copied from https://jekyllrb.com/docs/installation/macos/

    1. Install Xcode
    2. Install Homebrew
    
    Add RUBY to your PATH as 
       echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
    
    3. Install Jekyll
    
    Add gems to your PATH as
       echo 'export PATH="$HOME/.gem/ruby/2.6.0/bin:$PATH"' >> ~/.bash_profile
    
    

    Running Jekyll site

    Restart your terminal and go to your project's root directory.

    bundle exec jekyll serve
    

    If above command run into following error, then update the gemfile

     Dependency Error: Yikes! It looks like you don't have jekyll-paginate or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. If you've run Jekyll with `bundle exec`, ensure that you have included the jekyll-paginate gem in your Gemfile as well. The full error message from Ruby is: 'cannot load such file -- jekyll-paginate' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/! 
    

    Fix

    Gemfile is in your project's root directory. Add new gems to it as

    source "https://rubygems.org"
    
    gem "jekyll", "~> 4.0"
    gem "jekyll-paginate", "~> 1.1.0"
    gem "jekyll-sitemap"
    gem "jekyll-gist"
    gem "jekyll-feed"
    gem "jemoji"
    

    Then

    bundle install
    bundle exec jekyll serve
    

    Your site should be up at http://127.0.0.1:4000/

提交回复
热议问题