To add a background picture in a Ruby on Rails application, you need to use CSS to set the background image in your application's stylesheets. Here's a step-by-step guide on how to do it:
Write the CSS to set the background image:
Open your stylesheet file (e.g., app/assets/stylesheets/application.scss) and add the following CSS code:
body {
background-image: url('background.jpg');
background-size: cover; /* This makes sure the image covers the entire background */
background-position: center center; /* This centers the image */
background-repeat: no-repeat; /* This prevents the image from repeating */
}