rharriso / bower-rails

Bundler-like DSL + rake tasks for Bower on Rails
MIT License
1.46k stars 128 forks source link

additional css and js files not loading #186

Open igravious opened 8 years ago

igravious commented 8 years ago

Hi there,

I'm using bower-rails to include the bootstrap-material-design Bootstrap theme in my Rails project. This theme comes with 4 files, 2 css and 2 javascript.

The sprockets directives *= bootstrap-material-design for css and //= require bootstrap-material-design for js include the dist/css/bootstrap-material-design.css css file and dist/js/material.js no problem. But... the dist/css/ripples.css and dist/js/ripples.js do not get included and I have tried every sort of permutation to get them included. (These 4 files are in the default bower.json file so I presume this is where Sprockets / Bower-Rails is doing its magic? -- if not how does Rails load material.js when I //=require bootstrap-material-design? Seriously perplexed by this …)

What do I have to do? Is this a bug with bower-rails or am I “Holding It Wrong”™ ?

All the best from Ireland... :8ball:

eomuraliev commented 8 years ago

Same problem with angular-strap. It includes dist/angular-strap.js but not dist/angular-strap.tpl.js from bower.json's main

DavidCorrea commented 8 years ago

I got to make it work with the following workaround:

In the application.js

//= require angular-strap/dist/angular-strap
//= require angular-strap/dist/angular-strap.tpl.js

Declaring the requires this way is kind of awful, but it worked for me. Would be nice to see where the issue is that it is not including all the files declared in the bower.json's main of the component.

Hope it helps, cheers!