diff --git a/Appraisals b/Appraisals index 32407da..ae3cdef 100644 --- a/Appraisals +++ b/Appraisals @@ -6,5 +6,5 @@ end appraise "rails-7" do gem "rails", "~> 7.1" - gem "sprockets-rails", require: "sprockets/railtie" + gem "sprockets-rails" end diff --git a/elemental_components.gemspec b/elemental_components.gemspec index 06990a3..a9145be 100644 --- a/elemental_components.gemspec +++ b/elemental_components.gemspec @@ -21,6 +21,7 @@ Gem::Specification.new do |s| s.required_ruby_version = ">= 3.0.0" s.add_dependency "rails", ">= 6.1.0", "< 8.0.0" + s.add_dependency "sprockets-rails" s.add_development_dependency "appraisal" s.add_development_dependency "rubocop" diff --git a/gemfiles/rails_7.gemfile b/gemfiles/rails_7.gemfile index 0bac43d..6610cc4 100644 --- a/gemfiles/rails_7.gemfile +++ b/gemfiles/rails_7.gemfile @@ -6,6 +6,6 @@ source "https://rubygems.org" gem "pry", group: %i[development test] gem "rails", "~> 7.1" -gem "sprockets-rails", require: "sprockets/railtie" +gem "sprockets-rails" gemspec path: "../" diff --git a/lib/elemental_components/engine.rb b/lib/elemental_components/engine.rb index 795ffbb..e5057ba 100644 --- a/lib/elemental_components/engine.rb +++ b/lib/elemental_components/engine.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "sprockets/railtie" + module ElementalComponents class Engine < ::Rails::Engine isolate_namespace ElementalComponents