私のアプリケーションには非常に奇妙なバグがあります。開発中の私のローカルマシンでは、Safari、Chrome、Firefoxですべてが完璧に見えます。しかし、Safariのプロダクション環境でステージングすると、ChromeとFirefoxで非常に醜く完璧に見えます。 Safariでページのいくつかがうまく見えることが他にありますが、問題が何であるかはわかりません。ヘロクを展開するようになった今、私はこの事実が重要であると強く感じています。ここで生産現場のSafariでRailsアプリの外観が異なる
は、ここに私の生産の設定(設定/環境/ production.rb)
Rails.application.configure do
config.cache_classes = true
config.eager_load = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
config.serve_static_assets = false
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.rb)です。
require File.expand_path('../boot', __FILE__)
require 'rails/all'
Bundler.require(*Rails.groups)
module MyApp
class Application < Rails::Application
config.time_zone = "West Central Africa"
config.autoload_paths << Rails.root.join('lib')
config.i18n.fallbacks = true
end
end
私はRailsの4.2を使用しています。 5とgem rails_12factorを使用しています。私は資産とこの回答https://stackoverflow.com/a/27626661/1771495についてのHerokuのチュートリアルを読んだが、彼らは私を助けません。
ご協力いただきましてありがとうございます。
Safariの開発ツールを使用して、機能しているかどうかを調べてください。それらの1人が別の場所からスタイルを取得しているか、見つからないスタイルシートなどからスタイルを取得しようとしていることをすぐに確認する必要があります。 –