Search code examples
twitter-bootstrapsinatrasasscompass-sassbootstrap-sass

Compass doesn't recompile scss files on page load in Sinatra app


I've created a sinatra app and I want to include Twitter Bootstrap using the bootstrap-sass gem.

Following the installation instructions in the bootstrap-sass readme under Compass (no Rails). After running compass install bootstrap the files get created and everything works fine.

However, when I make a change to my scss file (in /views/sass/styles.scss) and reload the page, the css file isn't recompiled. Am I under the false assumption a page request recompiles the scss file? If so: how do I get compass to auto-compile the scss file? If not: what am I doing wrong?

See my github repo for the code.


Solution

  • It seems there was a bug in bootstrap-sass which was fixed in this commit.

    Until this fix is merged into a stable version the master branch should be used:

    # Gemfile
    gem 'bootstrap-sass', git: 'https://github.com/thomas-mcdonald/bootstrap-sass'
    

    Run the app using bundle exec ruby app.rb.