Rails-Admin图标坏了

问题描述 投票:2回答:1

我正在使用Rails-Admin作为Rails应用程序的仪表板。但在仪表板上,图标都是相同的 - 白色方块。

Broken Icons的屏幕截图:

这是gemfile

source 'http://rubygems.org'

gem 'rails', '4.1.1'
gem 'slim-rails', '~> 2.1.0'
gem 'devise', '~> 3.2.4'
gem 'devise-i18n'
gem 'configatron', '2.13.0'
gem 'navigation_link_to', '0.0.2'
gem 'cyrax', '0.7.4'
gem 'dotenv-rails'

gem 'simple_form', '3.0.2'

# emails styles
gem 'roadie', '2.4.3'

# assets
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '~> 2.5.0'
gem 'coffee-rails', '~> 4.0.1'
gem 'therubyracer', platforms: :ruby, require: 'v8'
gem 'droidcss'
gem 'jquery-rails'
gem 'bootstrap-sass'

# unicorn
gem 'unicorn'
gem 'jbuilder'

# mongo
gem 'mongoid', '~> 4.0.0'
gem 'mongoid-grid_fs'
gem 'fog', '~> 1.27', require: 'fog/aws/storage'
gem 'carrierwave-mongoid', require: 'carrierwave/mongoid'
gem 'mongoid-geospatial'
# gem 'rmagick', require: false
gem 'mini_magick'
gem 'carrierwave-video'
gem 'public_activity'
gem 'mongoid_slug'
gem 'mongoid_search'
gem 'mongoid_paranoia', github: 'simi/mongoid_paranoia'

# aerospike
gem 'aerospike'

# documentation
gem 'apipie-rails', github: 'Apipie/apipie-rails'
gem 'maruku'

# other gems
gem 'inherited_resources'
gem 'rails_admin', github: 'sferik/rails_admin'
gem 'enumerize'
gem 'sidekiq'
gem 'pundit'

# ios gem
gem 'houston'

gem 'whenever'
# gem 'quartz', github: 'jeizsm/quartz'
gem 'twilio-ruby'
# mixpanel
gem 'mixpanel-ruby'

group :development do
  gem 'capistrano', '2.15.5', require: false
  gem 'capistrano-sidekiq', github: 'seuros/capistrano-sidekiq'
  gem 'letter_opener'
  gem 'quiet_assets', '1.0.2'
  gem 'thin', '1.6.2'
  gem 'guard-rubocop'
end

group :test do
  gem 'spring-commands-rspec'
  gem 'database_cleaner', '1.2.0'
  gem 'factory_girl_rails', '4.4.1'
  gem 'capybara', '2.3.0'
  gem 'email_spec', '1.5.0'
  gem 'turnip', '1.2.1'
end

group :test, :development do
  gem 'mocha', '1.0.0', require: 'mocha/api'
  gem 'spring'
  gem 'rspec-rails', '~> 3.0.0'
  gem 'guard-rspec', require: false
  gem 'shoulda', '3.5.0'
  gem 'byebug'
  gem 'pry-byebug'
  gem 'pry-rails'
end

使用rails admin或其他宝石时有任何错误吗?

任何建议都会有所帮助!

ruby-on-rails
1个回答
1
投票

我想你需要使用font-awesome gem。我以前遇到过同样的问题。

Rails管理员使用旧版本的fontawesome。在这里下载zip文件:http://fortawesome.github.io/Font-Awesome/3.2.1/assets/font-awesome.zip

然后将以下文件放入rails项目的/public/assets目录中,从zip文件中的/font目录:

fontawesome-webfont.eot
fontawesome-webfont.svg
fontawesome-webfont.ttf
fontawesome-webfont.woff
FontAwesome.otf
© www.soinside.com 2019 - 2024. All rights reserved.