Added thin as the development webserver
switced webrick for thin
delete tempfile after adding the attachment