How to run Ruby code from source

Question on G+ about hacking Gollum wiki code to see changes immediately.

Keith Gaddis's answer:

There's nothing to compile. You can approach the problem in one of two ways: edit the gem as its installed on your system, or clone the repo, make your changes, and install the gem using "rake install" to see your changes.

Out of laziness I usually use the first approach. If you're using bundler you can execute "bundle open gollum", otherwise install the gemedit gem ('gem install gemedit'), set your $EDITOR environment variable if necessary, and execute "gem edit gollum". The bin/ wrapper is usually just a thin script that executes something in the library, so you can edit the library

My code:

rvm use 1.9.2
mkdir wiki
git init wiki
./bin/gollum --port 4569 wiki


Change templates and javascript in /lib/gollum/frontend/public/.

Last edited by Artem Dudarev, 2013-10-13 02:01:37. Edit