Disable Active Storage in Rails 5.2

lulalala picture lulalala · Apr 13, 2018 · Viewed 10.2k times · Source

Upgrading Rails to 5.2, and I found out that I must commit the storage.yml into version control. I don't plan to use ActiveStorage. Is there a way to disable it?

Answer

borisaeric picture borisaeric · May 12, 2018

Remove next line from config/application.rb

require "active_storage/engine"

Remove next line from environments config/environments/*.rb

config.active_storage.service = :local

Remove next line from app/assets/javascripts/application.js

//= require activestorage

ActiveStorage rails routes will vanish

In case there is statement require 'rails/all' in application.rb then you can use solution provided below where you need to require dependency by dependency and to omit active_storage.