0
votes

I am trying to create a new rails app using sass-bootstrap, because I couldn't install therubyracer gem on windows to use the less twitter bootstrap.

I have included and successfully downloaded gem 'sass-rails' and gem 'bootstrap-sass'

in my gemfile, and my application.css file starts with @import 'bootstrap';

(is that different than the application.css.scss file the documentation says to put it in?).

I also have "//= require bootstrap" in my application.js file, but the fonts and styling to still not show on the page I created.

I am trying to follow along with this railscast tutorial, where he adds the bootstrap gem and the "products page" changes fonts immediately, but nothing has changed, and my page still displays as plain html. I can't run "rails g bootstrap:install", because that is not provided in the sass-bootstrap. What can I do that will get the same result? Thanks for the help

1

1 Answers

0
votes

Have you tried renaming your application.css to application.css.scss?

If that doesn't help, have a look at chapter 5 in the Michael Hartl Rails Tutorial. This is using sass so should work fine on windows. Note that this is using bootstrap-sass (not sass-bootstrap as you did, so there might be some slight differences), and that some of the setup in the earlier tutorial chapters might be relevant to make it look the same. However I used that information to get bootstrap into a small test project.

As a side-note, if you are just starting out with Rails and you are on Windows (like me), consider using a Linux VM (e.g. Ubuntu in Virtual Box with Vagrant) to run rails. Almost every single tutorial out there is assuming you are on MacOS or Linux, and the majority of users is as well, and it is easy to lose time on issues just because things have never been tested or supported on Windows... The time I invested to set this up has been a good investment on my learning journey so far.