From: Abder-Rahman Ali Date: 2010-09-06T12:42:11+09:00 Subject: unable to open X server `' (Magick::ImageMagickError) I have written a Ruby script "dicom_info.rb", and when I try running it, I get the following error. Why is that? And, how can it get solved? C:\Users\Abder-Rahman\Desktop\Research\dicom>ruby dicom_info.rb Fantomas is 070Y And, this is the DICOM image dicom_info.rb:22:in `display': unable to open X server `' (Magick::ImageMagickEr ror) from dicom_info.rb:22 from dicom_info.rb:10:in `each_index' from dicom_info.rb:10 This is the "dicom_info,rb" script: require "rubygems" require "dicom" require "RMagick" dicom_files = Array.new Dir["./dcm_files/*.dcm"].each do |dcm| dicom_files << dcm end dicom_files.each_index do |i| dcm = DICOM::DObject.new(dicom_files[i]) # Retrieve patient name value patient_name = dcm.value("0010,0010") patient_age = dcm.value("0010,1010") print patient_name print " " print "is " print patient_age puts puts "And, this is the DICOM image" dicom_image = dcm.get_image_magick dicom_image.display end Thanks. -- Posted via http://www.ruby-forum.com/.