Created
October 11, 2011 02:25
-
-
Save lunks/1277122 to your computer and use it in GitHub Desktop.
Using Unicorn, Rails is trying to compile the assets even though the assets themselves are alredy precompiled.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path('../boot', __FILE__) | |
require 'rails/all' | |
require 'exception_notifier' | |
if defined?(Bundler) | |
# Bundler.require(:default, :assets, Rails.env) | |
Bundler.require *Rails.groups(:assets => %w(development test)) | |
end | |
module Tarifador | |
class Application < Rails::Application | |
config.generators do |g| | |
g.stylesheets false | |
end | |
stylesheets_directory = "#{Rails.root}/app/assets/stylesheets" | |
config.assets.precompile << /(^[^_]|\/[^_])[^\/]*/ | |
# Settings in config/environments/* take precedence over those specified here. | |
# Application configuration should go into files in config/initializers | |
# -- all .rb files in that directory are automatically loaded. | |
# Custom directories with classes and modules you want to be autoloadable. | |
# config.autoload_paths += %W(#{config.root}/extras) | |
# enumerations | |
config.autoload_paths += Dir[Rails.root.join('app', 'models', '{**}')] | |
config.autoload_paths += %W(#{config.root}/app/models/enumerations) | |
config.autoload_paths += Dir[Rails.root.join('lib')] | |
config.autoload_paths += Dir[Rails.root.join('lib/form_builders')] | |
config.autoload_paths += %W(#{config.root}/lib/rails_ext/view) | |
# Only load the plugins named here, in the order given (default is alphabetical). | |
# :all can be used as a placeholder for all plugins not explicitly named. | |
# config.plugins = [ :exception_notification, :ssl_requirement, :all ] | |
# Activate observers that should always be running. | |
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer | |
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. | |
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. | |
# config.time_zone = 'Central Time (US & Canada)' | |
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. | |
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] | |
config.i18n.default_locale = :"pt-BR" | |
# Configure the default encoding used in templates for Ruby 1.9. | |
config.encoding = "utf-8" | |
config.use_cdn_for_javascript = true | |
config.show_devise_errors_at_login = true | |
config.assets.enabled = true | |
# Configure sensitive parameters which will be filtered from the log file. | |
config.filter_parameters += [:password, :password_confirmation] | |
config.action_mailer.raise_delivery_errors = true | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tarifador::Application.configure do | |
# Settings specified here will take precedence over those in config/application.rb | |
# The production environment is meant for finished, "live" apps. | |
# Code is not reloaded between requests | |
config.cache_classes = true | |
# Full error reports are disabled and caching is turned on | |
config.consider_all_requests_local = false | |
config.action_controller.perform_caching = true | |
# Specifies the header that your server uses for sending files | |
config.action_dispatch.x_sendfile_header = "X-Sendfile" | |
config.assets.js_compressor = :uglifier | |
config.assets.digest = true | |
# For nginx: | |
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' | |
# If you have no front-end server that supports something like X-Sendfile, | |
# just comment this out and Rails will serve the files | |
# See everything in the log (default is :info) | |
# config.log_level = :debug | |
# Use a different logger for distributed setups | |
# config.logger = SyslogLogger.new | |
# Use a different cache store in production | |
# config.cache_store = :mem_cache_store | |
# Disable Rails's static asset server | |
# In production, Apache or nginx will already do this | |
config.serve_static_assets = false | |
config.assets.compress = true | |
# Enable serving of images, stylesheets, and javascripts from an asset server | |
# config.action_controller.asset_host = "http://assets.example.com" | |
# Disable delivery errors, bad email addresses will be ignored | |
# config.action_mailer.raise_delivery_errors = false | |
# Enable threaded mode | |
# config.threadsafe! | |
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to | |
# the I18n.default_locale when a translation can not be found) | |
config.i18n.fallbacks = true | |
# Send deprecation notices to registered listeners | |
config.active_support.deprecation = :notify | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment