fortawesome / font-awesome-sass Goto Github PK
View Code? Open in Web Editor NEWFont-Awesome Sass gem for use in Ruby/Rails projects
License: MIT License
Font-Awesome Sass gem for use in Ruby/Rails projects
License: MIT License
Is there a reason why version 4.0.2 was "yanked" from rubygems.org?
Can you change the calls in _path.scss to use asset-url
instead of font-url
? The latter doesn't seem to work when I have my application deployed under a sub-URI, but the prior does.
I'm using the v 4.2.2 of this gem, and something weird is happening.
All the icons are placed by signs like � or �
I am using the gem in another project, at the same version, and it works fine.
I've taken a quick look, and the _icons.scss file seems to be "corrupted" by those signs. I've tried to uninstall and re-install the gem, but it didn't change anything.
Everything apply perfectly (like the fa-3x class for example), but the icons are just replaced.
Have you any idea what might have caused this ?
I join a screenshot, those icons are supposed to be the envelope and the bell-o icons.
In my styles.scss :
@import "font-awesome-compass";
@import "font-awesome";
error project/assets/sass/style.scss (C:/Ruby21/lib/ruby/gems/2.1.0/gems/compass-core-1.0.1/lib/compass/core/sass_extensions/functions/urls.rb:291:in `initialize': Is a directory @ rb_sysopen - C:/project/assets/fonts/)
Then when invert in styles.scss :
@import "font-awesome";
@import "font-awesome-compass";
error disappear...
I have upgraded the gem from version 4.2.2 to the version 4.3.0 and I'm facing this error now:
/usr/local/lib/ruby/gems/2.2.0/gems/font-awesome-sass-4.3.0/lib/font-awesome-sass.rb:57:in `register_compass_extension': uninitialized constant FontAwesome::Sass::VERSION (NameError)
from /usr/local/lib/ruby/gems/2.2.0/gems/font-awesome-sass-4.3.0/lib/font-awesome-sass.rb:5:in `load!'
from /usr/local/lib/ruby/gems/2.2.0/gems/font-awesome-sass-4.3.0/lib/font-awesome-sass.rb:79:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:76:in `require'
from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:72:in `each'
from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:61:in `each'
from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:61:in `require'
from /usr/loc
from /application/spec/rails_helper.rb:4:in `require'
from /application/spec/rails_helper.rb:4:in `<top (required)>'
from /application/spec/controllers/admin/schools_controller_spec.rb:1:in `require'
from /application/spec/controllers/admin/schools_controller_spec.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1226:in `load'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in `each'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:97:in `setup'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:85:in `run'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:70:in `run'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:38:in `invoke'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.0/exe/rspec:4:in `<top (required)>'
from /usr/local/bin/rspec:23:in `load'
from /usr/local/bin/rspec:23:in `<main>'
4.2.2 -> 4.3.0 is not a backwards-compatible upgrade, e.g. #73. May I suggest considering adopting semantic versioning for future releases?
I've submitted PR #78 to address this issue, but using CSS-style comments (i.e., /* Some comment */
) breaks compressed output as set by config.rb.
Let me know if I can clarify anything here, but this is a simple enough fix. Thanks!
Hi there!
What do you think about using Sass maps for storing FA settings?
Sass map object will be looking something like this:
$fa-settings: (
font-name: "fontawesome-webfont",
css-prefix: "fa",
icons-map: (
adjust: "\f042",
adn: "\f170"
)
) !default;
and with the map we can generate styles for each icon in a few lines of code:
@each $icon-name, $icon-code in map-get($fa-settings, icons-map) {
.#{map-get($fa-settings, css-prefix)}-#{$icon-name}::before {
content: $icon-code;
}
}
It's awesome, isn't it? 😎
Hi,
Gem dependencies are incompatible between Middleman and font-awesome-sass:
Here's the output:
Bundler could not find compatible versions for gem "rack":
In Gemfile:
font-awesome-sass (~> 4.0.1) ruby depends on
rack (~> 1.4.5) ruby
middleman-livereload (~> 3.1.0) ruby depends on
rack (1.5.2)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
font-awesome-sass (~> 4.0.1) ruby depends on
activesupport (= 3.1.0) ruby
middleman (~> 3.2.0) ruby depends on
activesupport (3.2.15)
Bundler could not find compatible versions for gem "sprockets":
In Gemfile:
font-awesome-sass (~> 4.0.1) ruby depends on
sprockets (~> 2.0.0) ruby
middleman (~> 3.2.0) ruby depends on
sprockets (2.10.0)
It's not a no go for Font Awesome anyway, but that woud be cool.
Regards
Hi,
Rails 4.1.4 app running on Passenger/ apache in sub-URI /svt
. Using font-awesome-sass gem in development env works as expected, but after deploying to production enviroment FA fonts do not show up. Apache access log gives possible explanation of the issue:
10.42.48.23 - - [12/Aug/2014:19:41:55 +0200] "GET /svt/production_lines/1 HTTP/1.1" 200 10906 "http://webapps/svt/production_lines" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"
10.42.48.23 - - [12/Aug/2014:19:41:56 +0200] "GET /svt/assets/vendor/modernizr-390c3ba023eee60e63844f663c6ab0c1.js HTTP/1.1" 200 11084 "http://webapps/svt/production_lines/1" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"
10.42.48.23 - - [12/Aug/2014:19:41:56 +0200] "GET /svt/assets/application-a6a75ba39ebd44418ebaaccada0d169a.css HTTP/1.1" 200 148051 "http://webapps/svt/production_lines/1" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"
10.42.48.23 - - [12/Aug/2014:19:41:56 +0200] "GET /svt/assets/application-072034d42842308dc466b38fadbfebb9.js HTTP/1.1" 200 196950 "http://webapps/svt/production_lines/1" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"
10.42.48.23 - - [12/Aug/2014:19:41:57 +0200] "GET /assets/fontawesome-webfont-193779f97a012b987d59a85827509b89.eot? HTTP/1.1" 404 1351 "http://webapps/svt/production_lines/1" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"
10.42.48.23 - - [12/Aug/2014:19:41:57 +0200] "GET /assets/fontawesome-webfont-8256e2389e155e0b32d94d9afacdf5e6.woff?v=4.1.0 HTTP/1.1" 404 1351 "http://webapps/svt/production_lines/1" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"
10.42.48.23 - - [12/Aug/2014:19:41:57 +0200] "GET /assets/fontawesome-webfont-b3884e8c99f97377e242bc01a2aebfd6.ttf?v=4.1.0 HTTP/1.1" 404 1351 "http://webapps/svt/production_lines/1" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"
As you see, font files are 404s because are looked up in root directory of the server, while they should be referenced with subdirectory, like stylesheets files.
For the reference, public/assets/ directory contains font files, generated with sprockets bundle exec rake assets:precompile RAILS_ENV=production
https://gist.github.com/ericam/1607696
fix it for master branch
Hi, Thank you for building and maintaining this wonderful project. Are you planning to support Sass 3.3 anytime soon? Thanks again
Is it possible to use font-awesome-sass in a Compass project, without Rails?
Is it possible to use in a Ruby/SASS project without Compass or Rails?
If so, can this be documented somewhere?
Right now with the helper icon
you can do
button type="button" class="btn btn-default"
= icon('arrow-right', 'Login') # <i class="fa fa-arrow-right"></i> Login
It would be nice if there was a way to specify the icon on the right hand side.
button type="button" class="btn btn-default"
= icon('arrow-right', 'Login', rtl: true) # Login <i class="fa fa-arrow-right"></i>
This gem appends ?v=#{$fa-version}
onto the font filenames which is great unless you have CDN (and CORS) issues and you want to invalidate your font files.
Normally this would be accomplished by bumping config.assets.version
but it doesn't work for font files because of the query string.
If asset pipeline digest is enabled font references should use the digest instead of "?v=#{$fa-version}"
I will admit I am not quite sure what to do about the references with ?#iefix
because the query string prevents the digest from being used.
I think I've installed this gem correctly and I should also mention that I'm not sure if this issue is related to this gem or the browser.
After installing this gem version: 4.1.0
and adding the following lines of code in one of my scss
files:
app/assets/stylesheets/variables.css.scss
$baseFontFamily: 'FontAwesome';
@import "bootstrap/variables";
...
app/assets/stylesheets/application.css.scss
*= require_tree *
@import 'font-awesome';
I can see the fonts successfully rendered in Chromium based browsers but not on Firefox. I haven't tested other browsers.
My Rails version is: 3.2.19
. I'd be glad to provide any further information if you needed. Also, searching for the issue yields answers related to CDN, but I am not using CDN.
Take a look at https://github.com/ai/jquery-cdn. What you think about such improvement?
I'm having an issue using the latest 4.3.1 gem.
I previously had 4.2.2 with rails.
I've updated my Gemfile and 4.3.1 is installed.
And I check the lock file it only has 4.3.1 in there.
However my Rails app is still loading the 4.2.2 version.
Any one know why this would happen?
It's doing it in dev and production.
Hello, can you add this repo to bower registry?
Hi,
in the latest version of font-awesome the rotated & flipped styles are broken.
http://fortawesome.github.io/Font-Awesome/examples/#rotated-flipped
Only the "normal" example is shown.
Unfortunately this has made its way into this awesome gem.
Cheers
//Edit: I forgot to mention that it's a problem in the latest Chrome Canary only
I can't get font awesome to install with compass. following the directories doesn't create any files. I have tried bundle exec compass install font-awesome -r font-awesome-sass,
but it just creates css files. Thanks for any help
If anyone could help with this it would be appreciated. I simply installed the gem and followed the instructions however Sass (using compass) is now throwing a wobbly!
SyntaxError on line 36 of /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: /usr/lib/ruby/gems/1.8/gems/font-awesome-sass-4.2.2/lib/font-awesome-sass.rb:47: syntax error, unexpected ':', expecting ')'
path: gem_path,
^
/usr/lib/ruby/gems/1.8/gems/font-awesome-sass-4.2.2/lib/font-awesome-sass.rb:48: syntax error, unexpected ':', expecting '='
stylesheets_directory: stylesheets_path,
^
/usr/lib/ruby/gems/1.8/gems/font-awesome-sass-4.2.2/lib/font-awesome-sass.rb:49: syntax error, unexpected ':', expecting '='
templates_directory: File.join(gem_path, 'templates')
^
/usr/lib/ruby/gems/1.8/gems/font-awesome-sass-4.2.2/lib/font-awesome-sass.rb:50: syntax error, unexpected ')', expecting kEND
/usr/lib/ruby/gems/1.8/gems/font-awesome-sass-4.2.2/lib/font-awesome-sass.rb:62: syntax error, unexpected $end, expecting kEND
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in require' /usr/lib/ruby/gems/1.8/gems/compass-core-1.0.3/lib/compass/configuration/data.rb:179:in
require'
/var/www/html/design/config.rb:2:in get_binding' /usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/configuration/serialization.rb:20:in
get_binding'
/usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/configuration/serialization.rb:23:in parse_string' /usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/configuration/serialization.rb:15:in
_parse'
/usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/configuration/serialization.rb:14:in open' /usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/configuration/serialization.rb:14:in
_parse'
/usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/configuration/file_data.rb:7:in new_from_file' /usr/lib/ruby/gems/1.8/gems/compass-core-1.0.3/lib/compass/configuration/inheritance.rb:207:in
with_defaults'
/usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/configuration/file_data.rb:6:in new_from_file' /usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/configuration/helpers.rb:19:in
configuration_for'
/usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/configuration/helpers.rb:69:in add_project_configuration' /usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/commands/project_base.rb:37:in
add_project_configuration'
/usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/commands/project_base.rb:25:in configure!' /usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/commands/project_base.rb:15:in
initialize'
/usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/commands/update_project.rb:41:in initialize' /usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/exec/sub_command_ui.rb:42:in
new'
/usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/exec/sub_command_ui.rb:42:in perform!' /usr/lib/ruby/gems/1.8/gems/compass-1.0.3/lib/compass/exec/sub_command_ui.rb:15:in
run!'
/usr/lib/ruby/gems/1.8/gems/compass-1.0.3/bin/compass:30
/usr/lib/ruby/gems/1.8/gems/compass-1.0.3/bin/compass:44:in call' /usr/lib/ruby/gems/1.8/gems/compass-1.0.3/bin/compass:44 /usr/bin/compass:19:in
load'
/usr/bin/compass:19
I've just updated to font-awesome-sass 4.2.1 from 4.2.0 and now get:
/Users/ben/.rvm/rubies/ruby-2.1.2/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/ben/dev/rails/dbc/script/rails server -b 0.0.0.0 -p 3000 -e development
=> Booting Thin
=> Rails 3.2.19 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/ben/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/railtie/configuration.rb:85:in method_missing': undefined method
assets' for #Rails::Engine::Configuration:0x000001075ffc28 (NoMethodError)
from /Users/ben/.rvm/gems/ruby-2.1.2/gems/font-awesome-sass-4.2.1/lib/font_awesome/sass/rails/engine.rb:10:in block in <class:Engine>' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/initializable.rb:30:in
instance_exec'
from /Users/ben/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/initializable.rb:30:in run' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/initializable.rb:55:in
block in run_initializers'
from /Users/ben/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/initializable.rb:54:in each' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/initializable.rb:54:in
run_initializers'
from /Users/ben/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/application.rb:136:in initialize!' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in
method_missing'
from /Users/ben/dev/rails/dbc/config/environment.rb:5:in <top (required)>' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in
require'
from /Users/ben/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in block in require' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in
load_dependency'
from /Users/ben/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in require' from /Users/ben/dev/rails/dbc/config.ru:3:in
block in
instance_eval' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/rack-1.4.5/lib/rack/builder.rb:51:in
initialize'new' from /Users/ben/dev/rails/dbc/config.ru:in
'eval' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/rack-1.4.5/lib/rack/builder.rb:40:in
parse_file'app' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/commands/server.rb:46:in
app'wrapped_app' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/rack-1.4.5/lib/rack/server.rb:254:in
start'start' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/commands.rb:55:in
block in <top (required)>'tap' from /Users/ben/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/commands.rb:50:in
<top (required)>'require' from /Users/ben/dev/rails/dbc/script/rails:6:in
<top (required)>'load' from -e:1:in
'
Process finished with exit code 1
This is running rails 3.2.19 (in RubyMine) and was working previously. It seems there was a change in font-awesome-sass-4.2.1/lib/font_awesome/sass/rails/engine.rb that is not rails 3.2.x compatible. Have rolled back to 4.2.0 and working again now.
sass-rails is required here, which throws a exception when sass-rails isn't installed, and sass-rails is not a dependency of the gem. Is sass-rails necessary for font awesome to work, with rails?
Good morning, for some reason when I move from 4.2.2 version to 4.3.0 or 4.3.1 throws the next error: undefined local variable or method
javascripts_path' for FontAwesome::Sass:Module (NameError)`.
This error is fired when I do the continuous integration with CircleCI in the cucumber tab.
Any thoughts?
Thanks in advance =)
In development the fonts work fine, however in production, all the font files return a 404:
https://foobar.com/assets/font-awesome/fontawesome-webfont.woff
returns 404.
I am using Rails 3.2, without compass. I have tried precompiling assets manually as well as adding
config.assets.precompile += %w(*.svg *eot *woff *woff2 *.ttf)
to production.rb.
The font-awesome stylesheets are all working and referencing the fonts, but for some reason the fonts are not there!
There should be a helper for stacked icons. Using the example from: http://fortawesome.github.io/Font-Awesome/examples/#stacked
<span class="fa-stack fa-lg">
<i class="fa fa-camera fa-stack-1x"></i>
<i class="fa fa-ban fa-stack-2x text-danger"></i>
</span>
Right now this could be implemented using the icon helper like this:
<span class="fa-stack fa-lg">
<%= icon("camera", "", class: "fa-stack-1x") %>
<%= icon("ban", "", class: "fa-stack-2x text-danger") %>
</span>
I think there should be a helper specifically for stacked icons. It could be written like this:
<%= stacked_icon(
icon("camera", "", class: "fa-stack-1x"), # The first icon to stack
icon("ban", "", class: "fa-stack-2x text-danger"), # The second icon to stack
class: "fa-lg" # Additional classes for fa-stack
) %>
Hi, I have a problem with this, using Compass. I followed the instructions, and I did the following:
Unfortunately when I run bundler exec compass compile --force I get an error:
error sass/style.scss (/var/lib/gems/1.9.1/gems/compass-core-1.1.0.alpha.3/lib/compass/core/asset_url_resolver.rb:102:in clean_path': undefined method
split' for nil:NilClass)
write font-awesome/font-awesome.css
Compilation failed in 1 files.
This is due to @import "font-awesome-compass"; If I remove that it compiles fine (but the font does not work).
Thanks!
I installed this gem and added this to the html. some icons worked while this one does not work.
<i class="fa fa-pencil-square"></i>
i had to take out the gem and add this in the head for it to work
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
Thanks!
When I run the precompile task with capistrano 3 I get the follow error. Followed the way to include as per homepage. (ie. //= require font-awesome)
Version of gem: 4.0.2
[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m Undefined variable: "$fa-css-prefix".
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m (in /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/font-awesome-sass-4.0.2/vendor/assets/stylesheets/font-awesome/_bordered-pulled.scss)
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/font-awesome-sass-4.0.2/vendor/assets/stylesheets/font-awesome/_bordered-pulled.scss:4
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/script/variable.rb:49:in `_perform'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/script/node.rb:40:in `perform'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:398:in `block in run_interp_no_strip'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:396:in `map'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:396:in `run_interp_no_strip'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:406:in `run_interp'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:313:in `visit_rule'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:37:in `visit'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:100:in `visit'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `map'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `visit_children'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:37:in `block in visit'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:128:in `visit_root'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:37:in `visit'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:100:in `visit'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/visitors/perform.rb:7:in `visit'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/tree/root_node.rb:20:in `render'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/engine.rb:315:in `_render'
�[0m�[30mDEBUG�[0m [�[32m9595f823�[0m] �[31m /home/ubuntu/tmp/shared/bundle/ruby/2.0.0/gems/sass-3.2.9/lib/sass/engine.rb:262:in `render'
First time deploying Rails app with your gem and have a error while precompiling assets:
** [out :: bttf.exlabs.co.uk] NoMethodError: undefined method `assets' for #<Rails::Engine::Configuration:0x00000004961410>
** [out :: bttf.exlabs.co.uk] /home/bttf/apps/BankToTheFuture/shared/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configuration.rb:85:in `method_missing'
** [out :: bttf.exlabs.co.uk] /home/bttf/apps/BankToTheFuture/shared/bundle/ruby/1.9.1/gems/font-awesome-sass-4.2.1/lib/font_awesome/sass/rails/engine.rb:10:in `block in <class:Engine>'
I have this gem in my Gemfile (bundled) and *= require font-awesome
in my application.css
Rails is not loading the icons though. It seems to be because of this line
If I change "../fonts/font-awesome/"
to "/assets/font-awesome/"
it works.
If I am doing something wrong, please let me know. If this is an actual issue, I would gladly make a pull request.
Rails version: 4.1.8
Font-Awesome-Sass version: 4.2.2
I use this in conjunction with my Non-Rails project, and have noticed that when I build, an additional output, font-awesome/font-awesome.css is created. I am not able to discern why this happens, but would appreciate an option to suppress this behavior, as I don't want/need this file - I issue an include in a different file where I actually want the Font Awesome CSS to go.
Please let me know if I can clarify. Thanks!
here's the stack trace
Anadis-MacBook-Pro:dev-2 anadi$ rake assets:precompile
I, [2014-06-29T16:22:53.398497 #13248] INFO -- : Writing /Users/anadi/Code/heroku/ruchiyoga/dev-2/public/assets/tumblr-parser-75126aae2bf0d05d0e0d01dbbf905440.js
I, [2014-06-29T16:22:53.602070 #13248] INFO -- : Writing /Users/anadi/Code/heroku/ruchiyoga/dev-2/public/assets/application-89881d5cf7391996755cfda2516b90dd.css
I, [2014-06-29T16:22:53.802326 #13248] INFO -- : Writing /Users/anadi/Code/heroku/ruchiyoga/dev-2/public/assets/bootstrap-custom-13f53506eb1267c93cfbb74904942515.css
I, [2014-06-29T16:22:53.900598 #13248] INFO -- : Writing /Users/anadi/Code/heroku/ruchiyoga/dev-2/public/assets/fontawesome-webfont-c9301e05ed43233a8630753f881f7578.eot
I, [2014-06-29T16:22:53.909093 #13248] INFO -- : Writing /Users/anadi/Code/heroku/ruchiyoga/dev-2/public/assets/fontawesome-webfont-4e6f25b0cb06709f3ea8cf4faba3770e.svg
I, [2014-06-29T16:22:53.912499 #13248] INFO -- : Writing /Users/anadi/Code/heroku/ruchiyoga/dev-2/public/assets/fontawesome-webfont-9a193766e28066d893d26bed2fa4bf78.ttf
I, [2014-06-29T16:22:53.915472 #13248] INFO -- : Writing /Users/anadi/Code/heroku/ruchiyoga/dev-2/public/assets/fontawesome-webfont-8469702eb3d4956fcf1618b086a49ad1.woff
I, [2014-06-29T16:22:53.935085 #13248] INFO -- : Writing /Users/anadi/Code/heroku/ruchiyoga/dev-2/public/assets/font-awesome-4cbf2bb617fe9319a5c61457f5685127.css
I, [2014-06-29T16:22:54.049134 #13248] INFO -- : Writing /Users/anadi/Code/heroku/ruchiyoga/dev-2/public/assets/font-awesome/_bootstrap-d24fd19c6bee5787ade51e748f0be2e5.css
rake aborted!
Sass::SyntaxError: Undefined variable: "$fa-css-prefix".
(in /Users/anadi/.rvm/gems/ruby-2.1.1/gems/font-awesome-sass-4.1.0/vendor/assets/stylesheets/font-awesome/_bordered-pulled.scss:4)
/Users/anadi/.rvm/gems/ruby-2.1.1/gems/font-awesome-sass-4.1.0/vendor/assets/stylesheets/font-awesome/_bordered-pulled.scss:4
/Users/anadi/.rvm/gems/ruby-2.1.1/gems/sass-3.2.19/lib/sass/script/variable.rb:49:in `_perform'
/Users/anadi/.rvm/gems/ruby-2.1.1/gems/sass-3.2.19/lib/sass/script/node.rb:40:in `perform'
my gem file
source 'https://rubygems.org'
ruby '2.1.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use the sassy bootstrap
gem 'bootstrap-sass', '~> 3.2.0.0'
# auto prefix browser specific prefixes
gem 'autoprefixer-rails', '~> 2.0.1.20140626'
# Use official FontAwesome gem
gem 'font-awesome-sass'
# Use Uglifier as compressor for JavaScript assets
In the [README.md] file in the section 'Rails Helper usage' there is call to icon
helper but that gives me exception but calling fa_icon
does the job.
Readme says file includes the sprockets assest helper Sass functions used for finding the proper path to the font file.
assest
is a typo presumably.
I'm using font-awesome-sass as part of a compass project (I'm also using bootstrap-sass).
The fa-university icon (and it's aliases) do not show up. My first thought was that it was a 4.1 vs 4.0 issue but all the other 4.1 icons appear to be working.
The CSS does include the .fa-university
class and the CSS is appearing when I inspect the :before sudo element of the <i>
tag. So it seems like the \f19c
character is not in the font.
I would like to install it in existing project.
gem install font-awesome-sass
- downloaded and installed gem in system
But how to i add this sass files to project?
In bourbon you could do this
gem install bourbon
then go to project folder where you want to install it, bourbon install
and files will be there
4.0.2 works fine. When I upgraded to 4.0.3 I noticed that all my icons are now blocks and I'm getting 404's for the font files (because there is now, no md5 hash in the file names)...
Is there something I need to do when going from 4.0.2 to 4.0.3?
When using the 4.2.0 gem i get:
ActionController::RoutingError (No route matches [GET] "/fonts/font-awesome/fontawesome-webfont.ttf"):
4.1.0 is working fine.
i saw that the location of the file changed in 4.2, probably this is the problem?
.//.rvm/gems/ruby-2.1.2/gems/font-awesome-less-4.0.2/vendor/assets/fonts/fontawesome-webfont.ttf
.//.rvm/gems/ruby-2.1.2/gems/font-awesome-sass-4.1.0/vendor/assets/fonts/fontawesome-webfont.ttf
.//.rvm/gems/ruby-2.1.2/gems/font-awesome-sass-4.2.0/assets/fonts/font-awesome/fontawesome-webfont.ttf
Hello,
After update to 4.3.2, i got this error :
undefined method `key?' for nil:NilClass
I back to 4.3.0 and no more errors.
Rails version 4.1.6 and ruby 2.1.3
Thx
I am using font-awesome-sass with Compass, without Rails. The .css gets copied into css/font-awesome/font-awesome.css but there are no font-awesome fonts in my fonts directory.
I've done:
gem install compass
gem install bootstrap-sass
gem install font-awesome-sass
config.rb:
require 'bootstrap-sass'
require 'compass/import-once/activate'
require 'font-awesome-sass'
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "js"
fonts_dir = "fonts"
relative_assets = true
styles.scss:
@import "bootstrap-compass";
@import "bootstrap-variables";
@import "bootstrap";
@import "font-awesome-compass";
@import "font-awesome";
Fonts directory only has glyphicons from bootstrap-sass, and it works, so i know the paths are correct. Only font-awesome doesn't get fonts copied
This line cause Rails to precompile all fonts, not only font-awesome.
This looks outdated compared to what on rubygems... https://github.com/FortAwesome/font-awesome-sass/releases
I am working on an application that began using font awesome 3 and has since been upgraded to 4.1.0, but we are still using the 'icon' css class prefixes, and rely on the $fa-css-prefix variable in /font-awesome/_variables.scss instead of the new 'fa' classes.
It would be helpful if the gem could allow passing in this configuration so that we do not need to go through the application and update each instance manually. There are thousands of matches that come up in our application, and in our case we cannot just do a simple find and replace.
Please add icon font path. Could be variable similar to Twitters Bootstrap - see https://github.com/twbs/bootstrap-sass/blob/master/vendor/assets/stylesheets/bootstrap/_glyphicons.scss and https://github.com/twbs/bootstrap-sass/blob/master/vendor/assets/stylesheets/bootstrap/_variables.scss#L80
I can't quite figure this out. It seems to be loading the wrong version of font-awesome. I have added gem 'font-awesome-sass'
and doing a bundle list shows * font-awesome-sass (4.0.3.1)
. When I view the source of the webpage it shows Font Awesome 3.2.1
as comment in the css. Why would it not be loading the current version?
Hi
i would to use FA and i try to install the gem sass version as:
$ sudo gem install font-awesome-sass
Fetching: i18n-0.6.5.gem (100%)
Fetching: multi_json-1.8.2.gem (100%)
Fetching: tzinfo-0.3.38.gem (100%)
Fetching: minitest-4.7.5.gem (100%)
Fetching: atomic-1.1.14.gem (100%)
Building native extensions. This could take a while...
Fetching: thread_safe-0.1.3.gem (100%)
Fetching: activesupport-4.0.1.gem (100%)
ERROR: Error installing font-awesome-sass:
activesupport requires Ruby version >= 1.9.3.
but i can't use ruby 1.9.3, so how can install the FA 3.0 or other that can be run on ruby 1.9.2 ?
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.