I´m learning Ruby on Rails and tried to implement Twitter Bootstrap. I know how to use and edit it, as I used it before – just without rails.
Setup was done, as suggested here: http://ruby.railstutorial.org/chapters/filling-in-the-layout?version=3.2#sec-custom_css – As I read this book.
The following error occurs: File to import not found or unreadable: bootstrap.scss. while trying to import @import "bootstrap".
Here is my gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3-ruby'
gem 'bootstrap-sass', '~> 2.1.1.0'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
...
What do I wrong?
Thank you in advance!
Edit:
Do I have to install “Compass” aswell? When checking with gem server I find under “bootstrap-sass” bootstrap-sass 2.1.1.0 [rdoc] [www] - depends on compass, sass-rails.
I just followed the instruction in the link you provided and had no problem using bootstrap. I only did following steps:
1) edited the Gemfile so that the assets group would look like:
2) created the file
app/assets/stylesheets/custom.css.scssand placed the following line:3) generated a scaffold:
4) migrated the database:
5) fired up the server
6) visit the posts page
You can view the view the generated css:
where the bootstrap css is folded in.