I am interested in using Phantomjs and I would like to run it from my Ruby on Rails application. However, this is a command line tool (i.e. I need to run something like phantomjs rasterize.js http://raphaeljs.com/polar-clock.html clock.png in my terminal). How do I execute a command line tool from my application?
phantomjs rasterize.js http://raphaeljs.com/polar-clock.html clock.png
Use backlinks in your ruby ββcode, for example:
output = `phantomjs rasterize.js http://raphaeljs.com/polar-clock.html clock.png`