no route matches for assets/images in Rails

前端 未结 2 1835
逝去的感伤
逝去的感伤 2021-01-05 06:30

Working on rails, images are not visible and giving error.

Started GET \"/assets/home.png\" for 127.0.0.1 at 2012-06-19 12:23:24 +0530
Served asset /home.png         


        
2条回答
  •  死守一世寂寞
    2021-01-05 07:01

    The lack of a fingerprint in the file request suggests that you are running this in development. I am also going to guess that this is an app upgraded from an older version of Rails.

    Any images need to be in the folder /assets/images for the pipeline to work.

    Also, you do not need to precompile when in development mode.

    Delete the public/assets folder, delete the folder tmp/cache/assets, and restart your server.

    If this images are in the correct location, it should work.

提交回复
热议问题