Skip to content

CI: Use rails as git gem with branch 5-2-stable in Gemfile-rails-5-2 to support Ruby 2.2.10 #54

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

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

olleolleolle
Copy link
Contributor

@olleolleolle olleolleolle commented Mar 26, 2020

This PR fixes the build (for Rails 5.2 with Ruby 2.2).

2.2.10 does not have safe navigation which is used in the published 5.2 gems.

Background

Example error message:

/home/travis/build/rails/rails-controller-testing/gemfiles/vendor/bundle/ruby/2.2.0/gems/actionpack-5.2.4.2/lib/action_dispatch/request/session.rb:96: syntax error, unexpected '.' (SyntaxError)
          id&.public_id
              ^

Using the safe-navigation-free 5-2-stable branch from git fixes it.

Rafael taught me this, in another repo. Thanks for that!

Solution

  • Use a git branch version supporting 2.2
  • Note: the other build errors are actual test failures

@olleolleolle olleolleolle changed the title CI: Gemfile-rails-5-2 uses 5-2-stable; supports 2.2.10 CI: Use rails as git gem with branch 5-2-stable in Gemfile-rails-5-2 to support Ruby 2.2.10 Mar 26, 2020
@olleolleolle
Copy link
Contributor Author

@kaspth Thanks for taking a look!

I changed from tag (misleading) to branch (correct).

@kaspth kaspth merged commit d9d634a into rails:master Mar 26, 2020
@kaspth
Copy link
Contributor

kaspth commented Mar 26, 2020

Thank you ✨

@olleolleolle olleolleolle deleted the build-on-2-2-10 branch March 26, 2020 20:54
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