cocoapods plugin for the asdf version manager.
bash
,curl
,tar
: generic POSIX utilities.- Ruby (>= 1.9)
- RubyGems: manage Ruby packages.
- Bundler: make downloaded cocoapods binary executable.
Use Ruby and Bundler installed via asdf.
Plugin:
asdf plugin add cocoapods
# or
asdf plugin add cocoapods https://github.com/ronnnnn/asdf-cocoapods.git
cocoapods:
# Show all installable versions
asdf list-all cocoapods
# Install specific version
asdf install cocoapods latest
# Set a version globally (on your ~/.tool-versions file)
asdf global cocoapods latest
# Now cocoapods commands are available
pod --version
Check asdf readme for more instructions on how to install & manage versions.
If you encounter errors like the following after updating your Ruby version and running pod
, it's likely due to a dependency mismatch:
~/.asdf/installs/cocoapods/1.15.2/vendor/bundle/ruby/3.3.0/gems/bigdecimal-3.1.4/lib/bigdecimal.rb:4:in `require': linked to incompatible ~/.asdf/installs/ruby/3.3.3/lib/libruby.3.3.dylib - ~/.asdf/installs/cocoapods/1.15.2/vendor/bundle/ruby/3.3.0/gems/bigdecimal-3.1.4/lib/bigdecimal.bundle (LoadError)
CocoaPods uses Bundler to manage its dependencies. When you change Ruby versions, you need to redownload these dependencies to ensure compatibility.
- Set global Ruby version to your project's Ruby version:
asdf global ruby {version} # Replace {version} with your project's Ruby version
- Navigate to your CocoaPods installation directory:
cd ~/.asdf/installs/cocoapods/{version} # Replace {version} with your installed version
- Redownload and reinstall the dependencies:
bundle install --redownload
Now you should be able to run pod
commands without errors.
If you still encounter issues, try reinstalling Ruby, Bundler, and CocoaPods. See also: #7 (comment)
Contributions of any kind welcome! See the contributing guide.
Thanks goes to these contributors!
See LICENSE © Seiya Kokushi