Skip to content

Commit d855da4

Browse files
committed
Use propshaft for administrate assets
Previously administrate was including sprockets, the newer versions of administrate remove the dependency on sprockets but it appears you still need some asset provider. I could use sprockets again, but instead move to the future and use propshaft. As far as I can see it's only administrate that needs this. I've also tested Flipper UI works fine. I've removed teh old config which only applies to sprockets.
1 parent 3699055 commit d855da4

6 files changed

Lines changed: 6 additions & 26 deletions

File tree

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ gem 'open-uri'
3737
gem 'paper_trail'
3838
gem 'pg', '~> 1.6'
3939
gem 'postmark-rails'
40+
gem 'propshaft'
4041
gem 'puma', '~> 7.2'
4142
gem 'rack_content_type_default', '~> 1.1'
4243
gem 'rack-cors'

Gemfile.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ GEM
346346
prettyprint
347347
prettyprint (0.2.0)
348348
prism (1.9.0)
349+
propshaft (1.3.1)
350+
actionpack (>= 7.0.0)
351+
activesupport (>= 7.0.0)
352+
rack
349353
pry (0.15.2)
350354
coderay (~> 1.1)
351355
method_source (~> 1.0)
@@ -611,6 +615,7 @@ DEPENDENCIES
611615
paper_trail
612616
pg (~> 1.6)
613617
postmark-rails
618+
propshaft
614619
pry-byebug
615620
puma (~> 7.2)
616621
rack-cors

app/assets/config/manifest.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

config/application.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ class Application < Rails::Application
4848
g.test_framework :rspec
4949
end
5050

51-
config.assets.css_compressor = nil
52-
5351
config.active_job.queue_adapter = :good_job
5452

5553
config.to_prepare do

config/environments/production.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@
2525
# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
2626
# config.public_file_server.enabled = false
2727

28-
# Compress CSS using a preprocessor.
29-
# config.assets.css_compressor = :sass
30-
31-
# Do not fall back to assets pipeline if a precompiled asset is missed.
32-
config.assets.compile = false
33-
3428
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
3529
# config.asset_host = "http://assets.example.com"
3630

config/initializers/assets.rb

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)