Error for macos sierra install cocoapods - macos

When i install mac os sierra, trying install cocoapods, but appear error:
ERROR: While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
but i already installed openssl and ruby,i really don't know is why,does anyone know?

Install Cocoapods by below 3 commands
sudo gem update --system -n/usr/local/bin
sudo gem install -n /usr/local/bin cocoapods
pod setup

Related

LoadError - incompatible library version - /Users/user/gems/gems/ffi-1.13.1/lib/ffi_c.bundle

When I try to install modules using pod install command in directory ios of react native project, I get the following error:
LoadError - incompatible library version - /Users/user/gems/gems/ffi-1.13.1/lib/ffi_c.bundle
How can I fix it so that my command is executed successfully?
To solve this problem I tried to uninstall ffi-1.13.1 and tried to install versions ffi-1.13.0, ffi-1.12 and do the command pod install again. The same error was displayed.
Also issues were opened in Github repositories CocoaPods, React Native Mapbox
Use the below command
gem install ffi
This fixed the same issue in my system (Big Sur)
The error for me occured after changing/uninstalling my Ruby version.
Try this:
Install rvm (if you don't have it) \curl -sSL https://get.rvm.io | bash
install latest ruby (3.0.0p0) rvm install ruby#latest and set it as default rvm use ruby-3.0.0 --default
A few times install cocoapods gem install cocoapods
pod install

Unknown command: `repo-art` Cocoapods

I have installed the Cocoapods-art in the bundle using this command:
bundle exec gem install cocoapods-art
This is the success message:
Fetching cocoapods-art-1.0.4.gem
Successfully installed cocoapods-art-1.0.4
Parsing documentation for cocoapods-art-1.0.4
Done installing documentation for cocoapods-art after 0 seconds
1 gem installed
when I execute: bundle exec gem list, I don't see Cocoapods repo-art in the gem list.
When I try to add: pod repo-art add folderNamer, I get:
[!] Unknown command: `repo-art`
Did you mean: repo?
My problem was:
Installing cocoapods by gem in MacOS Catalina + Xcode 12.2, I got the error:
You have to install development tools first
...
checking for ffi.h... * extconf.rb failed *
Then I installed the cocoapods (1.10.1) by homebrew
brew install cocoapods
And the cocoapods-art was installed with gem
gem install cocoapods-art
At that moment, I was with the same error.
For me, its finally worked removing and installing again the cocoapods-art with sudo.
This troubleshooting - https://developer.apple.com/forums/thread/668456 don't resolving to use the last version of cocoapods ;)
I was getting same error with gem install cocoapods-art. Then I used the command sudo gem install cocoapods-art and it worked :)

Error occured while installing unf_ext (0.0.7.4), and Bundler cannot continue

My ultimate goal is to get this to work in an Ubuntu 14.04 Docker container: https://github.com/byalextran/autoluv
When I run
m1#9bdc67007b49:~/autoluv$ bundle install --deployment
It says:
Fetching unf_ext 0.0.7.4
Installing unf_ext 0.0.7.4 with native extensions
Errno::EACCES: Permission denied # rb_sysopen - /home/m1/autoluv/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/.document
An error occurred while installing unf_ext (0.0.7.4), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/'` succeeds before bundling.
But when I run
sudo gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/'
unf_ext-0.0.7.4 installs fine?
Building native extensions. This could take a while...
Successfully installed unf_ext-0.0.7.4
1 gem installed
Installing ri documentation for unf_ext-0.0.7.4...
Installing RDoc documentation for unf_ext-0.0.7.4...
I cannot figure out the next step. I've tried installing ruby-dev and gcc, but neither has helped move this along :(
Any and all help is much appreciated!
I had this same problem and the reason was that I did not installed all the dependencies that bundler needs to run
just try to:
sudo apt-get install build-essential
then run again
gem install bundler
and lastly
bundler
There is a difference between running commands with sudo and without. You can get more info about this command here https://kb.iu.edu/d/amyi.
Errno::EACCES usually happens when bunder has no access to a needed folder or it doesn't exist.
Try to gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/' without sudo.
I had same issue on Fedora.
I simply had to install the gcc-c++ package.
I solved this error on Debian 10 buster in my ChromeOS Linux container by installing rbenv: sudo aptitude install rbenv or sudo apt install rbenv.
Aptitude package manager seems to be better at resolving dependencies and allowing me to install newer packages more easily than the default apt so I thought it was worth mentioning.
Solved it after using following commands for Xcode 13, BigSur :
softwareupdate --install a
sudo port upgrade outdated
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install wget
brew install build-essentials
bundler install
If you are an iOS developer who is getting this error, this might be related to your Xcode command line tools selection.
Just run the following command with the path of the Xcode that you are using currently.
sudo xcode-select --switch /Applications/Xcode.app
You need to use the latest version of Ruby.
If you are using MacOS, system Ruby is old and outdated. you can not update the system Ruby, but you can install another version of Ruby and make it default global using rbenv ruby version manager tool.
finally you can install any ruby packages you like.

Ruby gems. Unable to add sources

I had this problem "https://stackoverflow.com/questions/19612185/unable-to-install-cocoapods-gem-from-rubygems-org-bad-response-backend-read-e" and as one of the solutions said I tried to remove/add rubygem sources. It was removed without problem, but when I tried to add it back it's giving me an error.
Here's my action on terminal and response:
$ gem sources --add https://rubygems.org/
Error fetching https://rubygems.org/:
server did not return a valid file (https://rubygems.org/specs.4.8.gz)
Does anyone know what is the problem?
Here is Easy Steps for installing Ruby in your system to help to install Cocoapods in your machine, I solved the same issue with being below mentioned steps.
Install command line tools using the command
xcode-select --install
Install Homebrew by
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Ruby using homebrew
brew install ruby
Check Ruby version
ruby -v
Install Ruby
gem source -a http://rubygems.org/
gem install cocoa pods
sudo gem install cocoapods
or
sudo gem install -n /usr/local/bin cocoapods
Go to below folder
cd ~/.cocoapods/repos
Run the below command
git clone https://github.com/CocoaPods/Specs.git master
Go to the directory where Podfile is present and run
pod install
Happy Coding😊
Steps:
1. sudo gem install cocoapods
2. pod install
3. pod update
ensure that you are connected to internet. Your system is unable to find the latest version of gems, required by pods

Unable to install 'cocoapods' gem from rubygems.org (bad response backend read error)

I'm getting an error when I run 'gem install cocoapods' on OSX Mavericks.
$ gem install cocoapods
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - bad response backend read error 503 (https://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/cocoapods-0.27.1.gemspec.rz)
ERROR: Possible alternatives: cocoapods
Please note that I can download the cocoapods-0.27.1.gemspec.rz directly. I am running the latest version of XCode (5.0.1) and the latest version of its CLI tools. RVM is also configured to run the latest Ruby version (2.0.0p247)
Sometimes ,the default source for gem, https://rubygems.org/, can't be accessed.
It should be removed by command:
gem sources -r https://rubygems.org/
And then new source should be added:
gem sources -a https://ruby.taobao.org/
Update the cache:
gem sources -u
You can check sources with:
gem sources
Finally , you can install cocoapods:
sudo gem install cocoapods
Use the below mentioned steps to install Cocoapods in your machine,
I solved the same issue with be below mentioned steps
1.Install command line tools using the command
xcode-select --install
2.Install Home brew by
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
3.Install Ruby using homebrew
brew install ruby
4.Check Ruby version
ruby -v
5.Install Ruby
gem source -a http://rubygems.org/
6.gem install cocoapods
sudo gem install cocoapods
or
sudo gem install -n /usr/local/bin cocoapods
7.Go to below folder
cd ~/.cocoapods/repos
8.Run the below command
git clone https://github.com/CocoaPods/Specs.git master
9.Go to the directory where Podfile is present and run
pod install
It work for me:
Remove https source by command:
gem sources -r https://rubygems.org/
And then new http source should be added:
gem sources -a http://rubygems.org/
Update the cache:
gem sources -u
Though I'm not sure what caused read error 503 I was able to work around the problem fairly easily by manually installing the cocoapods.gem.
If anyone else experiences similar problems (with cocoapods or any other gem), download the appropriate gem file (cocoapods-0.27.1.gem in my case) directly from RubyGems.org. Then run the gem install cocoapods-0.27.1.gem. The install command will scan the working directory first, thus detecting and installing the local gem package, cutting out the broken repository.
I found that just removing and re-adding rubygems seemed to work for me ( using the High Sierra on Mac) I prefer to use the official Rubygems repos
gem sources -r https://rubygems.org/
gem sources -a https://rubygems.org/
gem sources -u
sudo gem install cocoapods
I assume it must have been a glitch..
This worked for me. Make sure to include sudo with install command.
gem sources -a http://rubygems.org/
gem sources -u
sudo gem install cocoapods
Just follow there steps and error is gone
1.Install command line tools using the command
xcode-select --install
2.Install Home brew by
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
3.Install cocapods using home-brew, it take care of everything
brew install cocoapods
4. Last step
pod setup
For me I had to change rubygems.org to be the gems url used at my company (which caches from rubygems.org).
I did sudo gem install cocoapods --source <my_company_url_for_gems>
Let all http replace https,because the right cocoa pods's sources is https://ruby.taobao.org/

Resources