Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Installation

Florian Kasper edited this page Jan 29, 2014 · 9 revisions

Basic installation

Basic installation of gollum_rails is very simple. Just add the gem to your Gemfile:

gem 'gollum_rails'

Then run the bundler to install:

bundle install

Now there is a generator, which will do the rest for you:

rails g gollum_rails:install

Advanced configuration

after installation you will find the initializer for gollum_rails under RAILS_ROOT/config/initializers/gollum_rails.rb

Configuration options

The following configuration is already present in this file:

GollumRails::Setup.build do |config|
    config.repository = '<path_to_your_repository>'
end

By default gollum_rails is disabled, because if you haven't set your GIT repository, path the gollum::wiki cannot initialize.

Repository source

It is also possible to make the repositorypath environment specific e.g. if you want you can use /some/path in development mode and /some/useful in production.

There is already a configuration option for doing this:

config.repository = :application

Now you can simply edit you applications environment files under RAILS_ROOT/config/environments/*.rb

Examples:

# /config/environments/development.rb
config.wiki_repository = Rails.root.join('db','development_repo.git')
# /config/environments/test.rb
config.wiki_repository = Path.join(RAILS_ROOT,'db','test_repo.git')
# /config/environments/production.rb
config.wiki_repository = Path.join(RAILS_ROOT,'db','production_repo.git')

will use your applications configuration option

Additional languages

to install aditional language parsing support you can install the listed gems below, by calling:

rails g gollum_rails:language <LANGUAGE>

possible s are:

the generator will install the necessary programs, or give you instructions howto do it.

Clone this wiki locally