#!/bin/bash
# vim:ft=sh

if [ -z "$RUBYRC_INCLUDED" ]; then
  RUBYRC_INCLUDED=yes
  export RUBYRC_INCLUDED

  command_exists ()
  {
    type "$1" &> /dev/null ;
  }

  if command_exists 'ruby' && command_exists 'gem'; then
    PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH"
  fi
fi

