Undefined method `deprecator' for ActiveSupport:Module (NoMethodError)

Hi All,

I am getting an error while I try to build my iOS app -
/Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/activesupport-7.1.3/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
^^^^^^^^^^^

How should I solve this issue? thanks

Hi @faisal.m.2,

Can you please enable support access on the repository and reach out to our support team and we will take a look:
https://support.bitrise.io/hc/en-us/requests/new

Done.

thanks

Hi @faisal.m.2 ,
The error you reported looks like an issue on cocoapod 1.13.0

Updating to 1.14.0+ should help solve the issue. Otherwise our colleagues will guide you through in the support ticket.

@silvercast.nguyen I am new in iOS development and Bitrise.
where should I change it? in my workflow file? or in POD file? Thanks

No worry @faisal.m.2 , cocoapod can be installed in different ways.

Thanks @silvercast.nguyen. However, we are using GUI version for Bitrise workflow configuration


And it uses a Bitrise provided step ā€œRun Cocopods Installā€ (where I am getting the error). I do not see any way to find Gemfile. And Bitrise should update the step. Or should I change anything in our POD file. Here is the error in text
ConfigsModel:

  • command: update
  • source_root_path: /Users/vagrant/git
  • podfile_path: PGAudioApp/Podfile
  • verbose: false
  • is_cache_disabled: false
    Using Podfile: /Users/vagrant/git/PGAudioApp/Podfile
    Determining required cocoapods version
    Searching for Podfile.lock
    Found Podfile.lock: /Users/vagrant/git/PGAudioApp/Podfile.lock
    Required CocoaPods version (from Podfile.lock): 1.12.1
    Searching for gem lockfile with cocoapods gem
    No gem lockfile with cocoapods gem found at:
    Using system installed CocoaPods version
    Check selected Ruby is installed
    Ruby 3.2.3 is installed
    Installing cocoapods
    Checking cocoapods 1.12.1 gem
    Installing
    $ gem ā€œinstallā€ ā€œcocoapodsā€ ā€œā€“no-documentā€ ā€œ-vā€ ā€œ1.12.1ā€
    $ rbenv ā€œrehashā€
    cocoapods version:
    $ pod ā€œ1.12.1ā€ ā€œā€“versionā€
    /Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/activesupport-7.1.3/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/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/activesupport-7.1.3/lib/active_support/core_ext/array/conversions.rb:8:in <top (required)>' from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in requireā€™
    from internal:/Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:86:in require' from /Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods.rb:9:in <top (required)>ā€™
    from internal:/Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:86:in require' from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in requireā€™
    from /Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/bin/pod:36:in <top (required)>' from /Users/vagrant/.asdf/installs/ruby/3.2/bin/pod:25:in loadā€™
    from /Users/vagrant/.asdf/installs/ruby/3.2/bin/pod:25:in `ā€™
    command failed, error: exit status 1

Can you check your Podfile and Podfile.lock? I found something interesting in your log

Using Podfile: /Users/vagrant/git/PGAudioApp/Podfile
Determining required cocoapods version
Searching for Podfile.lock
Found Podfile.lock: /Users/vagrant/git/PGAudioApp/Podfile.lock
Required CocoaPods version (from Podfile.lock): 1.12.1

It should point to newer CocoaPods version.

I changed cocopods version 1.14.0 and it solved

1 Like

Nice, Iā€™m glad that you are now unblocked. You are more than welcome to reach out to us whenever you need further support.

1 Like