skip to Main Content

I have updated Mac Operating system in my MacBook Pro with the new version. After updating Pod init is not working.

I am using Version 13.0 (22A380) Ventura [15-inch, 2019] model. Please help me to get it done. Below I am getting the following error

Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String (FrozenError)
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `report'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in `report_error'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    from /usr/local/bin/pod:23:in `load'
    from /usr/local/bin/pod:23:in `<main>'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file': [Xcodeproj] Unknown object version (56). (RuntimeError)
    from /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/init.rb:41:in `validate!'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:333:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    from /usr/local/bin/pod:23:in `load'
    from /usr/local/bin/pod:23:in `<main>'

When I am trying to run the above command. Then I am getting the following error.

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

If I am trying for the permission for the above folder then I am getting the following error.

Command : chmod ugo+rwx /Library/Ruby/Gems/2.6.0

Result

chmod: Unable to change file mode on /Library/Ruby/Gems/2.6.0: Operation not permitted

4

Answers


  1. It seems that you use your system ruby. Try to avoid that and install rbenv or rvm to manage your ruby versions. For further information why you should not use system ruby see:
    https://mac.install.guide/faq/do-not-use-mac-system-ruby/index.html

    Login or Signup to reply.
  2. This work for me after updating to macOS 13.0:

    1. Install home-brew

      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    2. Install cocoa pods

      brew install –cask cocoapods

    3. Then this:

      pod setup –verbose

    Login or Signup to reply.
  3. Open your project in Xcode, and under Project Document, change the Project Format into XCode13.0 compatible. Then close the project, and retry pod init.

    Login or Signup to reply.
  4. The error message "Unknown object version (56)" which means there is an incompatibility between the working gem and active one

    an step by step solution is:

    1. Open Terminal and go to the project folder which contains your .xcodeproj file
    2. Check the active Xcode path by running the command xcode-select -p in the terminal.
    3. Open the Xcode project file you are having issues with.
    4. If the project file opens successfully, navigate to the directory containing the Podfile in your project. (if you can’t find it "my Case" just ignore it and go to step 5)
    5. Run the command gem update xcodeproj to update the Xcodeproj gem to the latest version. if it has permission problem run it with sudo like: sudo gem update xcodeproj.
    6. Run the command pod install to install any necessary dependencies and update your project. (if you don’t have podfile in step 4, before running pod install you must use command pod init)
    7. done
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search