-
Notifications
You must be signed in to change notification settings - Fork 125
Upgrade Hyrax 3.x to Hyrax 4
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.
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.lock
and retry.
- If this command takes an abnormally long time to complete, try deleting
-
Update
app/assets/javascripts/application.js
as follows:-
Change
//= require jquery
to//= require jquery3
-
Change
//= require jquery_ujs
to//= require rails-ujs
(Note the hyphen) -
Change
//= require dataTables/jquery.dataTables
to//= require jquery.dataTables
-
Change
//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
to//= require dataTables.bootstrap4
-
Add these three lines after
//= require rails-ujs
://= require popper //= require twitter/typeahead //= require bootstrap
-
Add
//= require blacklight_gallery
after//= require blacklight/blacklight
-
-
Update
app/assets/stylesheets/application.css
as follows:- Change
*= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
to*= require dataTables.bootstrap4
- Change
-
Update
app/assets/stylesheets/hyrax.scss
as 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.rb
removeskip_after_action :discard_flash_if_xhr
-
In
app/models/user.rb
remove:if Blacklight::Utils.needs_attr_accessible? attr_accessible :email, :password, :password_confirmation end
-
Check that
config/analytics.yml
is updated to match the new format. -
In
config/initializers/hyrax.rb
removeconfig.google_analytics_id
setting. -
In
config/initializers/riiif.rb
update 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.
- Report on steps you took in addition to the above instructions
- Fulcrum's Hyrax 3.5 to 4.0 Upgrade Notes