rails Glyphicon不显示

时间:2016-08-04 20:52:44

标签: css ruby-on-rails twitter-bootstrap

gemfile:

   source 'https://rubygems.org'
    gem 'rails', '4.2.4'
    gem 'sqlite3'
    gem 'sass'
    gem 'sass-rails', '~> 5.0'
    gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'
    gem 'uglifier', '>= 1.3.0'
    gem 'coffee-rails', '~> 4.1.0'
    gem 'rails_admin'
    gem 'turbolinks'
    gem 'gmaps4rails', '~> 2.1', '>= 2.1.2'
    gem 'geocoder'
    gem 'google-api-client', '~> 0.7.1', require: 'google/api_client'
    gem 'underscore-rails', '~> 1.8', '>= 1.8.3'
    gem 'markerclustererplus-rails'
    gem "font-awesome-rails"
    gem 'jquery-validation-rails'
    gem 'jquery-rails' gem 'jquery-turbolinks'gem 'jbuilder', '~> 2.0'
 gem 'sdoc', '~> 0.4.0', group: :doc
    gem 'responders', '~> 2.0'
     gem 'bcrypt', '~> 3.1.7'
    group :development, :test do  gem 'byebug'
    end
    group :development do
    gem 'web-console', '~> 2.0'
      gem 'spring'
    end

application.js:

//= require jquery
//= require bootstrap-sprockets
//= require bootstrap
//= require jquery_ujs
//= require jquery.turbolinks
//= require jquery.validate
//= require validation
//= require jquery-1.5.min
//= require jcarousel
//= require underscore
//= require gmaps/google
//= require google_maps
//= require markerclusterer
//= require turbolinks
//= require_tree .

application.css:

 *= require_self
 *= require_tree .
 */

custom.css.scss:

  @import "bootstrap-sprockets";
    @import "bootstrap";
请帮助我 enter image description here图标根本不显示 有时显示黑色方块 这种情况可以归因于使用脚本吗? 使用Carousel并使用Google Map API

 <button type="button" class="btn btn-default btn-lg"><span class="glyphicon glyphicon-star"></span> Star</button> <br>

1 个答案:

答案 0 :(得分:-3)

将此添加到custom.css.scss

  

@import“font-awesome”;