Closed JonasHelmoe closed 3 years ago
Sorry, it worked when I used a real docx file. I just changed the file extension to "docx", but only after using a file from here, it worked: https://file-examples.com/index.php/sample-documents-download/sample-doc-download/
file_path = File.join(Rails.public_path, '/files/file-sample_100kB.docx')
ExceptionTrack::Log.create(title: "file_path", body: "#{file_path}")
content = File.read(file_path)
doc = Docx::Document.open(content)
@JonasPreisler it not worked when I used a real docx file with your ,how did you do that
I wrote this simple code:
...and keep getting "undefined method `close' for nil:NilClass".
I am sure the file is there, and tried many different locations for the file, so I'm suspecting this gem is not maintained.
Can anyone guide me? Thank you