Problem creating a symlink in a Rails shared folder

In my Rails application, I want to create a symbolic link in public/ that links to another folder. I can create a symbolic link and navigate through it, but I cannot get Rails to display images from it. Is there a trick? Is it possible?

I have a folder with thousands of PNGs that I don’t want to just go into the asset pipeline. They rarely, if ever, change, so the pipeline is largely unnecessary. Thoughts?

 lrwxr-xr-x 1 meltemi staff pages -> /Volumes/BigDisk/pages_root 

but when I try to click localhost:3000/pages/F-C2E-439_00002_1.png , I get:

 Routing Error No route matches [GET] "/pages/F-C2E-439_00002_1.png" 
+4
source share

Source: https://habr.com/ru/post/1435389/


All Articles