From c6470c4099f32c7dbac27fa596ade1785b274fec Mon Sep 17 00:00:00 2001 From: uu59 Date: Wed, 28 May 2014 10:51:09 +0900 Subject: [PATCH] Fix to run on RAILS_ENV=production by ./bin/fluentd-ui --- app/assets/stylesheets/application.css | 4 ++-- bin/fluentd-ui | 2 ++ config/environments/production.rb | 6 +++++- vendor/assets/stylesheets/sb-admin-v2/bootstrap.css | 1 - 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index acb4bbe..40f19ab 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -10,8 +10,8 @@ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new * file per style scope. * - *= require sb-admin-v2/bootstrap - *= require "sb-admin-v2/sb-admin" + *= require sb-admin-v2/bootstrap.css + *= require sb-admin-v2/sb-admin *= require "sb-admin-v2/font-awesome/scss/font-awesome.scss" *= require_tree . *= require_self diff --git a/bin/fluentd-ui b/bin/fluentd-ui index d449339..89d7a58 100755 --- a/bin/fluentd-ui +++ b/bin/fluentd-ui @@ -5,4 +5,6 @@ require "securerandom" dir = File.expand_path("../../", __FILE__) ENV["BUNDLE_GEMFILE"] ||= File.join(dir, "Gemfile.production") ENV["SECRET_KEY_BASE"] ||= SecureRandom.hex(64) +ENV["RAILS_ENV"] ||= "production" +system(*%W(bundle exec rake db:create db:migrate db:seed)) system(*%W(bundle exec rackup -E production #{dir}/config.ru)) diff --git a/config/environments/production.rb b/config/environments/production.rb index fdf36ca..cea03e4 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -2,7 +2,7 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. - config.cache_classes = true + config.cache_classes = false # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers @@ -65,4 +65,8 @@ Rails.application.configure do # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + + # Don't concat assets for font-awesome path resolving, instead of changing url in css files + config.assets.debug = true end diff --git a/vendor/assets/stylesheets/sb-admin-v2/bootstrap.css b/vendor/assets/stylesheets/sb-admin-v2/bootstrap.css index 14cc1f4..99b8e23 100644 --- a/vendor/assets/stylesheets/sb-admin-v2/bootstrap.css +++ b/vendor/assets/stylesheets/sb-admin-v2/bootstrap.css @@ -5828,4 +5828,3 @@ td.visible-print { display: none !important; } } -/*# sourceMappingURL=bootstrap.css.map */