4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Flutter: `<class:Array>': undefined method `deprecator' for ActiveSupport:Module (NoMethodError)

Posted at

環境

  • Flutter: 3.13.2
  • Cocoapods: 1.13.0
  • activesupport: 7.1.1

問題

Flutterのバージョンをあげようとしたらエラーが出た。

$ pod --version
/Users/ucan/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/activesupport-7.1.1/lib/active_support/core_ext/array/conversions.rb:108:in `<class:Array>': undefined method `deprecator' for ActiveSupport:Module (NoMethodError)

  deprecate to_default_s: :to_s, deprecator: ActiveSupport.deprecator
                                                          ^^^^^^^^^^^
Did you mean?  deprecate_constant
	from /Users/ucan/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/activesupport-7.1.1/lib/active_support/core_ext/array/conversions.rb:8:in `<top (required)>'
	from <internal:/Users/ucan/.asdf/installs/ruby/3.2.0/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/Users/ucan/.asdf/installs/ruby/3.2.0/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /Users/ucan/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods.rb:9:in `<top (required)>'
	from <internal:/Users/ucan/.asdf/installs/ruby/3.2.0/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/Users/ucan/.asdf/installs/ruby/3.2.0/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /Users/ucan/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/bin/pod:36:in `<top (required)>'
	from /Users/ucan/.asdf/installs/ruby/3.2.0/bin/pod:25:in `load'
	from /Users/ucan/.asdf/installs/ruby/3.2.0/bin/pod:25:in `<main>'

IssueやPRを見るとバグを踏んだらしい。
まだリリースされてないけどPRはマージされてるのでCocoapodsn次のバージョンで解決しそう。

対策

$ gem install cocoapods -v 1.12.1
$ gem install activesupport -v 7.0.8
$ gem uninstall activesupport -v 7.1.1
$ pod --version
1.12.1

参考

4
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?