I am encountering a FrozenError when attempting to run pod set up with CocoaPods 1.16.2. The error happens in the course of the execution of the colored2 gem, particularly within the ascii_decorator.rb file. The error message is as follows:
/Customers/native/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2/ascii_decorator.rb:67:in `adorn': cannot modify frozen String: "" (FrozenError)
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2.rb:26:in `surround_with_color'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2.rb:62:in `block (3 ranges) in included'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface/error_report.rb:14:in `report'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:66:in `report_error'
from /Customers/native/.rvm/rubies/ruby-3.2.0/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:396:in `handle_exception'
from /Customers/native/.rvm/rubies/ruby-3.2.0/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:337:in `rescue in run'
from /Customers/native/.rvm/rubies/ruby-3.2.0/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:324:in `run'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in `run'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/bin/pod:55:in `<high (required)>'
from /Customers/native/.rvm/gems/ruby-3.2.0/bin/pod:25:in `load'
from /Customers/native/.rvm/gems/ruby-3.2.0/bin/pod:25:in `<essential>'
from /Customers/native/.rvm/gems/ruby-3.2.0/bin/ruby_executable_hooks:22:in `eval'
from /Customers/native/.rvm/gems/ruby-3.2.0/bin/ruby_executable_hooks:22:in `<essential>'
/Customers/native/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2/ascii_decorator.rb:67:in `adorn': cannot modify frozen String: "" (FrozenError)
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2.rb:26:in `surround_with_color'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2.rb:51:in `block (3 ranges) in included'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/validator.rb:131:in `validate'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/external_sources/abstract_external_source.rb:191:in `block in validate_podspec'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/config.rb:41:in `with_changes'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/external_sources/abstract_external_source.rb:190:in `validate_podspec'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/external_sources/abstract_external_source.rb:178:in `store_podspec'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/external_sources/path_source.rb:17:in `block in fetch'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in `part'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:997:in `fetch_external_source'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:976:in `block (2 ranges) in fetch_external_sources'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:975:in `every'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:975:in `block in fetch_external_sources'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in `part'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:974:in `fetch_external_sources'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:118:in `analyze'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:422:in `analyze'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in `part'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:162:in `set up!'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/command/set up.rb:52:in `run'
from /Customers/native/.rvm/rubies/ruby-3.2.0/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in `run'
from /Customers/native/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/bin/pod:55:in `<high (required)>'
from /Customers/native/.rvm/gems/ruby-3.2.0/bin/pod:25:in `load'
from /Customers/native/.rvm/gems/ruby-3.2.0/bin/pod:25:in `<essential>'
from /Customers/native/.rvm/gems/ruby-3.2.0/bin/ruby_executable_hooks:22:in `eval'
from /Customers/native/.rvm/gems/ruby-3.2.0/bin/ruby_executable_hooks:22:in `<essential>'
Steps to breed:
I’m utilizing Ruby 3.2.0 and CocoaPods 1.16.2.
I run the command pod set up on my undertaking.
The error occurs in the course of the set up course of.
What I’ve tried:
I attempted uninstalling and reinstalling the colored2 gem.
I tried updating CocoaPods to the most recent model, however the challenge persists.
I attempted clearing the CocoaPods cache (pod cache clear –all), however that didn’t assist.
System Info:
Ruby model: 3.2.0 (put in through RVM)
CocoaPods model: 1.16.2
colored2 gem model: 3.1.2
macOS model: 14.6.1 (23G93)
Can anybody assist me perceive why this error happens, and the way I can resolve it?
Thanks!