-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Test against rails 8.0 #3702
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
Test against rails 8.0 #3702
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f91da5e
test against rails 8.0
jewilmeer a7f418b
allow rails 8
jewilmeer bee3539
Require more recent version of sqlite for rails 8
jewilmeer 4c56c7b
Upgrade required sqlite version to 2.2, fix json spec
jewilmeer 6c14945
Make sure the dummy uses sqlite3 2.2 as well
jewilmeer e8dfabb
Only upgrade sqlite3 for rails 8
jewilmeer 3e3cde9
Don't use the newer version of sqlite in the dummy app
jewilmeer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # This file was generated by Appraisal | ||
|
|
||
| source "https://rubygems.org" | ||
|
|
||
| gem "appraisal", ">= 2.0" | ||
| gem "devise", "~> 4.7" | ||
| gem "net-smtp", require: false | ||
| gem "rails", "~> 8.0.0" | ||
| gem "sassc-rails", "~> 2.1" | ||
| gem "turbo-rails" | ||
| gem "vite_rails", require: false | ||
| gem "webpacker", require: false | ||
| gem "webrick" | ||
| gem "importmap-rails", require: false | ||
|
|
||
| group :development, :test do | ||
| gem "pry", ">= 0.9" | ||
| end | ||
|
|
||
| group :test do | ||
| gem "cancancan", "~> 3.0" | ||
| gem "carrierwave", [">= 2.0.0.rc", "< 3"] | ||
| gem "cuprite", "!= 0.15.1" | ||
| gem "database_cleaner-active_record", ">= 2.0", require: false | ||
| gem "dragonfly", "~> 1.0" | ||
| gem "factory_bot", ">= 4.2", "!= 6.4.5" | ||
| gem "generator_spec", ">= 0.8" | ||
| gem "kt-paperclip" | ||
| gem "launchy", ">= 2.2" | ||
| gem "mini_magick", ">= 3.4" | ||
| gem "pundit" | ||
| gem "rack-cache", require: "rack/cache" | ||
| gem "rspec-expectations", "!= 3.8.3" | ||
| gem "rspec-rails", ">= 4.0.0.beta2" | ||
| gem "rspec-retry" | ||
| gem "rubocop", ["~> 1.20", "!= 1.22.2"], require: false | ||
| gem "rubocop-performance", require: false | ||
| gem "shrine", "~> 3.0" | ||
| gem "simplecov", ">= 0.9", require: false | ||
| gem "simplecov-lcov", require: false | ||
| gem "timecop", ">= 0.5" | ||
| gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] | ||
| end | ||
|
|
||
| group :active_record do | ||
| gem "paper_trail", ">= 12.0" | ||
|
|
||
| platforms :ruby, :mswin, :mingw, :x64_mingw do | ||
| gem "mysql2", ">= 0.3.14" | ||
| gem "pg", ">= 1.0.0" | ||
| gem "sqlite3", "~> 1.3" | ||
| end | ||
| end | ||
|
|
||
| gemspec path: "../" | ||
This file contains hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From Rails 8.0, it looks like the version of sqlite3 needs to be upgraded to v2.1 or higher.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed, I upgraded it, and now it seems to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like sqlite3 2.2 requires ruby 3.1.
What would be the best approach? Require ruby 3.1 for the next release, or stay backwards compatible?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jewilmeer
Thank you for your support with Rails 8.0! It’s really helpful!
This might help you.
In RailsAdmin, we use
gem 'appraisal'to manage gems for each Rails version.https://github.com/thoughtbot/appraisal?tab=readme-ov-file#setup
For versions other than Rails 8.0, there are no issues with the traditional gem versions, and no changes to Gemfile are necessary.
Instead, since bee3539#diff-4fc39a0aadaf0ef5048e145a93b08c08740e7efd36c6890426664cea221a622eR51 is explicitly mentioned, this alone should make the Rails 8.0 tests work.
This is just my opinion, but since Ruby 3.1 hasn't reached EOL yet, I think it's fine to include Ruby 3.1 in the next release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I've changed the Gemfile back to the older sqlite3 version, and in the appraisal file I've made an exception for rails 8