Hello, I''m trying to set the background of a page to an image I have in the assets/images folder in my rails app. However, for the life of me I cannot get it to work. When I open up and inspect the element I keep seeing in the resources that the file cannot be found with a red "!" next to the image. I have tried different paths still no avail... ../images.bg.png ./images.bg.png assets/images.bg.png In my static_pages.css.scss I have body { background: url(/images/bg.png); } -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/VBm3m_s8XK8J. For more options, visit https://groups.google.com/groups/opt_out.
Figured it out! Simply added background: url(bg.png); -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/aG6BwZe0I_UJ. For more options, visit https://groups.google.com/groups/opt_out.
If you prefer use scss with assets pipeline its better use following sintax: background: image-url(bg.png); More about it you can read in RG: http://guides.rubyonrails.org/asset_pipeline.html 2.2.2 CSS and Sass -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/IL6NwbJ7HBkJ. For more options, visit https://groups.google.com/groups/opt_out.