html - rails I have a background image in development environment this show but not in production -


css/html code snippets

in localhost can see in production environment, not loading.

i tried many forms haven't had results.

thank you,

jhonny

you give code image, cant modify it. give idea.

for css,

first add .scss extension filename. file name should this,

filename.css.scss 

now, if place image in app/assets/images folder can access this,

background: url(asset-path("image.jpg")); 

for html,

make sure html file has .erb extension it. can refer small ruby block (assuming image in app/assets/images folder).

<%= asset_path "image.png" %> 

fot more info, can read asset pipeline.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo