CapIt provides a simple Ruby interface to Björn Höhrmann's CutyCapt.
brew install cuty_capt
sudo apt-get install xvfb
sudo apt-get install cutycapt
(from Setting up Headless XServer and CutyCapt on Ubuntu)
sudo apt-get install xvfb
sudo apt-get install xfs xfonts-scalable xfonts-100dpi
sudo apt-get install libgl1-mesa-dri
sudo apt-get install subversion libqt4-webkit libqt4-dev g++
svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt
cd cutycapt/CutyCapt
qmake
make
You'll also need to make sure the CutyCapt
executable is in your PATH.
gem install capit
require 'capit'
capit = CapIt::Capture("http://www.github.com")
# You can also set CutyCapt's path manually if necessary.
capit = CapIt::Capture("http://www.github.com", :cutycapt_path => "/sbin/CutyCapt")