Bootstrap社交rails按钮可以正常脱机显示,但不能在heroku上显示

时间:2015-02-16 21:13:32

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

我的按钮在脱机状态下显示正常,但当我将它们推送到Heroku时,填充关闭。还有其他人经历过这个吗?

配置/环境/ development.rb

Rails.application.configure do
  config.cache_classes = false
  config.eager_load = false
  config.consider_all_requests_local       = true
  config.action_controller.perform_caching = false
  config.action_mailer.raise_delivery_errors = true
  config.active_support.deprecation = :log
  config.active_record.migration_error = :page_load
  config.assets.debug = true
  config.assets.digest = true
  config.assets.raise_runtime_errors = true
end

配置/环境/ development.rb

Rails.application.configure do
  config.serve_static_files = true
  config.serve_static_assets = true

  config.cache_classes = false
  config.eager_load = false
  config.consider_all_requests_local       = false
  config.action_controller.perform_caching = false
  config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
  config.assets.js_compressor = :uglifier

  config.assets.compile = true
  config.assets.digest = true
  config.log_level = :debug
  config.i18n.fallbacks = true
  config.active_support.deprecation = :notify
  config.log_formatter = ::Logger::Formatter.new
  config.active_record.dump_schema_after_migration = false
end

资产/样式表/ application.css

/*
 * Unimportant comments
 *
 *= require_tree .
 *= require_self
 *= require font-awesome
 *= require bootstrap-social
 */

在heroku上: http://i.imgur.com/8X6RTdk.png

离线 http://i.imgur.com/dL6pdBC.png

在我推动之前我已经跑了rake assets:precompile并且仍然有相同的结果。欢迎提出所有建议。

修改 这是我的Gemfile(我意识到我有重复的宝石):

source 'https://rubygems.org'
ruby '2.2.0'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'turbolinks'
# Use jquery as the JavaScript library
gem 'jquery-rails'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

gem 'devise'
gem 'rails_12factor', group: :production
gem 'twitter-bootstrap-rails'
gem 'simple_form'
gem 'puma'
gem 'omniauth-facebook'
gem 'omniauth-google-oauth2'
gem 'font-awesome-rails'
gem 'bootstrap-social-rails'

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :production, :staging do
  gem 'pg'
  gem 'rails_12factor'
end

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger         console
  gem 'byebug'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the   background. Read more: https://github.com/rails/spring
  gem 'spring'
end

0 个答案:

没有答案