dimanche 27 décembre 2015

Rails docx gem zip error

I am trying to use docx gem to use .docx file in my seed and docx-html gem to convert its content to html to display on page easilly. But I am having some troubles creating a Docx::Document object for my docx file.
seeds.rb


...
    d = Docx::Document.open('app/assets/seed/seed2.docx')
    d.to_html
...


And thats the error I get evry time i try to run rake db:seed

Zip::ZipError: Zip end of central directory signature not found

Do any of You have solution to this problem?

Aucun commentaire:

Enregistrer un commentaire