-
Notifications
You must be signed in to change notification settings - Fork 21
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
after installation you will find the initializer for gollum_rails under RAILS_ROOT/config/initializers/gollum_rails.rb
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.
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
to install aditional language parsing support you can install the listed gems below, by calling:
rails g gollum_rails:language <LANGUAGE>
possible s are:
-
ASCIIDoc -- language:
asciidoc
-
Creole -- language:
creole
-
Markdown -- language:
markdown
-
GitHub Flavored Markdown -- language:
better-markdown
-
Org -- language:
org
-
Pod -- language:
pod
-
RDoc -- language:
rdoc
-
ReStructuredText -- language:
rst
-
Textile -- language:
textile
-
MediaWiki -- lanugage:
wiki
the generator will install the necessary programs, or give you instructions howto do it.