How to install cocoapoads 0.33.1 on os X - macos

I have upgrade my os to Yosemite, and as you know, my cocoapods doesn't work. and I found the solution on the internet and try.
It worked. but I found the cocoapods version is 0.34.4. I hope to install cocoapods 0.33.1, and I try sudo gem install cocoapods -v 0.33.1, but it doesn't work. Who can tell me what should I do??
The is the error log:
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
"/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby" -rubygems /Library/Ruby/Gems/2.0.0/gems/rake-0.9.6/bin/rake RUBYARCHDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext RUBYLIBDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for -std=c99 option to compiler... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from extconf.rb:24:in `block in <main>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
from extconf.rb:23:in `<main>'
rake aborted!
Command failed with status (1): [/System/Library/Frameworks/Ruby.framework/...]
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext/xcodeproj/Rakefile:37:in `block in <top (required)>'
Tasks: TOP => default => ext
(See full trace by running task with --trace)
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext/xcodeproj/gem_make.out

OK,I found that the question has been resolved after I installed macports.
https://www.macports.org/install.php

Related

After upgrading to MAC OS 13(Ventura), an error occurred while installing curb (0.9.11), and Bundler cannot continue

Not able to bundle install due to installation failed with curb 0.9.11. Was working fine with Mac OS 12, but after upgrading to ventura getting above error.
ERROR: Error installing curb:
ERROR: Failed to build gem native extension.
current directory: /Users/ab/.rvm/gems/ruby-2.6.6/gems/curb-0.9.11/ext
/Users/ab/.rvm/rubies/ruby-2.6.6/bin/ruby -I /Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0 -r ./siteconf20221117-12107-158f8tb.rb extconf.rb
checking for curl-config... yes
checking for curlopt_tcp_keepalive... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/ab/.rvm/rubies/ruby-2.6.6/bin/$(RUBY_BASE_NAME)
--with-curl-dir
--without-curl-dir
--with-curl-include
--without-curl-include=${curl-dir}/include
--with-curl-lib
--without-curl-lib=${curl-dir}/lib
/Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from extconf.rb:52:in `block in have_constant'
from /Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /Users/ab/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from extconf.rb:44:in `have_constant'
from extconf.rb:62:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/ab/.rvm/gems/ruby-2.6.6/extensions/-darwin-21/2.6.0/curb-0.9.11/mkmf.log
extconf failed, exit code 1
not getting successful bundle installation of curb 0.9.11 gem.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension - nio4r

I am trying to install all gems in my gemfile and its dependencies, so just ran the Bundler (bundle or bundle install). It failed while installing nio4r 1.1.1 with native extensions, below is log in gem_make.out.
/opscode/chef/embedded/bin/ruby.exe -r ./siteconf20150924-7480-ocwr34.rb extconf.rb
checking for unistd.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opscode/chef/embedded/bin/ruby
/opscode/chef/embedded/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opscode/chef/embedded/lib/ruby/2.0.0/mkmf.rb:565:in `try_cpp'
from /opscode/chef/embedded/lib/ruby/2.0.0/mkmf.rb:1038:in `block in have_header'
from /opscode/chef/embedded/lib/ruby/2.0.0/mkmf.rb:889:in `block in checking_for'
from /opscode/chef/embedded/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /opscode/chef/embedded/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /opscode/chef/embedded/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /opscode/chef/embedded/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /opscode/chef/embedded/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /opscode/chef/embedded/lib/ruby/2.0.0/mkmf.rb:888:in `checking_for'
from /opscode/chef/embedded/lib/ruby/2.0.0/mkmf.rb:1037:in `have_header'
from extconf.rb:3:in `'
extconf failed, exit code 1
I can see that the bundler is checking for the unistd.h and failing at that point. I made sure that this header is available within the PATH and also installed the ruby devkit for my version. Doing a gem install nio4r also gives the same error.
try xcode-select --install first.This may be an issue with xcode build system

Green_Shoes fails to build native gem extension

I'm trying to install green_shoes on Windows 8.1. I have ruby 2.0.0p451 and gem version 2.0.14 on a 64-bit OS. I also installed the ruby-gtk2 package recommended on the green_shoes page. Any idea what's up?
C:\>gem install green_shoes
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing green_shoes:
ERROR: Failed to build gem native extension.
C:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for --enable-debug-build option... no
checking for -Wall option to compiler... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby200-x64/bin/ruby
--enable-debug-build
--disable-debug-build
C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to ge
nerate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/glib2-2.2.3/lib/mkmf-gnome2
.rb:58:in `block in try_compiler_option'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for
'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in p
ostpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/glib2-2.2.3/lib/mkmf-gnome2
.rb:57:in `try_compiler_option'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/glib2-2.2.3/lib/mkmf-gnome2
.rb:67:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:5
5:in `require'
from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:5
5:in `require'
from extconf.rb:15:in `<main>'
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/glib2
-2.2.3 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/glib2-2.2.3/ext/glib2/
gem_make.out

gem install stopped working after upgrade to OS X 10.10 Yosemite

I upgraded to OS X Yosemite and gem install stopped working.
When I run it, I see this big ugly error:
$ gem install rdiscount
Building native extensions. This could take a while...
ERROR: Error installing rdiscount:
ERROR: Failed to build gem native extension.
ruby -r ./siteconf.rb extconf.rb
checking for random()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=ruby
--with-rdiscount-dir
--without-rdiscount-dir
--with-rdiscount-include
--without-rdiscount-include=${rdiscount-dir}/include
--with-rdiscount-lib
--without-rdiscount-lib=${rdiscount-dir}/
mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from mkmf.rb:513:in `block in try_link0'
from tmpdir.rb:88:in `mktmpdir'
from mkmf.rb:510:in `try_link0'
from mkmf.rb:534:in `try_link'
from mkmf.rb:720:in `try_func'
from mkmf.rb:1004:in `block in have_func'
from mkmf.rb:895:in `block in checking_for'
from mkmf.rb:340:in `block (2 levels) in postpone'
from mkmf.rb:310:in `open'
from mkmf.rb:340:in `block in postpone'
from mkmf.rb:310:in `open'
from mkmf.rb:336:in `postpone'
from mkmf.rb:894:in `checking_for'
from mkmf.rb:1003:in `have_func'
from extconf.rb:5:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in rdiscount-2.1.7.1 for inspection.
Results logged to /gem_make.out
When you upgrade to Yosemite Xcode command line tools becomes unavailable.
Run this command, and follow the on screen instructions.
$ xcode-select --install
xcode-select: note: install requested for command line developer tools

Bundle Install Fails on Curb Gem - Mac OS X 10.8.2

When I try to run bundle installthis is the issue I am running into:
Installing curb (0.8.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for curl-config... yes
checking for curlinfo_redirect_time... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
--with-curl-dir
--without-curl-dir
--with-curl-include
--without-curl-include=${curl-dir}/include
--with-curl-lib
--without-curl-lib=${curl-dir}/lib
/Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
from extconf.rb:52:in `block in have_constant'
from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from extconf.rb:44:in `have_constant'
from extconf.rb:62:in `<main>'
I am running ruby 1.9.3p125 with RVM and have re-installed curl (locally) and still am running into the same issue... I have tried everything that I have found on fixing this issue, but can't seem to get the problem to subside. Any one else run across this issue and have successfully fixed it?
When you see this message you need to install the XCode Command Line Tools package:
You have to install development tools first.
These are available from the developer download site.

Resources