rharriso / bower-rails

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

how use it in test environment ? #108

Open wafcio opened 10 years ago

wafcio commented 10 years ago

I am usign bootstrap which have additional font, which work fine in development because relative path looks like

/assets/bootstrap/less/bootstrap.css

unfortunatelly in test environment assets are compiled to one file

/assets/application.css

but relative url is still the same, so url to font is now

/font/glyphicon....

which is incorrect, so is there any way to fix it ?

SergeyKishenin commented 10 years ago

Have you tried to run RAILS_ENV=test rake bower:resolve? It may help you.

Actually we have some problems with fonts and its relative urls #66, #83. Possible fix is in #85, now waiting for some fixes in bowerify gem.

wafcio commented 10 years ago

yes i had tried it, but after that i found solution, for test environment, but i don't know if it will be work in precompile assets.

My solution based on write path to css/sass/less file instead of bower package name in application.css. This solution is little freak so please don't close this issue, after bower-rails can be used without extra settings.