D
D
dexdev2014-10-29 15:51:04
Ruby on Rails
dexdev, 2014-10-29 15:51:04

Why are some pictures not shown in production?

in the assets folder there are three .png pictures on localhost, everything is displayed fine, but on prodaction they are not displayed and that's it, but others are displayed correctly nginx writes 404 Not Found assets precompile c capistrano passes without errors, there are pictures in the folder on the server, but unicorn is not wants to display them, what could be the problem?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
dexdev, 2014-11-04
@AdilA

assets precompile changes the names of the images, image_tag knows why, and jquery needs to specify the new name of the image!

V
vsuhachev, 2014-10-29
@vsuhachev

To copy pictures to public when compiling assets in config/application.rb add:

config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)

V
Viktor Vsk, 2014-10-29
@viktorvsk

Depends on who distributes pictures and how the production is set up
Source

L
Lander, 2016-12-23
@NeTLeaDeR

Try using http_build_query to build $post.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question