I have always been in trouble with my assets pipeline, even after reading http://guides.rubyonrails.org/asset_pipeline.html I still run into trouble.
My css doesn't render when I load my page in development, it looks like the css is not taken into account, because if i put this css into <script></script>
in the header of my page home.html.erb it works perfectly.
I have this stylesheet in app/assets/stylesheets/bootstrap.css.scss
bootstrap.css.scss
/* BOOSTRAP CSS */
/* /BOOSTRAP CSS */
.form-group {
width: 250px;
font-size: 10px;
opacity: 1;
}
.panel {
width:300px;
margin-left: auto;
margin-right: auto;
opacity: 0.8;
z-index: 10000;
}
.btn-default {
border: 1px solid #28c3ab;
color: #1abc9c;
background-color: #f1c40f;
}
.jumbotron {
background-color:#ecf0f1;
color:#1abc9c;
}
.btn-default {
color: #1abc9c;
background-color: #f1c40f;
}
.btn-default:hover,
.btn-default:focus {
border: 1px solid #28c3ab;
outline: 0;
color: #1abc9c;
background-color: #3498db;
}
.btn-primary {
border: 1px solid #28c3ab;
color: #f1c40f;
background-color: #1abc9c;
}
.btn-primary:hover,
.btn-default:focus {
border: 1px solid #28c3ab;
outline: 0;
color: #f1c40f;
background-color: #3498db;
}
Here is my application.css in app/assets/stylesheets/application.css
/*
* This is a manifest file that'll be compiled into **application.css**, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require 'masonry/transitions'
*= require_tree
*= require font-awesome
*= require bootstrap
*= require magnific-popup
*/
I am not sure about what's going wrong, I tried to precompile the assets, still not working, what could I be missing?
I have the link to my stylesheets in my layouts, app/views/layouts/application.html.erb
<%= stylesheet_link_tag "application", media: "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>