html - Twitter bootstrap sass not working on some pages -
i've installed bootstrap-sass gem , finding css works on pages , not others, not sure why is.below i've included views in it's not working, gemfile , stylesheets.
gemfile:- source 'https://rubygems.org'
gem 'rails', '3.2.13' gem 'pg', '~> 0.15.1' gem "bcrypt-ruby", '~> 3.0.1' gem "paperclip", '~> 3.4.2' gem "will_paginate", '~> 3.0.4' gem "friendly_id", '~> 4.0.9' gem 'stripe' group :assets gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'bootstrap-sass', '~> 2.3.2' end group :test gem 'rspec-rails', '2.13.2' gem 'factory_girl_rails', '~> 4.2.1' gem 'capybara', '~> 2.1' gem 'launchy', '~> 2.3' gem 'guard-rspec', '~> 3.0.1' gem 'shoulda-matchers', '~> 2.1' gem 'webmock' end group :development gem 'annotate', ">=2.5.0" end group :test, :development gem 'database_cleaner' gem 'rspec-rails', '2.13.2' gem 'guard-rspec', '~> 3.0.1' gem 'rb-fsevent', :require => false if ruby_platform =~ /darwin/i gem 'fuubar', '~> 1.1.1' gem 'uglifier', '>= 1.0.3' end gem 'jquery-rails', '~> 3.0.1' application.css.scss:-
*= require_self *= require_tree . */ @import "bootstrap"; baskets.html.erb
<p><%= notice %></p> <p><%= @basket_items.product_totals %><p> <%= button_to "purchase products", new_payment_path, :class => "btn" %> <table class="table table-hover"> <tr> <th>picture</th> <th>name</th> <th>price</th> <th></th> </tr> <tr> <% @basket_items.each |item| %> <td><p>nothingness</p></td> <td><p><%= item.product.name %></p></td> <td><p><%= item.product.price %></p></td> <td><%= button_to 'remove', basket_item_path(item.id), :method => 'delete', :confirm => 'are sure?', :class => "btn" %></td> <% end %> </tr> </table> categories show show.html.erb
<button type="button" class="close" data-dismiss="alert">×</button> <p><%= flash[:notice] %></p> <div class="search"> <%= form_tag(search_path, method: "get", :class => "form-search") %> <%= text_field_tag(:query, nil, :class => "input-medium search-query") %> <%= submit_tag("search", :class => "btn") %> <% end %> </div> <div class="container-fluid"> <div class="row-fluid"> <% @cp.each |p| %> <div class="product"> <div class="product-image"> <%= image_tag p.image %> </div> <p><%= p.price %></p> <p><%= link_to p.name, product_path(p.slug) %></p> <% end %> </div> </div> </div> categories.css.scss
.product { display: inline-block; } .product-image { width: 40px; height: 50px; } .row-fluid { margin-top: 300px; } .search { margin: 100px 10px 0px 0px; }
it if more specific "not working", if assets aren't loading correctly or older versions of assets showing instead, there chance forgot precompile assets.
try running bundle exec rake assets:precompile, reload page.
Comments
Post a Comment