Skip to content

Commit

Permalink
Remove bootstrap gem from gemfile
Browse files Browse the repository at this point in the history
We now use bootstrap 5 via npm with vite, not from the rubygem. The rubygem is unneeded.

Remove duplicate sprockets/sprockets-rails in gemfile, only sprockets-rails, higher in gemfile. Having them both with sprockets first was effecting load order in a weird way that prevented startup, in the absence of sassc-rails which had been a bootstrap gem indirect dependency.
  • Loading branch information
jrochkind committed Dec 3, 2024
1 parent 4bcd82a commit 1b2b833
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 47 deletions.
23 changes: 2 additions & 21 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ gem 'lockbox'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 7.2.0'

gem 'sprockets-rails', '>= 3.4.2'

# Ensure we are using rack 3, with a new sinatra that can use it. Both of these
# are indirect dependencies, in here only to force bundler NOT to do a weird
# resolution to old versions of sinatra!
# https://bibwild.wordpress.com/2023/11/09/beware-sinatra-rails-7-1-rack-3-resque-bundler-dependency-resolution/
gem "rack", ">= 3.0"

gem "sinatra", ">= 4.0"

# Our JS/CSS/asset bundler
Expand Down Expand Up @@ -87,21 +88,6 @@ gem "dalli", "~> 3.2"

gem 'honeybadger', '~> 5.0'

# Until we get things working under sprockets 4, lock to sprockets 3
# https://github.com/sciencehistory/scihist_digicoll/issues/458
gem "sprockets", "~> 4.0"

# We no longer use sass through sprockets, only through vite!
# So don't need a sass gem, we have sass npm package instead.
# gem 'sassc-rails', '~> 2.0'

# Use terser as compressor for any JavaScript assets still used via sprockets
gem 'terser', '~> 1.1'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby

# Use CoffeeScript for .coffee assets and views
#gem 'coffee-rails', '~> 5.0'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
Expand All @@ -112,11 +98,6 @@ gem 'jbuilder', '~> 2.5'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.4', require: false

# note if updating to 5, you should change bootstrap_version config in catalog_controller
gem 'bootstrap', '~> 4.6', '>= 4.6.2'

gem 'sprockets-rails', '>= 3.4.2'

gem 'font-awesome-rails', '~> 4.7'

gem "lograge", "< 2"
Expand Down
21 changes: 0 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ GEM
ast (2.4.2)
attr_json (2.4.0)
activerecord (>= 6.0.0, < 7.3)
autoprefixer-rails (10.4.19.0)
execjs (~> 2)
aws-eventstream (1.3.0)
aws-partitions (1.965.0)
aws-sdk-cloudfront (1.96.0)
Expand Down Expand Up @@ -152,10 +150,6 @@ GEM
view_component (>= 2.54, < 4)
bootsnap (1.18.4)
msgpack (~> 1.2)
bootstrap (4.6.2)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 1.16.1, < 2)
sassc-rails (>= 2.0.0)
bootstrap4-kaminari-views (1.0.1)
kaminari (>= 0.13)
rails (>= 3.1)
Expand Down Expand Up @@ -249,7 +243,6 @@ GEM
erubi (1.13.0)
ethon (0.16.0)
ffi (>= 1.15.0)
execjs (2.9.1)
factory_bot (6.4.6)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.3)
Expand Down Expand Up @@ -476,7 +469,6 @@ GEM
ruby-rc4
ttfunk
pg (1.5.7)
popper_js (1.16.1)
prawn (2.5.0)
matrix (~> 0.4)
pdf-core (~> 0.10.0)
Expand Down Expand Up @@ -640,14 +632,6 @@ GEM
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
sane_patch (1.0.0)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
scout_apm (5.3.8)
parser
scrub_rb (1.0.1)
Expand Down Expand Up @@ -697,8 +681,6 @@ GEM
sprockets (>= 3.0.0)
statsd-ruby (1.5.0)
stringio (3.1.2)
terser (1.2.3)
execjs (>= 0.3.0, < 3)
thor (1.3.2)
thread_safe (0.3.6)
tilt (2.4.0)
Expand Down Expand Up @@ -789,7 +771,6 @@ DEPENDENCIES
blacklight (~> 8.6.1)
blacklight_range_limit (= 9.0.0.beta1)
bootsnap (>= 1.4.4)
bootstrap (~> 4.6, >= 4.6.2)
bootstrap4-kaminari-views
browse-everything (~> 1.4)
browser (~> 6.0)
Expand Down Expand Up @@ -856,9 +837,7 @@ DEPENDENCIES
sinatra (>= 4.0)
sitemap_generator (~> 6.0)
solr_wrapper (~> 4.0)
sprockets (~> 4.0)
sprockets-rails (>= 3.4.2)
terser (~> 1.1)
traject (>= 3.5)
uppy-s3_multipart
view_component (~> 3.9)
Expand Down
6 changes: 1 addition & 5 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@
config.enable_reloading = true

# Do not eager load code on boot.
config.eager_load = false
config.eager_load = true

# Show full error reports. Chagne to false to see production-style error page
config.consider_all_requests_local = true

# use custom error pages when consider_all_requests_local = false
config.exceptions_app = self.routes

# sassc-rails
config.sass.inline_source_maps = true


# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
Expand Down

0 comments on commit 1b2b833

Please sign in to comment.