Skip to content

Docsplit.extract_images(path) => bin/rails: No such file or directory - file #153

Description

@crusadergo

Hi there! I put my project in docker and docsplit stopped working correctly.

version: ruby:2.5.5-alpine3.8

libs in docker: graphicsmagick poppler-utils ghostscript tesseract-ocr libreoffice pdftk file libreoffice-writer

rails console: irb(main):006:0> Docsplit.extract_images(path) bin/rails: No such file or directory - file Traceback (most recent call last): 16: from bin/rails:4:in

'
15: from bin/rails:4:in require' 14: from /usr/local/bundle/gems/railties-4.2.11.1/lib/rails/commands.rb:17:in <top (required)>'
13: from /usr/local/bundle/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:39:in run_command!' 12: from /usr/local/bundle/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:68:in console'
11: from /usr/local/bundle/gems/railties-4.2.11.1/lib/rails/commands/console.rb:9:in start' 10: from /usr/local/bundle/gems/railties-4.2.11.1/lib/rails/commands/console.rb:110:in start'
9: from (irb):6
8: from /usr/local/bundle/gems/docsplit-0.7.6/lib/docsplit.rb:57:in extract_images' 7: from /usr/local/bundle/gems/docsplit-0.7.6/lib/docsplit/transparent_pdfs.rb:10:in ensure_pdfs'
6: from /usr/local/bundle/gems/docsplit-0.7.6/lib/docsplit/transparent_pdfs.rb:10:in map' 5: from /usr/local/bundle/gems/docsplit-0.7.6/lib/docsplit/transparent_pdfs.rb:15:in block in ensure_pdfs'
4: from /usr/local/bundle/gems/docsplit-0.7.6/lib/docsplit.rb:65:in extract_pdf' 3: from /usr/local/bundle/gems/docsplit-0.7.6/lib/docsplit/pdf_extractor.rb:120:in extract'
2: from /usr/local/bundle/gems/docsplit-0.7.6/lib/docsplit/pdf_extractor.rb:120:in each' 1: from /usr/local/bundle/gems/docsplit-0.7.6/lib/docsplit/pdf_extractor.rb:125:in block in extract'
NoMethodError (undefined method strip' for nil:NilClass)

Please, help

Activity

  1. thanhtoan1196 commented on Nov 11, 2021

    @thanhtoan1196

    any updates?

  2. shishiru commented on Feb 24, 2023

    @shishiru

    In our case, the problem was not with docsplit but the "file" tool not being installed in the docker image. apt-get install file solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions