Install Nanoc using RubyGems:
% gem install nanoc
For detailed installation instructions, read on.
Nanoc requires Ruby in order to run. Nanoc supports the official Ruby interpreter from version 2.1 up, as well as JRuby from version 9000 up.
Ruby may already be installed on your system. To check, open a terminal window and type ruby --version. If you get “command not found”, Ruby is not yet installed. Otherwise, you will see which version of Ruby you have:
% ruby --version ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] %
To install Ruby, follow the installation instructions on the Ruby web site.
All dependencies are now taken care of, and installing Nanoc should now be easy:
% gem install nanoc
To make sure that Nanoc was installed correctly, run nanoc --version. It should print the version number along with some other information, like this:
% nanoc --version Nanoc 4.3.2 © 2007-2016 Denis Defreyne. Running ruby 2.3.1 (2016-04-26) on x86_64-darwin15 with RubyGems 2.6.6. %
If you get a “command not found” error when trying to run nanoc, you might have to adjust your
$PATH to include the path to the directory where RubyGems installs executables.
The current version of Nanoc is is 4.3.2, released on August 23rd, 2016. You can find the release notes for this version as well as release notes for older versions on the Release Notes page.
If you’re on Windows and are using the Windows console, it’s probably a good idea to install the win32console gem using gem install win32console to allow Nanoc to use pretty colors when writing stuff to the terminal.
Installing from git
You can also install Nanoc from the repository if you want to take advantage of the latest features and improvements in Nanoc. Be warned that the versions from the repository may be unstable, so it is recommended to install Nanoc from RubyGems if you want to stay safe. You can install Nanoc from the git repository like this:
~% git clone git://github.com/nanoc/nanoc.git ~% cd nanoc ~/nanoc% gem build nanoc.gemspec ~/nanoc% gem install nanoc-*.gem