Script for starting a gollum wiki (from anywhere) in the background when developing with RVM.
#!/bin/bash
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
printf "ERROR: An RVM installation was not found.\n"
fi
# Open project folder
cd "$HOME"/wiki/;
# In case loading RVM isn't enough (c.f. in a project specific gemset) uncomment the next line
# rvm use 1.9.3@wiki
# Start gollum on port 61001 and run it in the background
screen -dmS wiki "$HOME"/.rvm/gems/ruby-1.9.3-p448@wiki/bin/gollum --port 61001