Upgrade ruby, better image attachment check