Adding Bootstrap CSS

21 views
Skip to first unread message

Glenn Sutherland

unread,
Jan 16, 2016, 3:54:38 PM1/16/16
to Ruby on Rails: Talk
I am working on The Ruby on Rails Tutorial on Linux Xubuntu, and everything is working until I add:

app/assets/stylesheets/custom.css.scss

@import "bootstrap-sprockets";
@import "bootstrap";

Then I get an error message: File to import not found or unreadable: bootstrap-sprockets.

If I remove the custom.css.scss file the error message goes away.

Tamara Temple

unread,
Jan 16, 2016, 9:00:04 PM1/16/16
to rubyonra...@googlegroups.com
I think Hartl might just be wrong. The README for `bootstrap-sass`
indicates these should be in
`app/assets/stylesheets/application.css.scss`, and you have to make some
other modifications to it as well.

See <https://github.com/twbs/bootstrap-sass#a-ruby-on-rails> where the
Gem describes how to install and configure it in the Rails application.

--
Tamara Temple
tam...@gmail.com
http://www.tamouse.org

Glenn Sutherland

unread,
Jan 17, 2016, 2:08:26 AM1/17/16
to Ruby on Rails: Talk
Thanks for your help Tamara, I went to the link and then I installed the bootstrap-sass gem. I was able to get it to work using the same file location
gem 'bootstrap-sass', '~> 3.3.6'

Thanks again,

Glenn Sutherland
Reply all
Reply to author
Forward
0 new messages