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

After upgrading to latest version of gems and cocoa pods can run any pod commands #12080

Closed
GerbenMol opened this issue Oct 5, 2023 · 13 comments

Comments

@GerbenMol
Copy link

GerbenMol commented Oct 5, 2023

What did you do?

try to run pod install

What did you expect to happen?

Install all pod dependencies correctly.

What happened instead?

I get the following error:

/usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.1.0/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 /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.1.0/lib/active_support/core_ext/array/conversions.rb:8:in `<top (required)>'
	from <internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.13.0/lib/cocoapods.rb:9:in `<top (required)>'
	from <internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.13.0/bin/pod:36:in `<top (required)>'
	from /usr/local/bin/pod:25:in `load'
	from /usr/local/bin/pod:25:in `<main>'

CocoaPods Environment

when trying pod env, i get the same error

@RalfK92
Copy link

RalfK92 commented Oct 5, 2023

Had the same issue.
Downgrading activesupport to v 7.0.8 resolved the issue on my side.

@mastef
Copy link

mastef commented Oct 5, 2023

Getting suddenly the same - seems to be related to ActiveSupport 7.1.0 update which removed some deprecation stuff
https://github.com/rails/rails/blob/v7.1.0/activesupport/CHANGELOG.md

image

@andyshephard
Copy link

andyshephard commented Oct 5, 2023

Anybody that has the same problem, the answer was posted in a different issue: #12081 (comment)

WORKAROUND:
Add gem "activesupport", "= 7.0.8" to your Gemfile

@SubvertDev
Copy link

For those who tries to build Xcode project:
sudo gem uninstall activesupport
sudo gem install activesupport --version 7.0.8

@TwinklePatel3
Copy link

Add this line to Gemfile of your project folder
gem 'activesupport', '~> 7.0.8'
Then follow these steps:

  • cd iOS to navigate to the ios folder.
  • bundle install to install Bundler
  • bundle update activesupport to update version of active support
  • bundle exec pod installto install the iOS dependencies managed by CocoaPods.

@mamicicekel
Copy link

I am also encountering a similar error. It occurs when I create a React Native project. Following the steps above resolves the issue in only one project, but I keep encountering this error every time I create a new project.

Downloading template
✔ Copying template
✔ Processing template
✔ Installing Ruby Gems
✖ Installing CocoaPods dependencies (this may take a few minutes)
error bundler: failed to load command: pod (/Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/bin/pod)
/Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/gems/activesupport-7.1.0/lib/active_support/core_ext/array/conversions.rb:108:in <class:Array>': undefined method deprecator' for ActiveSupport:Module (NoMethodError)
Did you mean? deprecate_constant
from /Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/gems/activesupport-7.1.0/lib/active_support/core_ext/array/conversions.rb:8:in <top (required)>' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38:in require'
from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38:in require' from /Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.13.0/lib/cocoapods.rb:9:in <top (required)>'
from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38:in require' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38:in require'
from /Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.13.0/bin/pod:36:in <top (required)>' from /Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/bin/pod:25:in load'
from /Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/bin/pod:25:in <top (required)>' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:58:in load'
from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:58:in kernel_load' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:23:in run'
from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:492:in exec' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in run'
from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:392:in dispatch'
from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:34:in dispatch' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:485:in start'
from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:28:in start' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/exe/bundle:37:in block in <top (required)>'
from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/friendly_errors.rb:117:in with_friendly_errors' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/exe/bundle:29:in <top (required)>'
from /Users/muhammedcicekel/.rbenv/versions/2.7.6/bin/bundle:25:in load' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/bin/bundle:25:in

'
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/environment-setup?os=macos&platform=android and follow the React Native CLI QuickStart guide for macOS and iOS.

cocoapods: 1.13.0
ruby: 2.7.6
node: 18.18.0
npm: 9.8.1
Xcode: 15.0
macOS: 13.6-arm64

@antoniovuono
Copy link

I am also encountering a similar error. It occurs when I create a React Native project. Following the steps above resolves the issue in only one project, but I keep encountering this error every time I create a new project.

Downloading template ✔ Copying template ✔ Processing template ✔ Installing Ruby Gems ✖ Installing CocoaPods dependencies (this may take a few minutes) error bundler: failed to load command: pod (/Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/bin/pod) /Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/gems/activesupport-7.1.0/lib/active_support/core_ext/array/conversions.rb:108:in <class:Array>': undefined method deprecator' for ActiveSupport:Module (NoMethodError) Did you mean? deprecate_constant from /Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/gems/activesupport-7.1.0/lib/active_support/core_ext/array/conversions.rb:8:in <top (required)>' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38:in require' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38:in require' from /Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.13.0/lib/cocoapods.rb:9:in <top (required)>' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38:in require' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38:in require' from /Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.13.0/bin/pod:36:in <top (required)>' from /Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/bin/pod:25:in load' from /Users/muhammedcicekel/Develop/AwesomeProject/vendor/bundle/ruby/2.7.0/bin/pod:25:in <top (required)>' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:58:in load' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:58:in kernel_load' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:23:in run' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:492:in exec' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in run' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:392:in dispatch' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:34:in dispatch' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:485:in start' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:28:in start' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/exe/bundle:37:in block in <top (required)>' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/site_ruby/2.7.0/bundler/friendly_errors.rb:117:in with_friendly_errors' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/exe/bundle:29:in <top (required)>' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/bin/bundle:25:in load' from /Users/muhammedcicekel/.rbenv/versions/2.7.6/bin/bundle:25:in

'
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/environment-setup?os=macos&platform=android and follow the React Native CLI QuickStart guide for macOS and iOS.
cocoapods: 1.13.0 ruby: 2.7.6 node: 18.18.0 npm: 9.8.1 Xcode: 15.0 macOS: 13.6-arm64

I also started having this error creating a project. but when I run pod install on an existing project it also happens. I managed to solve it paleatively with the steps recommended above, I believe it will only stabilize once and for all when they resolve it and release a release of CocoaPods.

@amadzarak
Copy link

For those who tries to build Xcode project: sudo gem uninstall activesupport sudo gem install activesupport --version 7.0.8

Confirming this solutions works. I suggest everyone also uninstall cocoapods and active support -> then upgrade their ruby to 3.2.2 -> then install activesupport -> cocoapods.

@Jonathan0wh
Copy link

For those who tries to build Xcode project: sudo gem uninstall activesupport sudo gem install activesupport --version 7.0.8

Confirm this works. But it was because my company project requires pod 1.13.0 and ruby 2.7.6. It is still suggested to upgrade ruby to 3.x and upgrade cocoapod

@vallamost
Copy link

vallamost commented Oct 21, 2023

Wow, spent 4 hours troubleshooting this BS trying to get Flutter working correctly on OSX because of this dumb issue. The cocoapod install instructions are bad. There are so many inconsistencies on people saying to use sudo or not to use sudo when installing it. But the bigger issue was that I needed to use version 7.0.8 to get pass the ActiveSupport error with Ruby 3 on OSX Ventura.

@gaberogan
Copy link

gaberogan commented Nov 7, 2023

This appears to be still an issue, the solution proposed is a workaround but the CocoaPods team needs to pin their activesupport dependency to 7.0.8.

There is a limitation in the ruby bundler Gemfile where even if you pin gem "activesupport", "~> 7.0.8", if you had activesupport 7.1.1 installed previously it will not downgrade the version required by cocoapods and pod commands will still fail.

@paulb777
Copy link
Member

paulb777 commented Nov 7, 2023

The activesupport issue is addressed for me in CocoaPods 1.14.2 (corrected thanks to @gaberogan)

@gaberogan
Copy link

@paulb777 1.13.2 does not exist but I can confirm it is fixed in 1.14.2 🥳

Screenshot 2023-11-07 at 10 47 56 AM

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

No branches or pull requests