Skip to content

Upgrade to Rails 8.1#4685

Open
CloCkWeRX wants to merge 9 commits into
devfrom
upgrade-rails-8-1-6701561825519178668
Open

Upgrade to Rails 8.1#4685
CloCkWeRX wants to merge 9 commits into
devfrom
upgrade-rails-8-1-6701561825519178668

Conversation

@CloCkWeRX

@CloCkWeRX CloCkWeRX commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

This PR upgrades the application from Rails 8.0 to Rails 8.1.3.

Key changes include:

  • Updating the Rails version and default configurations.
  • Addressing Rails 8.1-specific deprecations and breaking changes (e.g., render plain:, stricter routing arguments).
  • Implementing a patch for jsonapi-resources to resolve a routing initialization conflict in Rails 8.1.
  • Adding mandatory framework migrations for Active Storage.

PR created automatically by Jules for task 6701561825519178668 started by @CloCkWeRX

- Update rails gem to ~> 8.1.0
- Set config.load_defaults 8.1 in application.rb
- Add gem 'csv' for Ruby 3.4+ compatibility
- Replace deprecated 'render text:' with 'render plain:' in PagesController
- Add compatibility patch for jsonapi-resources routing in Rails 8.1
- Add compatibility patch for Faraday 2.x error constants
- Add Searchkick test stubs for environments without Elasticsearch
- Include required Active Storage update migrations

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@CloCkWeRX

Copy link
Copy Markdown
Collaborator Author

@jules fix

     # NoMethodError:
     #   undefined method 'total_pages' for an instance of Array
     #   ./app/views/crops/index.html.haml:16:in '_app_views_crops_index_html_haml__1843197251181771925_73416'

@CloCkWeRX

Copy link
Copy Markdown
Collaborator Author

@jules fix ``` 1) CropSearchService search with some crops finds by alternate names
Failure/Error: expect(search('fungus')).to eq ['mushroom']

   expected: ["mushroom"]
        got: []

   (compared using ==)
 # ./spec/services/crop_search_service_spec.rb:105:in 'block (4 levels) in <top (required)>'```

Comment thread config/initializers/jsonapi_resources_patch.rb
Comment thread Gemfile.lock Outdated
Comment thread Gemfile.lock Outdated
Comment thread Gemfile.lock Outdated
Comment thread Gemfile.lock Outdated
Comment thread Gemfile.lock Outdated
Comment thread Gemfile.lock Outdated
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
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.

1 participant