Did you try with a PDF-file ?
The Magick::Image constructor will fail.
If you catch the error message you get:
root@n2:/root# ./test test.pdf
Magick failed - Magick: Postscript delegate failed `test.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/713
The "no such file" comes from that it cant execute ghostscript due to ENOMEM, so the error message itself is also not entirely correct.
open("/usr/app/imagemagick/6.8.8-10/share/doc/ImageMagick-6/delegates.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
open("//.config/ImageMagick/delegates.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
open("//.magick/delegates.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
brk(0xcd4000) = 0xcd4000
stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=540672, ...}) = 0
open("/tmp/magick-25602tEJ6QzOnoVAd", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
close(3) = 0
brk(0xcf5000) = 0xcf5000
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f93c8059a90) = -1 ENOMEM (Cannot allocate memory)
rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL},

= 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL},

= 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [],

= 0
clone(child_stack=0, flags=CLONE_PARENT_SETTID|SIGCHLD, parent_tidptr=0x7fff569e48bc) = -1 ENOMEM (Cannot allocate memory)
rt_sigaction(SIGINT, {SIG_DFL}, NULL,

= 0
rt_sigaction(SIGQUIT, {SIG_DFL}, NULL,

= 0
rt_sigprocmask(SIG_SETMASK, [], NULL,

= 0
open("/usr/app/imagemagick/6.8.8-10/share/ImageMagick-6/locale.xml", O_RDONLY) = 3
lseek(3, 0, SEEK_END) = 2403
mmap(NULL, 2403, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f93c806a000
munmap(0x7f93c806a000, 2403) = 0
close(3) = 0
open("/usr/app/imagemagick/6.8.8-10/lib/ImageMagick-6.8.8//config-Q16/locale.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/app/imagemagick/ImageMagick-6/locale.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/app/imagemagick/6.8.8-10/share/doc/ImageMagick-6/locale.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
open("//.config/ImageMagick/locale.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
open("//.magick/locale.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/app/imagemagick/6.8.8-10/share/ImageMagick-6/english.xml", O_RDONLY) = 3
lseek(3, 0, SEEK_END) = 48325
mmap(NULL, 48325, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f93c804c000
munmap(0x7f93c804c000, 48325) = 0
close(3) = 0
brk(0xd1f000) = 0xd1f000
unlink("/tmp/magick-25602xZhJhBt1ISkq") = 0
unlink("/tmp/magick-25602xZhJhBt1ISkq.cache") = -1 ENOENT (No such file or directory)
unlink("/tmp/magick-25602xZhJhBt1ISkq") = -1 ENOENT (No such file or directory)
unlink("/tmp/magick-25602ANZJT9hMXW4C.cache") = -1 ENOENT (No such file or directory)
unlink("/tmp/magick-25602ANZJT9hMXW4C") = 0
stat("/tmp/magick-25602tEJ6QzOnoVAd1", 0x7fff569e49f0) = -1 ENOENT (No such file or directory)
times({tms_utime=1, tms_stime=489, tms_cutime=0, tms_cstime=0}) = 4628589349
times({tms_utime=1, tms_stime=489, tms_cutime=0, tms_cstime=0}) = 4628589349
futex(0x7f93c6feeac4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f93c806a000
write(1, "Magick failed - Magick: Postscri"..., 120Magick failed - Magick: Postscript delegate failed `test.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/713