cocoapods's version is 1.11.3 and I want to downgrade with 1.11.2 - cocoapods

terminal image
Now, cocoapods's version is 1.11.3 and I want to downgrade with 1.11.2
I used these code to downGrade xcode version.
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.11.2
However, If I used this code, still cocoapods's version is 1.11.3
pod --version
I want to know what should I do now...
Now, cocoapods's version is 1.11.3 and I want to downgrade with 1.11.2 !
Please help me..

Related

KMM with CocoaPods. Error: cocoapods-generate requires CocoaPods >= 1.5.0

I'm trying to add a simple CocoaPods dependency to a test kmm project as explained in this tutorial
Unfortunately, I'm getting this error
Executing of 'pod gen --platforms=ios --gen-directory=/Users/par/code/my/MyApplication/shared/build/cocoapods/synthetic/IOS --sources=https://cdn.cocoapods.org /Users/par/code/my/MyApplication/shared/shared.podspec' failed with code 1 and message:
[!] cocoapods-generate requires CocoaPods >= 1.5.0
How to fix this error?
My setup
cocoapods version: 1.11.2
cocoapods-generate version: 1.4.1
Mac OS Big Sur 11.6
It looks like the version of cocoapods-generate is obsolete. The latest version of the script is 2.2.2
No matter how hard I've tried, I was not able to upgrade cocoapods-generate past 1.4.1
I'm installing it with this command
sudo gem install cocoapods-generate
I have found this piece of info in this issue
The underlying error is that cocoapods-generate at version 2.2.1 cannot be installed on ruby 3, because it depends on cocoapods-disable-podfile-validations ~> 0.1.1,and the only version of cocoapods-disable-podfile-validations satisfying that (0.1.1) needs ruby ~> 2.1.
Have no idea how to solve this puzzle.
Solved this by downgrading ruby to 2.6
brew install rvm
curl -sSL https://get.rvm.io | bash
rvm install ruby-2.6.0
had to run this:
gem install cocoapods-generate

cocoapods installtion on macos-catalina

!] Xcode - develop for iOS and macOS (Xcode 12.4)
✗ CocoaPods installed but not working.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is
different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods.
To re-install see
https://guides.cocoapods.org/using/getting-started.html#installation for
instructions.
cocoapods 1.11.2 is already installed and up-to-date.
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]

Bundler could not find compatible versions for gem "bundler", but gem list does not have the version that it says is installed

I'm using rbenv, ruby 2.6.5, and attempting to use bundler 2.0.2. Currently when I run gem list, bundler 2.0.2 is the only version shown on the screen. However, when I run bundle install in my project, an error is thrown stating that my current bundler version is 2.1.2. If I run bundler version in the shell, it indeed says 2.1.2. Where can I find this version and eliminate it?
Thanks,
Ed
Uninstall all versions of bundler with gem uninstall bundler and install the version you need again.

Cocoapods points to wrong version

I had some problems with one version of the project. I've found this answer where someone suggest steps to remove all cocoapods-connected stuff from the machine and reinstall it. I did follow the steps:
$ 'pod --version'
0.36.1
$ gem list --local | grep cocoapods
cocoapods (0.39.0.rc.1, 0.38.2, 0.38.1, 0.37.2)
cocoapods-core (0.39.0.rc.1, 0.38.2, 0.38.1, 0.37.2)
cocoapods-downloader (0.9.3, 0.9.1)
cocoapods-plugins (0.4.2)
cocoapods-search (0.1.0)
cocoapods-stats (0.6.2, 0.5.3)
cocoapods-trunk (0.6.4, 0.6.1)
cocoapods-try (0.5.1, 0.4.5)
$ gem uninstall cocoapods // and all others from the list above
The problem is that when i again grep all cocoapods, the list was equal to upper one, nothing disappeared.
$ sudo gem uninstall cocoapods
Select gem to uninstall:
1. cocoapods-0.37.2
2. cocoapods-0.38.1
3. cocoapods-0.38.2
4. cocoapods-0.39.0.rc.1
5. All versions
> 5
$ pod --version
// here was the error command not found, so everything fine
$ sudo gem install cocoapods
Fetching: cocoapods-0.38.2.gem (100%)
Successfully installed cocoapods-0.38.2
Parsing documentation for cocoapods-0.38.2
Installing ri documentation for cocoapods-0.38.2
Done installing documentation for cocoapods after 2 seconds
1 gem installed
$ pod --version
Could not find proper version of cocoapods (0.36.1) in any of the sources
Run `bundle install` to install missing gems.
But why does it want me to install 0.36.1? Anyway, as it asked, I did:
$bundle install
Installing cocoapods-core 0.36.1
Installing cocoapods-downloader 0.8.1
Installing cocoapods-plugins 0.4.1
Installing cocoapods-trunk 0.6.0
Installing cocoapods-try 0.4.3
Installing cocoapods 0.36.1
// Many "using" dependencies
So now when I run:
$ pod --version
0.36.1
And I'm stuck :) Why can't I have newest release version? Maybe pod --version points to the newest version of cocoapods-core instead of only cocoapods, so everything is ok and I have the correct version?
Check if you use Gemfile and there is specified the version of
cocoapods.
You can use specific version by pod *version* action. For example: pod _1.5.0.beta.1_ update or pod _1.5.0.beta.1_ install
For anyone coming to this in an attempt to update cocoapods. After doing all of the above I wasn't able to get this resolved. I then headed to the resolved answer and being unwilling to remove RVM, I tried to resolve this issue another way.
I found that my issue did indeed lie in my Gemfile.
First, run
gem install cocoapods to ensure you have the latest version, or whatever specified version you were looking for downloaded.
Second, ensure your projects Gemfile hasn't specified a cocoapods version number and instead simply specifies it as:
gem "cocoapods"
If yours doesn't, change this and run bundle update to regenerate the Gemfile.lock file and your problem should be solved. If not, go ahead and delete the Gemfile.lock file altogether and then run bundle update. You can easily check to see which gem version will be loaded by opening the Gemfile.lock file and searching for cocoapods-core <version number here>
At this point, you can go into your project and run
pod setup
and then check the cocoapods version with
pod --version
and now FINALLY you are free to run
pod install
to replace the Podfile.lock file and get back to your happy dev life. Hope that helps someone and saves them from burning hours.
It seems something got messed up in my ruby version. I still have no idea what and why. I've managed to fix it via this solution: https://stackoverflow.com/a/25021772/849616. After it everything works correctly.
You might face this issue when it comes migrating to a higher Swift version. Assuming that you already have cocoapods installed, you probably need to run bundle update command (possibly with sudo).
For more details, you could check: https://guides.cocoapods.org/using/a-gemfile.html
Additionally, I'd suggest to do the following:
Install the latest Xcode version.
Clear derived data (not just clean project) in your project.
Run pod update command.
I have the same problem.
In my project, pod --version and gem which cocoapods always return diffrence version.
All I had to do is remove Gemfile.lock in my project and bundle install again. It removed the locked cocoapods version and install a new one.
Hope that helps some one here.
I ran pod install and I've got this error:
Could not find proper version of cocoapods (1.11.3) in any of the sources
and I ran:
bundle install
after that pod install worked properly

How do you downgrade rubygems?

I have rubygems 1.3.1 installed but I want to go back to 1.2.0. What's the command to downgrade rubygems?
This worked for me when downgrading from 1.5.2 to 1.4.2 because of old rails version:
sudo gem update --system 1.4.2
More information about downgrading/upgrading rubygems: https://github.com/rubygems/rubygems/blob/master/UPGRADING.md
Updated November 2011: Now that RVM's out, try running rvm install rubygems <version>.
If you're using RVM, then you can do this to remove current ruby gems, then upgrade/downgrade rubygems:
rvm install rubygems 1.4.2
This just worked for me on OSX to get from 1.5.0 back to 1.4.2
sudo gem uninstall -v '1.5.0' rubygems-update
sudo gem update --system --local
I had a similar problem in an old Rails 3 stack. When these type of issues occur, my recommendation is to go onto the production server that the application is currently running in and check out which rubygems version it is using:
gem -v
For me, it was using 1.8.24. So all I needed to do is downgrade my current rubygems which was generated from "rvm install 1.9.3", when I installed the old ruby for this app. I ran the following command:
$ rvm install rubygems 1.8.24 --force
And it worked. Note I am running Ubuntu 14.04 and the server I am using is also Ubuntu.
I used this command to go back to the gem version that my ruby version needed:
rvm rubygems current
If it gives checksum errors try
rvm rubygems current --verify-downloads 1
That did the trick for me.

Resources