Skip to content

Ruby 3 support#158

Merged
brockfanning merged 1 commit into
2.3.0-devfrom
ruby-3-support
May 17, 2023
Merged

Ruby 3 support#158
brockfanning merged 1 commit into
2.3.0-devfrom
ruby-3-support

Conversation

@brockfanning
Copy link
Copy Markdown
Contributor

@brockfanning brockfanning commented May 16, 2023

This small code change seems to support the latest version of Ruby (3.2). To test this out with Ruby 3.2, you would need to point to this branch of jekyll-open-sdg-plugins in your Gemfile, such as:

gem 'jekyll-open-sdg-plugins', git: 'https://github.com/open-sdg/jekyll-open-sdg-plugins.git', branch: 'ruby-3-support'

And you would also need to adjust all of your Github Actions workflow files (eg, .github/workflows/test-pull-requests.yml, and all of the others in that folder) to use Ruby 3, such as:

    - name: Set up Ruby 3.2
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: '3.2'

@sarah-beasley
Copy link
Copy Markdown

Hi @brockfanning, this isn't working for me when I'm trying to make these changes. Here is the error that keeps coming up - https://github.com/ONSdigital/sdg-indicators/actions/runs/4993296549/jobs/8942200832?pr=3731. I've made a PR so you can check the files i've changed here.

@brockfanning
Copy link
Copy Markdown
Contributor Author

@sarah-beasley Thanks for testing. Can you also add these lines to your Gemfile:

gem "kramdown-parser-gfm"
gem "webrick"

@sarah-beasley
Copy link
Copy Markdown

@brockfanning just added those lines and it errored very quickly - https://github.com/ONSdigital/sdg-indicators/actions/runs/5002864894/jobs/8963355031 , perhaps we need to specify the version of kramdown?

@brockfanning
Copy link
Copy Markdown
Contributor Author

brockfanning commented May 17, 2023

@sarah-beasley Ah, I think we also need to specify the version of Jekyll. Can you try changing the Gemfile line about Jekyll to this?

gem "jekyll", "3.9.3"

@sarah-beasley
Copy link
Copy Markdown

thanks @brockfanning that seems to have worked! fb here if you're interested

Copy link
Copy Markdown

@sarah-beasley sarah-beasley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this worked when testing on UK site when additional lines of code were included in the gemfile

@brockfanning brockfanning merged commit 77c4601 into 2.3.0-dev May 17, 2023
@brockfanning brockfanning deleted the ruby-3-support branch May 17, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants