Reputation: 27
I'm following this tutorial, and from the moment it tells me to integrate bootstrap I'm lost. I don't know anything about bootstrap, so I can't really troubleshoot it. Nothing happens, the formatting continues to look like standard HTML without any css styling at all.
This is my application.css.scss file:
/*
*= require_self
*= require_tree .
*/
@import 'bootstrap';
This is my application.js file:
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require_tree .
this is my view file (home.html.haml):
.container
- if @tasks.empty?
%span.text-warning There are no tasks!
- else
%table.table.table-hover.table-bordered
%thead
%tr
%th Title
%th Created at
%th Completed
%tbody
- @tasks.each do |task|
%tr
%td
%strong= task.title
%td.text-info= task.created_at
%td.text-success= task.completed
I know this is really specific, but since I don't know anything about bootstrap I don't know what to focus on as the problem. I'm running Rails 4.0.4, and the bootstrap-sass gemfile is 2.3.2.0
Upvotes: 0
Views: 178
Reputation: 5611
I just created a test Rails 4.0.4 app, renamed the application.css
file to application.css.scss
and added your
@import 'bootstrap';
line. By the way, I switched to the most recent gem version:
gem 'bootstrap-sass', '~> 3.1.1.0'
And everything works fine.
Update your Gemfile
, run bundle update
, the restart the server and try again. It should work fine.
Upvotes: 1