Reputation: 45295
I would like to use PlusStrap framework into my Rails application. As I see it is a Bootstrap which was slightly customized.
I have included css-file in my layout:
<%= stylesheet_link_tag "plusstrap.min.css" %>
But when I look at this CSS file I have found such image refs:
background-image: url("../img/glyphicons-halflings.png");
I have created assets/img folder and put image file into it, but Rails cannot find this images. How can I fix it ?
Upvotes: 0
Views: 148
Reputation: 12550
If you don't want to modify the css file, you could put it in a folder like app/assets/stylesheets/plusstrap/plusstrap.min.css
and the images in app/assets/images/img/
so you'll call the css with:
<%= stylesheet_link_tag "plusstrap/plusstrap.min.css" %>
I know, it could be redundant, but is an effective way if you want to keep your css as the original.
Upvotes: 0
Reputation: 4315
The correct way to include anything , refferenced by CSS's url call is :
background-image: url("/images/yourpic.png")
The Rails framework handles it in a special way....
Upvotes: 1
Reputation: 120
Check your folder structure, is it really pointing to the image?. Check the documentation for relative paths in rails.
Upvotes: 0