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

Add Rails 7.0 and 7.1 to the test matrix #344

Merged
merged 7 commits into from
Oct 18, 2023
Merged

Add Rails 7.0 and 7.1 to the test matrix #344

merged 7 commits into from
Oct 18, 2023

Conversation

pkuczynski
Copy link
Member

No description provided.

@pkuczynski pkuczynski changed the title Add Rails 7 to the tested matrix Add Rails 7 to the test matrix Oct 4, 2023
@sinsoku
Copy link

sinsoku commented Oct 5, 2023

When I tried to run on this branch, I got the following error

$ bundle exec appraisal rails-7.0 rake spec

NoMethodError: undefined method `assets' for #<Rails::Application::Configuration
  undefined method `assets' for #<Rails::Application::Configuration

This is caused by the removal of sprockets-rails from the rails gem dependencies in Rails v7.0.
refs: rails/rails@fb1ab34

I was able to fix the error by adding sprockets-rails to gemfiles.

diff --git gemfiles/rails_7.0.gemfile gemfiles/rails_7.0.gemfile
index b660fa2..135ccae 100644
--- gemfiles/rails_7.0.gemfile
+++ gemfiles/rails_7.0.gemfile
@@ -8,5 +8,6 @@ gem "rails", "7.0.8"
 gem "rspec-rails", "~> 6.0.3"
 gem "sqlite3", "~> 1.6.4", platform: :ruby
 gem "psych", ">= 4"
+gem "sprockets-rails"

 gemspec path: "... /"
diff --git gemfiles/rails_7.1.gemfile gemfiles/rails_7.1.gemfile
index aa7a990..02b4824 100644
--- gemfiles/rails_7.1.gemfile
+++ gemfiles/rails_7.1.gemfile
@@ -8,5 +8,6 @@ gem "rails", "7.1.0.rc2"
 gem "rspec-rails", "~> 6.0.3"
 gem "sqlite3", "~> 1.6.6", platform: :ruby
 gem "psych", ">= 4"
+gem "sprockets-rails"

 gemspec path: ". /"

@pkuczynski
Copy link
Member Author

That helped indeed! Thank you @sinsoku Now I only have errors in jruby and truffleruby. Any suggestions on how to fix them?

@pkuczynski pkuczynski changed the title Add Rails 7 to the test matrix Add Rails 7.0 and 7.1 to the test matrix Oct 8, 2023
@sinsoku
Copy link

sinsoku commented Oct 10, 2023

I'm not familiar with jruby and truffleruby, so I can't seem to help.

Since jruby and truffleruby tests are not executed in rails/rails CI, it seems difficult to support them.

activerecord-jdbc-adapter has only been tested with "7-0-stable" and does not yet seem to support Rails v7.1.

@yahonda
Copy link

yahonda commented Oct 17, 2023

This RegexpError looks reported at oracle/truffleruby#3287

@hsbt
Copy link

hsbt commented Oct 17, 2023

@eregon @headius Can you look this? JRuby and TruffleRuby block Rails 7.1 support of config gem.

@eregon
Copy link

eregon commented Oct 17, 2023

I think a practical workaround for now is to change https://github.com/rubyconfig/config/pull/344/files#diff-635b20966b1d2fea76ee0565254eab939d55f6d22e3c4727cf9d453f589b87a0R30 to just if RUBY_ENGINE == 'ruby' && RUBY_VERSION >= '2.7' and skip Rails 7.0/7.1 on jruby & truffleruby.

Also in CI I noticed that jruby & truffleruby fail on Rails 7.0, but they might be fine with 7.1, so could you try running 7.0 only on CRuby and 7.1 on everything?

This RegexpError looks reported at oracle/truffleruby#3287

Indeed, that should get fixed soon on truffleruby-head, @nirvdrum is working on a fix for that.

@headius
Copy link

headius commented Oct 17, 2023

There should be no language issues supporting Rails 7.1, but we are in progress updating the adapters right now.

@headius
Copy link

headius commented Oct 17, 2023

FYI master of activerecord-jdbc-adapter has a few small updates to get a SQLite specs running again but a full update for 7.1 will take a bit longer.

@pkuczynski
Copy link
Member Author

Also in CI I noticed that jruby & truffleruby fail on Rails 7.0, but they might be fine with 7.1, so could you try running 7.0 only on CRuby and 7.1 on everything?

Tried and failed: https://github.com/rubyconfig/config/actions/runs/6566111630?pr=344

I will temporarily skip testing rails-7 on jruby and truffle ruby. Can you let me know when issues gets fixed, so I will re-enable?

@pkuczynski pkuczynski merged commit 432a6a0 into master Oct 18, 2023
7 checks passed
@pkuczynski pkuczynski deleted the rails-7 branch October 18, 2023 21:28
@pkuczynski
Copy link
Member Author

@eregon @headius I made a sparate PR #345 enabling truffleruby and jruby, so I won't forget it. Please let me know when I can test again...

@pkuczynski pkuczynski added this to the 5.0.0 milestone Dec 18, 2023
@pkuczynski pkuczynski self-assigned this Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants