Topic: Rails and Css

Hello Everyone,

I new to Rails and don't even know if I'm posting in the right section, but hope I'm!

Here is the deal, my simple css, just to modify my background, don't load.

My environment:

created a controller called "main" just with a "def index end"

in my views/main/index.html.erb just a <h2> Hello World </h2>

in my assets/stylesheets/main.css.scss

body {

But when I load my page, there is no background on it (expected jungle.png)

Here is the source code that is shown on localhost:3000

<!DOCTYPE html>
  <title>.:Music Jungle!:.</title>
  <link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/main.css?body=1" media="all" rel="stylesheet" type="text/css" />
  <script src="/assets/jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
<script src="/assets/main.js?body=1" type="text/javascript"></script>
<script src="/assets/application.js?body=1" type="text/javascript"></script>
  <meta content="authenticity_token" name="csrf-param" />
<meta content="NQeaYVGxxIA33Fr1/KDT2DJZwQvNgJ/8PUOnHsYIVZE=" name="csrf-token" />

<link href="/assets/main.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<h2>jungle under construction!!</h2>


Anyone can help me on this one ?
Thanks in advance!

Last edited by Revokee (2013-05-09 00:28:23)

Re: Rails and Css

Check out the Rails Guide for the Asset Pipeline.