# Instiki Installation

## 1. General Prerequisites

This version of Instiki requires 1.8.7, 1.9.3, 2.0 or 2.1 and Rubygems (1.3.6 or later). For instructions on using Instiki with some popular webhosting services, see here.

### MacOSX

#### Snow Leopard, Lion, Mountain Lion and Mavericks

Ruby 1.8.7 and Rubygems come installed with the Developer Tools (an optional install, on your System Installation DVD) in MacOSX 10.6. In 10.7-10.9, Xcode (and the associated commandline tools) are available from the App Store. Regardless, you do need the Developer tools installed, in order to set up Instiki.

On older systems, you may need to do a

sudo gem update --system
sudo gem update

On more recent systems (Lion and later), you may need to do a

sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2

if the steps below lead to a lixml2 not found error when Bundler tries to install Nokogiri.

##### El Capitan
xcode-select --install
brew install ruby libxml2 # maybe more YMMV
gem update --system
gem update

### Linux

On Debian and Ubuntu, you will need to:

$sudo apt-get install ruby1.9.1 ruby1.9.1-dev ri1.9.1 libopenssl-ruby rake rubygems ruby-sqlite3 libxslt-dev libxml2-dev libsqlite3-dev swig flex bison (Some of these don’t exist on my Ubuntu distro (meerkat): libopenssl-ruby, libxslt-dev (I have libxslt-ruby), libxml2-dev (I have libxml-dev).) On Fedora, that would be:$ yum install make ruby ruby-devel rubygems sqlite sqlite-devel swig flex bison

though, apparently, you may need to supply the necessary soft link

\$ ln -s /usr/lib/libsqlite3.so.0.8.6  /usr/lib/libsqlite3.so

yourself.

N.b.: If you get a

install_gem_spec_stubs': undefined method loaded_specs' for Gem:Module (NoMethodError)

error, when you try to run Instiki, then the version of Rubygems that you installed is too old. See these instructions. In particular, you need to

sudo gem install rubygems-update
sudo update_rubygems

to update Rubygems to a sufficiently recent version. (See the discussion here for more insight.)

CentOS is a RedHat-like Linux distro, so you should follow the Fedora instructions above. There are some additional issues that may affect some CentOS installations. See here for details.

### Windows

#### Using a Windows-native Ruby build

The 1.9.3 and 2.0.0 RubyInstallers should get you the runtime prerequisites. Their Development kit provides the needed tools to install “native” Rubygems (like sqlite3-ruby and itextomml). With either Ruby version it is strongly recommended that the entire path in which Instiki resides not contain any spaces in the directory names, as this will yield a warning message and potential problems.

## 2. Installing Instiki

Download and untar the latest release, or the current development version. The latter contains many bugfixes and improvements and is the version that is running on this site (so, if you can see this page, you know it’s working).

If you do opt for the development version, you can also get it using bzr:

bzr branch http://golem.ph.utexas.edu/~distler/code/instiki/svn/ location-of-Instiki/

or Git:

git clone http://github.com/parasew/instiki.git location-of-Instiki/

Then further updates are as easy as doing a bzr pull` (or git pull).

Make sure that there are no spaces in the pathname leading to the directory where you install Instiki (i.e., that none of the parent directories have spaces in their names).

## 3. Running Bundler and starting Instiki

Now, from the main instiki directory, type the command

ruby bundle install --path vendor/bundle

This will download and install the other prerequisites (the sqlite3-ruby bindings, itextomml, etc).

Finally

./instiki --daemon

will start up Instiki.