twbs / bootstrap-sass

Official Sass port of Bootstrap 2 and 3.
http://getbootstrap.com/css/#sass
MIT License
12.58k stars 3.53k forks source link

File to import not found or unreadable: mixins/hide-text. #589

Closed FireWhale closed 10 years ago

FireWhale commented 10 years ago

I had this error when using

@import "bootstrap";

I think it's because bootstrap-sass-3.1.1.1 moved some mixin scss files into a mixin directory (vendor/assets/stylesheets/bootstrap/mixin/) and the import cannot find them correctly.

File to import not found or unreadable: mixins/hide-text. Load Paths: e:/Programming/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bootstrap-sass-3.1.1.1/vendor/assets/stylesheets

additional info: bootstrap-sass-3.1.1.0 works fine, but it does not have the mixin directory.

glebm commented 10 years ago

Which Rails?

glebm commented 10 years ago

If you are using Rails 3.2.x, please see the updated notes in Readme

FireWhale commented 10 years ago

Ah I see. Yes I am using rails 3.2.x

Thanks for clarifying this.

r007 commented 10 years ago

I have the same problem, but I use bootstrap-sass without rails (only middleman)

File to import not found or unreadable: mixins/hide-text.
Load paths:
  /media/ubuntu/697acfb6-f29d-4b6c-a95c-ae2d764dc47f/var/www/wordpress/wp-content/themes/refresh/source/stylesheets
  /var/lib/gems/1.9.1/gems/compass-core-1.0.0.alpha.21/stylesheets
  /var/lib/gems/1.9.1/gems/modular-scale-2.0.5/stylesheets
  /var/lib/gems/1.9.1/gems/omg-text-0.0.2/stylesheets
  /var/lib/gems/1.9.1/gems/sassy-maps-0.4.0/sass
  /var/lib/gems/1.9.1/gems/breakpoint-2.4.5/stylesheets
  /var/lib/gems/1.9.1/gems/compass-recipes-0.3.0/stylesheets
/var/lib/gems/1.9.1/gems/bootstrap-sass-3.2.0.0/assets/stylesheets/bootstrap/_mixins.scss:5
/var/lib/gems/1.9.1/gems/bootstrap-sass-3.2.0.0/assets/stylesheets/bootstrap.scss:3

What should I do?

LoveAndHappiness commented 9 years ago

Had the same error and got the following solution:

Just whenever you copy the necessary files from your bower_components through gulp in my case, make sure that all files are included like this:

gulp.task('copy-sass', function() { return gulp.src([ 'bowercomponents/bootstrap-sass/assets/stylesheets//_/*' ]) .pipe(gulp.dest('assets/sass')); });

Pay attention to the stars at the end.

tony13tv commented 7 years ago

For rails 3.2.x

# Ugly monkey patch for allowing importation of bootstrap in application sass file
initializer :bootstrap do |config|`
   Sass.load_paths << Gem.loaded_specs['bootstrap-sass'].full_gem_path + '/assets/stylesheets/bootstrap'
end