bash check in gem is installed

Shell
if `gem list lunchy -i`; then 
  echo "Lunchy gem is installed!"; 
  # do some configuration here
fi
Source

Also in Shell: