Rails 5 en heroku olvida los archivos almacenados con clip y turbolinks: no hay coincidencias de ruta

Tengo un blog con carga / descarga de archivos a través de paperclip 5.1.0 y turbolinks 5.0.1. Cargar sin validación funciona bien ahora, pero la descarga solo funciona durante un breve período después de la carga. Luego se muestra un error (404):

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

If you are the application owner check the logs for more information.

Esto no ayudó:

heroku rake db:migrate
heroku restart

Estoy en producción con mysql DB en heroku. Cuando no estoy implementando a través de heroku: ¡entonces la copia local funciona bien con ruby versión 2.2.4!

Nuevo despliegue en heroku congit push heroku master no corrige los enlaces adjuntos.

Solo la eliminación manual de archivos DB y la nueva carga hacen que los enlaces adjuntos vuelvan a funcionar por un corto período de tiempo.

P. S. Cuando se reinicia el dinamómetro, e. sol. conheroku restart, el sistema de archivos es nuevo y eliminado. Pero no sé, ¡cómo hacer que el sistema de archivos sea persistente con redis o amazon aws s3!

El registro dice:

2017-01-31T12: 21: 03.027810 + 00: 00 heroku [enrutador]: at = método de información = GET ruta = "/ system / articles / adjuntos / 000/000/015 / original / gmr-1.8.3.jar" host = infinite-taiga-25466.herokuapp.com request_id = fb775bcc-64f4-4d6b-89c0-70991af31e2f fwd = "178.15.12.47" dyno = web.1 connect = 0ms service = 2ms status = 404 bytes = 1744 2017-01- 31T12: 21: 03.026812 + 00: 00 aplicación [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] Comenzó GET "/system/articles/attachments/000/000/015/original/gmr-1.8.3 .jar "para 178.15.12.47 en 2017-01-31 12:21:03 +0000 2017-01-31T12: 21: 03.027262 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f ] 2017-01-31T12: 21: 03.027284 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] ActionController :: RoutingError (No hay coincidencias de ruta [GET] "/ system / articles / adjuntos /000/000/015/original/gmr-1.8.3.jar "): 2017-01-31T12: 21: 03.027302 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] 2017-01-31T12: 21: 03.027334 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] proveedor / paquete / ruby / 2.2.0 / gems / actionpack-5.0.1 / lib / action_dispatch / middleware / debug_exceptions.rb: 53: encall' 2017-01-31T12:21:03.027336+00:00 app[web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/show_exceptions.rb:31:inllame al '2017-01-31T12: 21: 03.027337 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] proveedor / paquete / ruby / 2.2.0 / gems / railties-5.0.1 /lib/rails/rack/logger.rb:36:incall_app' 2017-01-31T12:21:03.027338+00:00 app[web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/rack/logger.rb:,24:inbloquear en llamada '2017-01-31T12: 21: 03.027339 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor / bundle / ruby / 2.2.0 / gems / activesupport-5.0 .1 / lib / active_support / tagged_logging.rb: 26: entagged' 2017-01-31T12:21:03.027338+00:00 app[web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:69:inbloque en etiquetado '2017-01-31T12: 21: 03.027340 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] proveedor / paquete / ruby / 2.2.0 / gems / activesupport-5.0 .1 / lib / active_support / tagged_logging.rb: 69: entagged' 2017-01-31T12:21:03.027341+00:00 app[web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/rack/logger.rb:24:inllame al '2017-01-31T12: 21: 03.027341 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] proveedor / paquete / ruby / 2.2.0 / gems / actionpack-5.0.1 /lib/action_dispatch/middleware/request_id.rb:24:incall' 2017-01-31T12:21:03.027342+00:00 app[web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/method_override.rb:22:inllame al '2017-01-31T12: 21: 03.027343 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] proveedor / paquete / ruby / 2.2.0 / gems / rack-2.0.1 /lib/rack/runtime.rb:22:incall' 2017-01-31T12:21:03.027344+00:00 app[web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:inllame al '2017-01-31T12: 21: 03.027345 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] proveedor / paquete / ruby / 2.2.0 / gems / actionpack-5.0.1 /lib/action_dispatch/middleware/executor.rb:12:incall' 2017-01-31T12:21:03.027346+00:00 app[web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/static.rb:136:inllame al '2017-01-31T12: 21: 03.027346 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] proveedor / paquete / ruby / 2.2.0 / gems / rack-2.0.1 /lib/rack/sendfile.rb:111:incall' 2017-01-31T12:21:03.027347+00:00 app[web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/engine.rb:522:inllame al '2017-01-31T12: 21: 03.027349 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] proveedor / paquete / ruby / 2.2.0 / gems / puma-3.7.0 /lib/puma/server.rb:578:inhandle_request' 2017-01-31T12:21:03.027349+00:00 app[web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor/bundle/ruby/2.2.0/gems/puma-3.7.0/lib/puma/server.rb:415:inprocess_client '2017-01-31T12: 21: 03.027350 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] proveedor / paquete / ruby / 2.2.0 / gems / puma-3.7.0 /lib/puma/server.rb:275:inblock in run' 2017-01-31T12:21:03.027351+00:00 app[web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor/bundle/ruby/2.2.0/gems/puma-3.7.0/lib/puma/thread_pool.rb:120:inllame al '2017-01-31T12: 21: 03.027352 + 00: 00 app [web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] proveedor / paquete / ruby / 2.2.0 / gems / puma-3.7.0 /lib/puma/thread_pool.rb:120:inblock in spawn_thread' 2017-01-31T12:21:03.027348+00:00 app[web.1]: [fb775bcc-64f4-4d6b-89c0-70991af31e2f] vendor/bundle/ruby/2.2.0/gems/puma-3.7.0/lib/puma/configuration.rb:226:inllamada'

C: \ Sitios \ blog_production_heroku>

Respuestas a la pregunta(2)

Su respuesta a la pregunta