Home > front end >  ActiveStorage::UnpreviewableError
ActiveStorage::UnpreviewableError

Time:03-31

I'm trying to create a PDF preview for my PDF files, but I don't know where to start, I'm using poppler gem on Ruby on Rails.

The app is giving me this message: "ActiveStorage::UnpreviewableError in Tasks#show"

So I'm not understanding where should I need to declare the preview

Looking on google I found several sites with methods, but I don't know where to add this code, I've tried by creating a new folder on the app directory, but this didn't work.

CodePudding user response:

In activestorage documentation says about requirements to use this feature.

  • libvips v8.6 or ImageMagick for image analysis and transformations
  • ffmpeg v3.4 for video previews and ffprobe for video/audio analysis
  • poppler or muPDF for PDF previews

Check if in your environment has the requirements

CodePudding user response:

Thanks for the advice, I realized I haven't installed muPDF on my environment, the thing that worked for me was to install it from the home directory (outside my project) and that's it, now the preview is working perfectly fine.

https://ubuntuhandbook.org/index.php/2018/05/install-mupdf-1-3-0-ubuntu-18-04/

  • Related