There are two fairly common cases in which you might wish to run a version of LiquiDoc other than the latest officially released edition. You may need a previously released version due to deprecated functionality or an unfixed bug in the latest release. Or maybe there is functionality you need that only exists in unreleased version — probably a version you’ve hacked yourself or one already pushed to GitHub but awaiting release.

Here we instruct all three use cases: previous release, local modification, and remote modification. Each method recommends editing the Gemfile in your root directory. Open it with your favorite code/text editor, and remember to run bundle update after re-pointing your liquidoc dependency.

For advanced gem-version designation tricks, see Bundler’s Gemfile documentation.

Install an older gem version

If you need to invoke an older version of LiquiDoc, simply designate the required version and update your dependencies.

  1. In your Gemfile, edit the liquidoc line by setting a required version of the gem.

    'liquidoc', '0.6.0'
  2. Save your modified Gemfile.

  3. Run bundle update on the command line.

Install a local modified gem

If you have a modified clone of the liquidoc-gem repository on your local system, Bundler will build the gem at runtime as long as you have the liquidoc dependency properly designated.

  1. In your Gemfile, edit the liquidoc line by adding a path to your local liquidoc-gem repo.

    'liquidoc', path: '../liquidoc-gem'
    The pass value can be absolute or relative to the Gemfile itself.
  2. Save your modified Gemfile.

  3. Run bundle update on the command line.

Subsequent liquidoc commands will use this alternate source.

Install a remote modified gem

If you need to run a pre-release version of LiquiDoc that is posted in a remote repo, such as in a branch in the prime repo that has been submitted but not

  1. In your Gemfile, edit the liquidoc entry to designate a Git repo and a specific branch,

    'liquidoc', :git => "{github_git_uri}", :branch => "special-mode"

    Where special-mode is the name of an unmerged branch you want your gem built from.

    Instead of a branch, you can designate a specific revision hash with :ref ⇒ "a3iq0k", where a3iq0k is an example partial hash, enabling you to build a gem from any past commit. As another option, specific Git tags can be designated with a notation such as :tag ⇒ "v1.0.0-rc".
  2. Save your modified Gemfile.

  3. Run bundle update on the command line.

Tags: