  CACHE (0.0ms)   SELECT * FROM `versions` WHERE (`versions`.`name` = 'redmineWebDavLog.txt') AND (`versions`.project_id = 9) ORDER BY versions.effective_date DESC, versions.name DESC LIMIT 1
  CACHE (0.0ms)   SELECT * FROM `attachments` WHERE (`attachments`.container_id = 9 AND `attachments`.container_type = 'Project' AND (filename = 'redmineWebDavLog.txt')) ORDER BY attachments.created_on LIMIT 1


NoMethodError (undefined method `filename' for nil:NilClass):
...