Topic: CutyCapt Screenshot

Why if I execute the next code in IRB it works, but if I run it from website it doesnt?
system  xvfb-run --server-args='-screen 0, 1024x768x24' CutyCapt --url= --out=public/images/thumbs/13.jpg

Re: CutyCapt Screenshot

Try the CapIt gem, it works.

It's probably because the CutyCapt / cutycapt command is named differently at your server. Don't know why they did it like this.

Last edited by lbunk (2013-05-02 19:48:46)

Re: CutyCapt Screenshot

Hey, Im doing this

require "capit"
capit = CapIt::Capture("",:filename => "mdvlrb.jpg")

But it doesnt create the image, and capit doesnt throw nothing.
But when I execute it in the IRB console, it creates the image...

I dont know what to do.

Re: CutyCapt Screenshot

Try setting :folder => to a folder you know and then see if it creates the image there. Default is Dir.pwd.

Re: CutyCapt Screenshot

I use this in the controller

capit = CapIt::Capture("",:filename => "mdvlrb.jpg",:folder => "public/images/thumbs")

And I get nothing.

I use the same directly in IRB console and I get the image.

Re: CutyCapt Screenshot

If I use this

capit ="",:filename => "mdvlrb.jpg",:folder => "public/images/thumbs")

I get this in the log:  #<CapIt::Capture:0x00000003868c30>
but no image.

Re: CutyCapt Screenshot

It was the permissions in the folder...
Thats weird, because I can execute system("mkdir newfolder") but not system("wkhtmltoimage") or CaptIt..