As a minimal mistake Jekyll theme user, I use the following commands to set up and use npm, gem, and bundler.


“npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently.”,

Installation / Update

  • Install npm
    $ curl -sL | sudo -E bash -
    $ sudo apt-get update
    $ sudo apt-get -y install nodejs

    Note: You may need sudo apt-get -y install nodejs make gcc g++.

  • Update npm
    $ sudo npm install -g npm@latest


  • Install packages (based on package.json)
    $ sudo npm install
  • Run scripts
    $ sudo npm run build:js

Gem and Bundler

“The RubyGems software allows you to easily download, install, and use ruby software packages on your system. The software package is called a “gem” which contains a packaged Ruby application or library.”,

“Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed.”,


  • Install gem and bundler
    $ sudo apt-get -y install build-essential patch ruby-dev zlib1g-dev liblzma-dev
    $ gem install bundler

    Note: For installing bundler, you may need sudo gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)", if you have problem in using bundler.

  • Install dependencies using bundler (based on Gemfile)
    $ bundle install
  • Run local jekyll server
    $ bundle exec jekyll serve --host .. --port .. --livereload

    Tip. If the jekyll server is running in a docker container, use --host to relay the container with a host.


  1. How to Install Node.js and npm on Ubuntu 20.04
  2. Try the latest stable version of npm

Leave a comment