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
Ruby 2.7.0 warning: The called method `t' is defined here #516
Comments
Not enough information. https://github.com/ruby-i18n/i18n/blob/master/.github/ISSUE_TEMPLATE/bug_report.md |
This is a duplicate of #500. It was fixed in Rails 6.0.1: rails/rails@adef632#diff-cda406008ce3935156e8ba173b1e9837L85. There's nothing for you to do here. The error that ruby 2.7 outputs is quite terrible |
Hi there. I'm running Rails ~/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/i18n-1.8.2/lib/i18n.rb:195: warning: The called method `t' is defined here |
I am still receiving this as well:
|
I am not sure how to fix this one without changing the API of |
@jakehockey10 Under what circumstances are you seeing the message? What call specifically are you making in your Rails app to generate that message? |
@radar I still see this warning as well, but in my apps it seems to originate from the |
When I run `rails test`
…On Sun, May 31, 2020, 4:34 PM Mauricio Gomes ***@***.***> wrote:
@radar <https://github.com/radar> I still see this warning as well, but
in my apps it seems to originate from the mongoid gem. Specifically this
call:
https://github.com/mongodb/mongoid/blob/master/lib/mongoid/errors/mongoid_error.rb#L51
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#516 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4VR7VFH4VRARDNDN7SFLRULLQHANCNFSM4KOQ5LVA>
.
|
I am seeing this in regular application logs as well. |
@radar I can guarantee that it's due to dependencies unique to everyone's apps. I have 4 rails apps on ruby 2.7, neither having this problem. Two are 6.0.1 and two are are 6.0.3. The confusing error message leads users to think it's caused by your gem. |
I upgrade versions of faker or i18n, and the error disappeared. |
While running
I get the following message: While running
I get
|
@alecslupu: I’m going to need to see the line from the spec that is invoking i18n |
@radar, the project is open source : https://github.com/decidim/decidim/blob/develop/decidim-sortitions/spec/presenters/decidim/sortitions/admin_log/sortition_presenter_spec.rb#L6 the code you're interested in:
|
Here is another example of this issue: # Forward all arguments to I18n.t method
#
# @return [String] the translated string
# @see I18n
def t(*args)
I18n.send :t, *args
end I've opened a PR in that repo: bridgetownrb/bridgetown#615 |
Ruby version: 2.7.0
Rails version: 6.0.2.1
i18n version: 1.8.2
I get a message, please update for Ruby 2.7
Thanks.
The text was updated successfully, but these errors were encountered: