Rails image broken link

前端 未结 2 1739
不知归路
不知归路 2021-01-23 20:36

I\'m trying to link to an image in rails and its not working. I can link to assets/file.css as well as assets/file.js but assets/file.jpg doesnt work.

I tried a fresh ra

2条回答
  •  囚心锁ツ
    2021-01-23 20:56

    I just checked my code and my CSS looks like this:

    background-image:url(/assets/pinstripes.jpg);
    

    with the image uploaded to app/assets/images, of course. This looks like what you're using, but I can't tell for sure.

提交回复
热议问题