Browse Source

fix eager load when no db

pull/1/head
Nicolae Claudius 11 years ago
parent
commit
a289405623
  1. 8
      config/environments/production.rb
  2. 2
      entrydns.spec

8
config/environments/production.rb

@ -1,9 +1,13 @@
Entrydns::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
db_operation = File.basename($0) == "rake" &&
%w(db:migrate db:schema:load).any? { |op| op.in?(ARGV) }
# Code is not reloaded between requests, unless rake
# https://github.com/activescaffold/active_scaffold/issues/131
config.cache_classes = (File.basename($0) == "rake" && ARGV.include?("db:migrate")) ? false : true
config.cache_classes = !db_operation
config.eager_load = !db_operation
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
@ -74,8 +78,6 @@ Entrydns::Application.configure do
:domain => 'entrydns.net'
}
config.eager_load = true
# Compress JavaScripts and CSS
config.assets.js_compressor = :uglifier
end

2
entrydns.spec

@ -53,7 +53,7 @@ cp config/database.mysql.sample.yml config/database.yml
bundle install --deployment --without development test
# pre-compile assets
bundle exec rake RAILS_ENV=production db:create db:migrate
bundle exec rake RAILS_ENV=production db:create db:schema:load
bundle exec rake RAILS_ENV=production assets:precompile
# fix wrong sheebang for unicorn

Loading…
Cancel
Save