Hi Christoph,

I think this is related to the scss paths in your app.  I usually use our 
patternfly-react-demo-app as a good resource to making sure our paths are 
right.  You can see it here:  
https://github.com/patternfly/patternfly-react-demo-app 
<https://github.com/patternfly/patternfly-react-demo-app>.

Just a few things to point out - the sassIncludes in the package.json file 
specifically includes bootstrap-sass (    "bootstrap": "--include-path 
node_modules/bootstrap-sass/assets/stylesheets”,   ).  Depending on how you are 
compiling your sass, I’d make sure the bootstrap sass output is also in your 
path.

Our readme also has good information on making sure the sass paths resolve 
correctly:  
https://github.com/patternfly/patternfly/blob/master/README.md#using-webpack 
<https://github.com/patternfly/patternfly/blob/master/README.md#using-webpack>
Though this refers to webpack, the principle applies for other sass build 
tooling.



Thanks,
Dana Gutride


> On Dec 19, 2018, at 12:31 PM, Christoph Haas <[email protected]> wrote:
> 
> Dear list,
> 
> I would like to use PatternFly in a new Rails (5.2) project. The README of 
> https://github.com/patternfly/patternfly 
> <https://github.com/patternfly/patternfly> reads:
> 
> "Patternfly now supports Sass natively! Sass is included in the dist/sass 
> directory. Just add node_modules to your build tool's Sass include paths then 
> @import 'patternfly/dist/sass/patternfly'; in your Sass to get started!"
> 
> So far so good. My "node_modules" path is added to the assets lookup path. I 
> ran "npm install patternfly --save" and I renamed 
> app/assets/stylesheets/application.css to …/application.scss and added:
> 
>     @import 'patternfly/dist/sass/patternfly';
> 
> But I end up with this error message:
> 
>     File to import not found or unreadable: bootstrap/variables.
> 
> I am not using any fancy magic like Webpack here – just the built-in 
> sprockets asset management. I just want to load the CSS and JS the right way. 
> Has anyone managed to do that? Any hint is very appreciated because I have 
> been at it for hours.
> 
> Kind regards
>  Christoph
> 
> 
> 
> _______________________________________________
> PatternFly mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/patternfly

_______________________________________________
PatternFly mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/patternfly

Reply via email to