My rails stylesheets are not loading/working

in your application.css, try adding 
    *= require main
    *= require_self

hope this helps

Looks like the only way I can get it to work is by adding @import main; to application.scss. It seems like the styles end up being used on every page (is this the default in rails?).

This is not my ideal solution but it's the only thing I've been able to do to get any styles to work via requiring methods.


I could not get the above answers to work but I think I found an easy work-around that makes Rails act the way expected.

In your HEAD section add

<%= stylesheet_link_tag    params["controller"], media: 'screen' %>

And now css/SASS/Scss files in app/assets/stylesheets/ will load.

Sadly, you'll still need to precomile things. Grr.


 /*
 *= require_tree .
 *= require_self
 */

Add the above to your application.scss or application.css.scss file