From 1207d2b5c14679bab55d1e7f408470ed94e7e6f7 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Tue, 17 Mar 2020 10:12:59 -0700 Subject: [PATCH] Remove annoying bits of Rails that just make our life harder --- myapp/app/assets/config/manifest.js | 0 myapp/config/application.rb | 15 ++++++++++++++- myapp/config/environments/development.rb | 2 +- myapp/config/environments/production.rb | 2 +- myapp/config/environments/test.rb | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 myapp/app/assets/config/manifest.js diff --git a/myapp/app/assets/config/manifest.js b/myapp/app/assets/config/manifest.js new file mode 100644 index 00000000..e69de29b diff --git a/myapp/config/application.rb b/myapp/config/application.rb index 74f7f1fb..d2e6429b 100644 --- a/myapp/config/application.rb +++ b/myapp/config/application.rb @@ -1,6 +1,19 @@ require_relative 'boot' -require 'rails/all' +require 'rails' +%w( + active_record/railtie + action_controller/railtie + action_view/railtie + action_mailer/railtie + active_job/railtie + sprockets/railtie +).each do |railtie| + begin + require railtie + rescue LoadError + end +end # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. diff --git a/myapp/config/environments/development.rb b/myapp/config/environments/development.rb index 7560767f..5094bed5 100644 --- a/myapp/config/environments/development.rb +++ b/myapp/config/environments/development.rb @@ -28,7 +28,7 @@ Rails.application.configure do end # Store uploaded files on the local file system (see config/storage.yml for options) - config.active_storage.service = :local + #config.active_storage.service = :local # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false diff --git a/myapp/config/environments/production.rb b/myapp/config/environments/production.rb index a52e199f..2a20538b 100644 --- a/myapp/config/environments/production.rb +++ b/myapp/config/environments/production.rb @@ -39,7 +39,7 @@ Rails.application.configure do # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Store uploaded files on the local file system (see config/storage.yml for options) - config.active_storage.service = :local + #config.active_storage.service = :local # Mount Action Cable outside main process or domain # config.action_cable.mount_path = nil diff --git a/myapp/config/environments/test.rb b/myapp/config/environments/test.rb index 0a38fd3c..ccf4335d 100644 --- a/myapp/config/environments/test.rb +++ b/myapp/config/environments/test.rb @@ -29,7 +29,7 @@ Rails.application.configure do config.action_controller.allow_forgery_protection = false # Store uploaded files on the local file system in a temporary directory - config.active_storage.service = :test + #config.active_storage.service = :test config.action_mailer.perform_caching = false