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

Resolve incompatibility with Rails 7.1. #64

Conversation

masamitsu-murase
Copy link
Contributor

solargraph-rails causes an error when a project users Rails 7.1. This is caused by the lack of "present?" method in schema.rb.

Details:

  • ActiveSupport does not guarantee providing "present?" method when a user requires 'active_support/core_ext/string/inflections'.
  • Therefore, I replace ns.namespace.present? with ns.namespace && !ns.namespace.empty?.
  • I also add require 'activesupport' to "solargraph-rails.rb" because a user should add require 'activesupport' even if he/she uses partial functions provided by ActiveSupport according to the following article.
    https://guides.rubyonrails.org/active_support_core_extensions.html

solargraph-rails causes an error when a project users Rails 7.1.
This is caused by the lack of "present?" method in schema.rb.

Details:
- ActiveSupport does not guarantee providing "present?" method when a
  user requires 'active_support/core_ext/string/inflections'.
- I replace "ns.namespace.present?" with "ns.namespace &&
  !ns.namespace.empty?".
- I also add "require 'activesupport' to "solargraph-rails.rb" because a
  user always need to add "require 'activesupport'" even if he/she uses
  partial functions provided by ActiveSupport according to the following
  article.
  https://guides.rubyonrails.org/active_support_core_extensions.html
@masamitsu-murase
Copy link
Contributor Author

This will resolve #60

@iftheshoefritz iftheshoefritz merged commit 2449b3d into iftheshoefritz:main Feb 22, 2024
@duduribeiro
Copy link

@iftheshoefritz is it possible to make a release with this PR?

@swrobel
Copy link

swrobel commented Apr 16, 2024

@iftheshoefritz ping! Could we please get a new release?

@masamitsu-murase
Copy link
Contributor Author

This is just for your information.
I have created a gem library to patch this issue temporarily.
I hope that it will help you.
https://github.com/masamitsu-murase/solargraph-rails-patch-for-rails71

@fatkodima
Copy link

@iftheshoefritz Can you release a new version?

@fatkodima
Copy link

@iftheshoefritz ping

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.

5 participants