-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
couldn't find file 'bootstrap/glyphicons-halflings-regular.eot' error [bower] #592
Comments
You can use |
Yes indeed that is what I am doing currently. |
Same here. Seems like those files don't exist when using Bower. |
@clyfe There is an experimental pure-Sass Sprockets integration on master, which should make it possible to use bootstrap-sass with Middleman / Rails and Bower without using the gem Could you try it and let us know if it works? Thanks @import "bootstrap-sprockets"
@import "bootstrap" |
@glebm No luck using bootstrap-sprockets. Any updates on this issue? |
I was trying this out too, and with the example imports in a rails app here's the error I get:
I had to import the full path for the error to go away: @import "bootstrap-sass/vendor/assets/stylesheets/bootstrap-sprockets";
@import "bootstrap-sass/vendor/assets/stylesheets/bootstrap"; However the original issue still happens:
I'm trying to fiddle with the |
I'm also having the exact same issue. |
@ACPK @carlosantoniodasilva You can try setting |
@glebm in my environment (Rails 4.1.0.rc2) is almost ok.. In my bower.json:
In application.css.scss:
in application.js
However, it seems that only the file affix.js is loading, check it out: In addition, I'm not using the "middleman" and 'middleman-bower' gems, though. Do I've got to use them? |
Sprockets supports Bower, so you can add your Bower components path directly:
I noticed that changes to the font path variable are not being honoured regardless of where I change it. |
@roalcantara Do not |
Hi @glebm, thank you so much for your help. Well, I've changed the the imports: In application.css.scss:
And the error is back:
Btw, my application.rb:
Any other ideas? |
Hi @glebm, Seems to me that the problem is raised form here: _glyphicons.scss
I've try to change it to
but it doesn't work, though. Any ideas? |
Perhaps it will work with a relative path? |
It may work. However, I was trying not to modify the original bootstrap files. Do you happen to know if there is a way that I can override those paths without change the originals files? |
The basic issue is that bootstap-sass-official/vendor is not in Sass.load_paths. You can add it there and the problem should go away. However, if it just works with a relative path instead (../..), we can modify the code here. |
By the way, unfortunately, our tests don't fail even if I set |
Hi @glebm, Firstly, thank you so much for your help. Apparently, the Sprockets error was solved adding the /fonts to the assets.paths in application.rb:
However, after the deploy on Heroku, the file name still without the fingerprint, check it out: To try solve the problem, what about create the file
Thus, it would be possible adapt the application.css.scss to:
What do u think? If it works and you agree, can I send a pull request for this issue? :) |
Hi @glebm, Another thing that I had to change to bootstrap-sass-official works was:
Btw, my application.js is:
|
Hi @glebm, Another thing that I had to do in order to bootstrap-sass work properly via Bower in a Rails 4.1 was change the bower.json to
Without this adjust, only the affix.js had been loaded. What do you think? |
Unfortunately, this would only work with Sprockets / Mincer. There is no universal way to set Bower's |
I've changed |
Hi @glebm, first of all, thank you so much for your help. Now, I've made the checkout of this commit and the system has broken for 2 reasons: 1 - In order to the glyphicons work with Sprockets, apparently, the old path was correct.
It must be:
2 - Having the bower.json get back to the original, the Bootstrap's JavaScript stopped being loaded again, take a look: Have you got any suggestions of how should I be able to load all JavaScripts properly in my environment? This is my application.js:
Thank you so much for your help one more time. |
I've made changes so it should work now. The file _bootstrap-sprockets.scss as you suggest already exists, but has not been reported working yet. |
Hi @glebm, it's almost there. I've checked out the commit e2e7020 and the _bootstrap-sprockets.scss works perfectly. :) However, now I'm getting the following error:
It seems to me that instead of _depend_on_
It should be _depend_on_asset_:
Apart from this, apparently only the file affix.js is being loaded. Since we cannot change bower.js, do you have any ideas of what should I do in order to load the JavaScript files properly? Thank you so much for your time and consideration. |
Hi @glebm, Apparently the JS are loading properly. It seems to me that it was just a cache problem - my bad. =\ However, apparently, the file glyphicons.scss still must be changed from _depend_on to _depend_on_asset_ in order to Sprockets work properly. |
Hi @glebm, I've changed the dependency to bootstrap (instead of the bootstrap-sass): bower.json
and overrided the path for the fonts: application.scss:
and now everything is working properly. The only (minor) problem is that, apparently, the browser is requesting the old path and the new path: However, the fonts are shown properly in all browsers - and this is what's matters most. :) Anyway, thank you so much for your help. |
It should be From Sprockets documentation:
This is used for caching purposes. Any changes made to the dependency file with invalidate the cache of the source file.
This is used for caching purposes. Any changes that would invalidate the dependency asset will invalidate the source file. Unlike |
Released in v3.2.0 |
It seems that the issue is still present. I'm trying for first time bower-rails to use bootstrap-sas With Bowerfile:
application.css:
I got the couldn't find file 'bootstrap/glyphicons-halflings-regular.eot' error unless I specified the full path on _glyphicons.scss as
|
I solved it by adding the following to config.assets.paths << Rails.root.join("vendor","assets","bower_components","bootstrap-sass-official","assets","fonts") |
This reverts commit 2eb5faf. See rails/sass-rails#241
It appears our troubles have been resolved by Sprockets v2.1.4, which no longer needs |
I was running into this same issue today, and solved it by adding the following to my middleman
This reads my For reference, my SCSS file looks like this:
Maybe I'm wrong, but it seems weird that sprockets needs to know about both the bower directory and any specific font directories. Can someone explain why that's the case? |
@wkirby Unfortunately, relative path resolution in $icon-font-path: "bootstrap-sass-official/assets/fonts/bootstrap/";
@import "bootstrap-sass-official/assets/stylesheets/bootstrap-sprockets";
@import "bootstrap-sass-official/assets/stylesheets/bootstrap"; |
It doesn't work for me. I still see an error:
The only way it works for me is add the path to icons in application.rb:
|
$icon-font-path: "../fonts/bootstrap"; worked for me! |
Environment:
gem "middleman", "
> 3.1.0"> 1.0.2'gem 'middleman-bower', '
Steps to reproduce
In
application.css.scss
Error:
Note:
Not sure how the bower distribution of bootstrap-sass is meant to be used, it seems not not work out of the box. Let me know if I'm doing something wrong.
The text was updated successfully, but these errors were encountered: