Installing the Ruby Version Manager and some gems
I wanted to try the Ruby script redcarpet. Since I’ve never used Ruby, I had serious problems with installing it… Fortunately ndbroadbent gave me a hand and provided a step-by-step description how to get it done. So here is what I learned.
The “easiest” way is to install RVM, the Ruby Version Manager. RVM lets you run multiple versions of Ruby, and each Ruby can set up its own environment. RVM facilitates the installation of gems and takes care of all the
GEM_HOME stuff automatically. Note that if you ever need to install any more gems, don’t use sudo anymore. Just run ‘
gem install <gem_name>‘.
Installing RVM and the redcarpet gem (
$ is the prompt):
$ bash < # the installer added this line to ~/.bash_profile: # [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # let's source it: $ source ~/.bash_profile $ rvm install 1.8.7 $ rvm use --default 1.8.7 $ gem install redcarpet
You can use the “markdown” command, which is the classical implementation of the markdown “language”, or you can also use the upskirt project, which is the reference implementation of the GitHub flavored markdown. Redcarpet is just a wrapper around upskirt.
Update: there is also a Python wrapper for upskirt called pantyshot.