Home > ruby, ubuntu > Installing the Ruby Version Manager and some gems

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 PATH and 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

Now you should be able to run redcarpet, which is a Ruby interface to the upskirt library, the library that is used at GitHub to render markdown texts.

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.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: