Skip to content
bwalton edited this page Jul 31, 2011 · 5 revisions

For Mac, Linux and FreeBSD, you can test your environment using the code below:

require 'rubygems'
require 'rghost'
RGhost::Config.is_ok?.render :pdf, :filename => '/tmp/is_ok.pdf'

For Windows users

Windows users need set the Ghostscript path manually. For example, for a Ghostscript installation on C:\gs you would:

require 'rubygems'
require 'rghost'
RGhost::Config::GS[:path]= "C:\\gs\\bin\\gswin32c.exe"
RGhost::Config.is_ok?.render :pdf, :filename => "c:\\is_ok.pdf"

If the PDF looks like this:

Everything is ok!