3

Is there something else that needs to be referenced/configured when upgrading the bootstrap-sass gem to ~> 3.2.0?

Using RubyMine 6.3 as the editor and the following in the Gemfile:

ruby '2.1.2'  
gem 'rails', '4.1.1'  
gem 'sass-rails', '~> 4.0.3'  
gem 'bootstrap-sass', '3.1.1.1'  

app/assets/stylesheets/application.css.scss will be happy with

@import 'bootstrap';

However, once the bootstrap-sass gem is upgraded to its current version by changing the Gemfile reference to (and then running bundle update):

gem 'bootstrap-sass', '~> 3.2.0'  

RubyMine now has issues the @import 'bootstrap'; statement, saying "Cannot resolve import into sass/scss file".

The twbs/bootstrap-sass installation docs don't seem to infer that anything else is needed...

Karl
  • 33
  • 4
  • Is `@import "bootstrap-sprockets";` included in the manifest? Also restarting the server may solve this issue if you haven't done so already. Seems to be an issue with SCSS file, not the gem. – Dan Jul 24 '14 at 20:12
  • 1
    Thanks for the input @dayna. Server isn't running. Reopened the project though in case RubyMine was not triggering a 'rescan' after the `bundle update`. Issue occurs upon changing gem version from `3.1.1.1` to `~> 3.2.0`. – Karl Jul 24 '14 at 21:26
  • @Karl - I have the same issue in RM 6.3.3 and have no issues with bootstrap-sass 3.1.1.1. After a bit of digging, I learned that bootstrap-sass 3.2.0 moved the asset directory from vendor/assets to assets/. RM is not able to read/import the scss and js files from this location. I went back to 3.1.1.1 for now but did open a ticket with JetBrains in the hopes they can address the issue: http://youtrack.jetbrains.com/issue/RUBY-15585 – craig.kaminsky Jul 27 '14 at 16:12
  • Any word back on this? – ohhh Oct 19 '14 at 22:58

1 Answers1

1

Remove all the *= require_self and *= require_tree . statements from the sass file. Instead, use @import to import Sass files.

Do not use *= require in Sass or your other stylesheets will not be able to access the Bootstrap mixins or variables.