Search code examples
ruby-on-railsrubycarrierwaverails-activestoragetrix

How install Action Text without Active Storage?


I want to add action text to my app. But it also sets Active Storage. I already use CarrierWave, and don't need Active Storage. By the way, I do not need to upload files in the editor at all.


Solution

  • ActionStorage is a hard dependency for ActionText.

    # rails/actiontext/actiontext.gemspec
    # frozen_string_literal: true
    
    version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip
    
    Gem::Specification.new do |s|
      s.platform    = Gem::Platform::RUBY
      s.name        = "actiontext"
      s.version     = version
      s.summary     = "Rich text framework."
      s.description = "Edit and display rich text in Rails applications."
    
      # ...
      s.add_dependency "activesupport", version
      s.add_dependency "activerecord",  version
      s.add_dependency "activestorage", version
      s.add_dependency "actionpack",    version
    
      s.add_dependency "nokogiri", ">= 1.8.5"
    end
    

    So you can either just live with it (ActionStorage and CarrierWave can co-exist) or use any the many other WYSIWYG alternatives or integrate Trix and Rails yourself.