Skip to content

create Gemfile and bundle install instructions #24

@MichaelCurrin

Description

@MichaelCurrin

Adding gems globally is sometimes done for gem install jekyll. But should really be avoided for other gems. So I'm recommending a controlled local environment with Gemfile.

Problem

Your local install docs require multiple install commands with gem install. This makes it hard to maintain and also the versions you install will not necessarily be the ones on GH Pages. e.g. GH Pages uses 1.2.3 of a gem and the latest you end up installing is 4.5.6

This is particularly important for Jekyll - GH Pages uses Jekyll 3 but you would install Jekyll 4.

Pattern

Follow the pattern from this approach and you'll see Gemfile created.

jekyll new my-blog

Recommended solution

Use approach like this file. Including two gems below Jekyll 3 which allow 3.9 support and Ruby 3 support.

https://github.com/MichaelCurrin/jekyll-blog-demo/blob/master/Gemfile#L3-L11

And then add to docs as:

bundle config set --local path vendor/bundle
bundle install

And ignore vendor in .gitignore

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions