Div background image not showing in heroku. However, the logo shows

I tried changing the image tag, no luck with that. I reviewed other post
here and tried those solutions none work. I also use amazon cloudfront.

signup{
text-align: center;
background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.4)),
url(“zoom1028.jpg”);
}

On Friday, January 8, 2016 at 4:15:15 AM UTC, Ruby-Forum.com User wrote:

I tried changing the image tag, no luck with that. I reviewed other post
here and tried those solutions none work. I also use amazon cloudfront.

Assuming your image is in app/assets/images, read up on the asset
pipeline

  • the url for your image isn’t zoom1028.jpg in production, as rails will
    be
    adding a fingerprint to the filename. If you don’t want to deal with the
    asset pipeline you can also add it to public/. In the first instances I
    would get everything working without bringing cloudfron into the mix.

Fred

according to your code sample the image would have to be in the same
directory of the page.

  • home dir
    |- index.html
    |-zoom1028.jpg

On Thursday, January 7, 2016 at 10:15:15 PM UTC-6, Ruby-Forum.com User

posted too soon
If zoom1028.jpg is in the images folder then you need

url("/images/zoom1028.jpg");

the leading slash mean root of the site

or even for absolute URL

url(“https://c1.staticflickr.com/3/2807/12125940804_ebdbda0bc9_b.jpg”);

Found solution everything is working now. I discovered Cloudfront did
not play a role in the error in this matter. When I disabled and enabled
it there was no change affect on the problem. How, it worked perfectly
once is used the solution below fix the issue.

The image was pointing to path.I used sass Image specific helper:
background-image:image-url(“photo.jpg”) and it worked. According to sass
instructions
here https://github.com/rails/sass-rails.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs