-
Notifications
You must be signed in to change notification settings - Fork 160
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
enable rails 7.1 compatibility for buildpack #925
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails 7.1 removed `bundle exec rake secret` rails 7.0 contains both `rake secret` and `rails secret` ``` ❯ bundle exec rake secret 7f0aea7a13fe04e7b00490ccee27efda75ca8862f1991c3235b161188e9b58620afae253ba7394faddc92439ebcdeec222e086b67b93f5252fbd389264890aa9 ❯ bundle exec rails secret afa3a40584e6d173931692d721b5f34b80e524d951fdd97409103f339e77fdc66059177fe40f457c9c1f3b8919d02aca343dc5ac1e561cc42cd84b2fa10a3660 ❯ bundle exec rails --version Rails 7.0.1 ``` ---- ``` ❯ bundle exec rake secret rake aborted! Don't know how to build task 'secret' (See the list of available tasks with `rake --tasks`) /nix/store/swaznx77b459sc46zavsahp1j8ahs9d4-my-rails-app-ruby-env/lib/ruby/gems/3.2.0/gems/rake-13.2.0/exe/rake:27:in `<top (required)>' /nix/store/ircaz84b1631bxdw4bnn6bzkmp02l0np-bundler-2.5.6/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `load' /nix/store/ircaz84b1631bxdw4bnn6bzkmp02l0np-bundler-2.5.6/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `kernel_load' /nix/store/ircaz84b1631bxdw4bnn6bzkmp02l0np-bundler-2.5.6/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:23:in `run' /nix/store/ircaz84b1631bxdw4bnn6bzkmp02l0np-bundler-2.5.6/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/cli.rb:451:in `exec' /nix/store/ircaz84b1631bxdw4bnn6bzkmp02l0np-bundler-2.5.6/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run' /nix/store/ircaz84b1631bxdw4bnn6bzkmp02l0np-bundler-2.5.6/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' /nix/store/ircaz84b1631bxdw4bnn6bzkmp02l0np-bundler-2.5.6/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch' /nix/store/ircaz84b1631bxdw4bnn6bzkmp02l0np-bundler-2.5.6/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/cli.rb:34:in `dispatch' /nix/store/ircaz84b1631bxdw4bnn6bzkmp02l0np-bundler-2.5.6/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start' /nix/store/ircaz84b1631bxdw4bnn6bzkmp02l0np-bundler-2.5.6/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/cli.rb:28:in `start' /nix/store/swaznx77b459sc46zavsahp1j8ahs9d4-my-rails-app-ruby-env/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/exe/bundle:28:in `block in <top (required)>' /nix/store/ircaz84b1631bxdw4bnn6bzkmp02l0np-bundler-2.5.6/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors' /nix/store/swaznx77b459sc46zavsahp1j8ahs9d4-my-rails-app-ruby-env/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/exe/bundle:20:in `<top (required)>' /nix/store/xqpfpk00g4n7wc6rdc6jjq23awrb5gkf-ruby-3.2.3/bin/bundle:25:in `load' /nix/store/xqpfpk00g4n7wc6rdc6jjq23awrb5gkf-ruby-3.2.3/bin/bundle:25:in `<main>' (See full trace by running task with --trace) ❯ bundle exec rails secret 92c69dcca516c685e1af2c5a744239cf4819957030fee5ab0918295be91aed0e8b215b996eee9253d6cb5fbe451d07bc4fa5e00f845190524ff3afa6985331b3 ❯ bundle exec rails version Rails 7.1.0 ``` conditionally run the right command depending on the rails version detected.
sophiewigmore
approved these changes
Apr 10, 2024
this change makes sense to me. I'd love to see a Rails 7.1 integration test added so we know its now definitely supported, but I'm happy to help with that if needed |
this test hopes to ensure that rails 7.1 apps will succesfully stage instead of failing with: ``` rake aborted! Don't know how to build task 'secret' (See the list of available tasks with `rake --tasks`) ```
I added a test based on the rails6 stuff I found. Best I could come up with is checking that we see no failure involving |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
should fix #865
rails 7.1 removed
bundle exec rake secret
rails 7.0 contains both
rake secret
andrails secret
conditionally run the right command depending on the rails version detected.
Thanks for contributing to the buildpack. To speed up the process of reviewing your pull request please provide us with:
A short explanation of the proposed change:
An explanation of the use cases your change solves
I have viewed signed and have submitted the Contributor License Agreement
I have made this pull request to the
develop
branchI have added an integration test
Didn't add an integration test but I did update existing units to check that
rails secret
command is called if rails 7 is detected.