selectize-bootstrap4-theme icon indicating copy to clipboard operation
selectize-bootstrap4-theme copied to clipboard

Error in Rails 5.1 assets pipeline

Open svergeylen opened this issue 7 years ago • 3 comments

I'm getting the following error in Rails 5.1 :

File to import not found or unreadable: node_modules/bootstrap/scss/functions.

The content of my css manifest is the following :

@import "selectize-bootstrap4-theme-master/scss/selectize.bootstrap4"

and bootstrap is actually available as a rails gem

bootstrap (4.1.3)
bootstrap-sass (3.3.7, 3.2.0.2)

What is the best option to make it working ?

  • Try to solve that error message ?
  • include the bootstrap-4 theme in selectize manually ? If so, which files should I copy to the selectize.js library to get the theme for bootstrap4 ?

svergeylen avatar Sep 17 '18 14:09 svergeylen

I will fix bootstrap import. Also you can use a copy of selectize-bootstrap4-theme/dist/css/selectize.bootstrap4.css as a temporary solution.

const-se avatar Sep 17 '18 15:09 const-se

Thank you for your very fast answer and good news that you'll fix it :-)

I tried to copy the bootstrap4 css file in the selectize main library and I imported it explicitely in my code, but I can't see any visual changes with or without it...

This is what I get with selectize libray and the copy of bootstrap4 css file :

screenshot_2018-09-18 vergeylen eu

As far as there is no difference without the css file, I guess I don't have it working for now

The import is done by the following line with Rails assets pipeline :

@import "selectize.js-master/dist/css/selectize.css"
@import "selectize.js-master/dist/css/selectize.bootstrap4.css"

(and the file is present at this location)

This is what I get by replacing 4 by 3 (i.e. bootstrap3 theme) : slight change :

screenshot_2018-09-18 vergeylen eu 1

svergeylen avatar Sep 18 '18 06:09 svergeylen

Had the same issue than @svergeylen , what worked for me is to use this file instead: https://github.com/selectize/selectize.js/blob/master/dist/css/selectize.bootstrap4.css

jdsampayo avatar Apr 05 '21 04:04 jdsampayo