You might also try "eject /dev/hda" using the location
of your CD-ROM in place of "hda". If you don't know which
device it is, issue "dmesg | grep CD" to find out. If you
still have an app open using the device, such as a file
browser, it will be busy and won't open.