Upgrade Asciidoctor

Upgrade on Linux

Some Linux distributions may not have the latest stable version of Asciidoctor packaged immediately after a release of a new gem. If you need to upgrade to the latest version immediately, use gem install instead of the package manager.

Your Linux system may be configured to automatically update packages, in which case the latest Asciidoctor package will be installed as soon as it becomes available. No further action is required by you.

Alpine Linux

On Alpine Linux, update the Asciidoctor package using:

$ sudo apk add -u asciidoctor

APT

On Debian and Debian-based distributions, update the Asciidoctor package using:

$ sudo apt-get upgrade -y asciidoctor

DNF

On Fedora and other RPM-based distributions, you can update the package using:

$ sudo dnf update -y asciidoctor

Upgrade on macOS with Homebrew

To upgrade the gem, open a terminal and type:

$ brew update
$ brew upgrade asciidoctor

Upgrade using gem update

You’re advised against using the gem update command to update a gem managed by the package manager. Doing so puts the system into an inconsistent state as the package manager can no longer track the files (which get installed under /usr/local). Simply put, system gems should only be managed by the package manager.

If you want to use a version of Asciidoctor that is newer than what is installed by the package manager, you should use RVM to install Ruby in your home directory (i.e., user space). Then, you can safely use the gem command to install or update the Asciidoctor gem. When using RVM, gems are installed in a location isolated from the system.

You can upgrade Asciidoctor using the gem update command:

$ gem update asciidoctor

If you accidentally use gem install instead of gem update, then you’ll end up with both versions installed. To remove the older version, use the following gem command:

$ gem cleanup asciidoctor