i am using following command:
sudo gem install cocoapods
for this i am getting following response:
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ECONNREFUSED: Failed to open TCP connection to api.rubygems.org:443 (Connection refused - connect(2) for "api.rubygems.org" port 443) (https://api.rubygems.org/specs.4.8.gz)
i tried uninstalling cocoapods and restart ....everything.
upadte 1:
i try to debug
gem install bundler --debug -V
i got following output:
Exception `LoadError' at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/resolv.rb:171 - LoadError
Exception `Gem::UnsatisfiableDependencyError' at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/resolver/installer_set.rb:71 - Unable to resolve dependency: user requested 'bundler (>= 0)'
ERROR: Could not find a valid gem 'bundler' (>= 0) in any repository
Update 2:
i changed proxys in my mac .. now i am getting :
Could not find a valid gem 'cocoapods' (>= 0) in any repository
finally i found the answer:
just connected to ur personal Hotspot and use following command:
$ sudo gem install cocoapods --source http://rubygems.org
It appeared that it was my VPN that was not allowing the download, so the incoming readers should take care of that as well.
I tried to deactivate it after I read #Cristik answer by the way.
Related
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.18/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200728-45926-1h0nq8i.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/includ.e/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.18 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ffi-1.9.18/gem_make.out
I'm just trying to install it and it doesn't work.
PS: I also already have cocoa pods. I am simply following the instructions on react native setting up your environment
The below steps would fix that issue:
Ensure ruby is installed and up to date: ruby -v
Update gem's sudo gem update --system
xcode-select --install
sudo gem install -n /usr/local/bin cocoapods
Solved it by updating the repo
sudo gem repo update
When running the rails server i am getting "An error occurred while installing escape_utils (1.2.1), and Bundler cannot continue. Make sure that gem install escape_utils -v '1.2.1' succeeds before bundling". But after that when i run bundle install, i have received the following error " error occurred while installing escape_utils (1.2.1), and Bundler cannot continue. Make sure that gem install escape_utils -v '1.2.1' succeeds before bundling".
Could anyone guide me how to fix this?
You need to run gem install escape_utils -v '1.2.1' to install the gem without using bundler. It will probably fail and the trace that it prints will tell you what's happening and where to find the error log file for more info on what's missing.
That gem has native extensions that it needs to compile, if it gives you an error while compiling them, you probably have a missing system dependency.
When I download the rails application from github
https://github.com/ari/jobsworth
An then give bundle install it throws error:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
An error occurred while installing mysql2 (0.4.4), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.4.4'` succeeds before bundling.
After I give the sudo gem install mysql2 -v '0.4.4' and it displays like:
Fetching: mysql2-0.4.4.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.4.0/gems/mysql2-0.4.4/ext/mysql2
/usr/bin/ruby2.4 -r ./siteconf20180212-10708-v1q8lj.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.4.0/gems/mysql2-0.4.4 for inspection.
Results logged to /var/lib/gems/2.4.0/extensions/x86_64-linux/2.4.0/mysql2-0.4.4/gem_make.out
After run bundle install it throws same error.
Running these commands worked for me.
brew install openssl
bundle config --global build.mysql2 --with-opt-dir="$(brew --prefix openssl)"
bundle
You can refer to this link for further help https://github.com/brianmario/mysql2/issues/1005
In rvm requirements, I have libksba. So I try to install it with homebrew:
➜ ~ brew install libksba
==> Downloading ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.3.0.tar.bz2
curl: (56) Recv failure: Operation timed out
Error: Download failed: ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.3.0.tar.bz2
Is there a way to fix this (by specifying additional repositories) ? Or should I install the lib manually ?
You can
rvm autolibs enable and then
rvm do what you want (in my case: rvm install 1.9.3)
I try to launch redmine from IDE:
rails/redmine/script/rails server -b 127.0.0.1 -p 3000 -e development
but I am getting error:
/resolver.rb:287:in `resolve': Could not find gem 'mocha (= 0.12.3) x86-mingw32' in the gems available on this machine. (Bundler::GemNotFound)
I installed mocha:
gem install mocha
But error still appear.
Try installing it with the same exact version:
gem install mocha -v '0.12.3'