Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActiveStorage::UnpreviewableError

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.

like image 421
Julio Cesar Gonzalez Ortega Avatar asked Apr 09 '26 23:04

Julio Cesar Gonzalez Ortega


1 Answers

In activestorage documentation says about requirements to use this feature.

  • libvips v8.6+ (libvips package) or ImageMagick for image analysis and transformations
  • ffmpeg v3.4+ for video previews and ffprobe for video/audio analysis
  • poppler (i.e. poppler-utils package) or muPDF for PDF previews

Check if in your environment has the requirements

like image 57
HorecioDias Avatar answered Apr 13 '26 08:04

HorecioDias