Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapod : warning: URI.escape is obsolete

/Users/mike/.rvm/gems/ruby-2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete

like image 758
Mujahed Ansari Avatar asked Apr 20 '20 13:04

Mujahed Ansari


People also ask

What happened to Uri escape and Uri encode?

Ruby 2.7.0 shows a warning when invoking URI.escape or its alias, URI.encode. It might look like a fresh deprecation, but the fact is, these methods have been marked as obsolete for… over 10 years now!

What happened to uriuri escape?

URI.escape is obsolete. Percent-encoding your query string Have you encountered one of those warnings in your Ruby 2.7.0 project? Find out how to fix it! Ruby 2.7.0 shows a warning when invoking URI.escape or its alias, URI.encode.

Is your query string’s escape code obsolete?

URI.escape is obsolete. Percent-encoding your query string URI.escape is obsolete. Percent-encoding your query string Have you encountered one of those warnings in your Ruby 2.7.0 project? Find out how to fix it! Ruby 2.7.0 shows a warning when invoking URI.escape or its alias, URI.encode.


Video Answer


2 Answers

Looks like the upcoming CocoaPods 1.10.0 will remove the deprecation warnings. See https://github.com/CocoaPods/CocoaPods/issues/9491. In the mean time, I wouldn't worry about it. These are just warnings and shouldn't currently cause any issues.

If you really want to remove the warnings you can disable all Ruby warnings using the RUBYOPT environment variable like this:

export RUBYOPT='-W0'

Although I wouldn't recommend it as you risk missing something important in the future.

like image 170
Charles Harley Avatar answered Sep 19 '22 18:09

Charles Harley


upgrading ruby to 2.7.2 and reinstall cocoapods 1.10.0 can fix

brew upgrade ruby
gem install cocoapods
like image 21
bl tang Avatar answered Sep 22 '22 18:09

bl tang