Upgrade Hyrax 3.x to Hyrax 4 - samvera/hyrax GitHub Wiki
Here are the steps to upgrade from Hyrax 3.x to Hyrax 4 (beta). During beta we would like to hear about additional steps needed to upgrade successfully, so please share! Edit this wiki page and share with the community.
Upgrade instructions - Getting started
These instructions are based on updating nurax to hyrax 4.0.
-
Update Gemfile to specify these gems:
gem 'rails', '~> 6.0.5'gem 'hyrax', '~> 4.0'gem 'sass-rails', '~> 6.0'gem 'bootstrap', '~> 4.0'
-
run
bundle update- If this command takes an abnormally long time to complete, try deleting
Gemfile.lockand retry.
- If this command takes an abnormally long time to complete, try deleting
-
Update
app/assets/javascripts/application.jsas follows:-
Change
//= require jqueryto//= require jquery3 -
Change
//= require jquery_ujsto//= require rails-ujs(Note the hyphen) -
Change
//= require dataTables/jquery.dataTablesto//= require jquery.dataTables -
Change
//= require dataTables/bootstrap/3/jquery.dataTables.bootstrapto//= require dataTables.bootstrap4 -
Add these three lines after
//= require rails-ujs://= require popper //= require twitter/typeahead //= require bootstrap -
Add
//= require blacklight_galleryafter//= require blacklight/blacklight
-
-
Update
app/assets/stylesheets/application.cssas follows:- Change
*= require dataTables/bootstrap/3/jquery.dataTables.bootstrapto*= require dataTables.bootstrap4
- Change
-
Update
app/assets/stylesheets/hyrax.scssas follows:- Remove
@import "bootstrap-sprockets"; - Add
@import "hyrax/blacklight_gallery";after any other blacklight_gallery lines and before@import 'hyrax/hyrax';
- Remove
-
In
app/controllers/application_controller.rbremoveskip_after_action :discard_flash_if_xhr -
In
app/models/user.rbremove:if Blacklight::Utils.needs_attr_accessible? attr_accessible :email, :password, :password_confirmation end -
Check that
config/analytics.ymlis updated to match the new format. -
In
config/initializers/hyrax.rbremoveconfig.google_analytics_idsetting. -
In
config/initializers/riiif.rbupdate capitalization ofRiiif::Image.authorization_service = Hyrax::IiifAuthorizationService
Depending on the amount of customization present in your hyrax application, more changes may be needed. In particular, many Bootstrap CSS class names were updated in this release.
Share upgrade experience
- Report on steps you took in addition to the above instructions
- Fulcrum's Hyrax 3.5 to 4.0 Upgrade Notes