Serving images via CSS in Rails
Ruby on Rails is versatile enough to help you access and service image from your css files. It relies on Rails Asset Pipeline helpers.
You can reference your images within CSS files via two helpers
1. image-url("my-image.jpg")
2. image-path("my-image.jpg")
Both of these helpers will convert your image reference path to /assets/my-image.jpg. There is also generic way of accessing images or other file types in Rails.
3. asset-url("my-image.jpg")
4. asset-path("my-image.jpg")
All four ways of accessing images from within CSS file are acceptable in Rails 4 application.
Finally, here is full CSS set up for your example
background-image: image-url("my-background-image.jpg")