Hello colleague, i'm not 100% sure, but i think it's a deficiency of Compose.jl which doesn't define all combinations of Cairo Surfaces with output files (or IO streams). You could file an issue in Gadfly and or Compose.jl.
Some time ago i contributed for Compose.jl the function to render to an
available Cairo Surface. With that (and some hacking) it should be possible
to render to a IOBuffer.
Wishing a happy day,
Andreas
