Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Hyrax 4.0 in new rails branch #22

Closed
24 of 25 tasks
Tracked by #741
jillpe opened this issue Aug 3, 2023 · 2 comments
Closed
24 of 25 tasks
Tracked by #741

Upgrade to Hyrax 4.0 in new rails branch #22

jillpe opened this issue Aug 3, 2023 · 2 comments
Assignees
Milestone

Comments

@jillpe
Copy link

jillpe commented Aug 3, 2023

Summary

Upgrade technique, create a separate gemfile that contains the dependencies

Acceptance Criteria

  • Hyrax is updated in new rails branch
  • Application starts
  • Tickets are created for things that are broken

FOLLOW UP TICKETS

Testing Instructions

Notes

Suggestion: follow Hyrax's release notes for various changes

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.lock and retry.

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

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';

  • In app/controllers/application_controller.rb remove skip_after_action :discard_flash_if_xhr

    • GBH didn't have this line in their application
  • 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 remove config.google_analytics_id setting.
  • In config/initializers/riiif.rb update capitalization of Riiif::Image.authorization_service = Hyrax::IiifAuthorizationService
    • GBH did not have this file. It was introduce in Hyrax 3. We left this out because they are a metadata only application anyways.

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

@jillpe jillpe added this to AMS / GBH Aug 3, 2023
@jillpe jillpe converted this from a draft issue Aug 3, 2023
@jillpe jillpe changed the title Create Hyrzx upgrade gemfile Create Hyrax upgrade gemfile Aug 3, 2023
@jillpe jillpe added this to the Hyrax Upgrade milestone Aug 3, 2023
@jillpe jillpe added the blocked other work must be completed first label Aug 3, 2023
@jillpe
Copy link
Author

jillpe commented Aug 3, 2023

Blocked by #21

@ShanaLMoore
Copy link

This got upgraded as part of #23

ShanaLMoore added a commit to WGBH-MLA/ams that referenced this issue Aug 9, 2023
This commit upgrade bootstrap per the 'Upgrade Hyrax 3.x to Hyrax 4' wiki instructions.

wiki:
- https://github.com/samvera/hyrax/wiki/Upgrade-Hyrax-3.x-to-Hyrax-4

Issue:
- scientist-softserv#22
@github-project-automation github-project-automation bot moved this from Deploy to Staging to Done in AMS / GBH Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants