Running phantomjs from a Ruby on Rails application

后端 未结 1 1609

I\'m interested in using Phantomjs and I\'d like to run it from my Ruby on Rails application. However, this is a command line tool (i.e. I\'d need to run something like ph

1条回答
  •  借酒劲吻你
    2021-02-03 14:28

    Use backticks in your ruby code e.g.:

    output = `phantomjs rasterize.js http://raphaeljs.com/polar-clock.html clock.png`
    

    0 讨论(0)
提交回复
热议问题