This is happening:
Mac:~ Swanros$ sudo gem install cocoapods
+Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
rake RUBYARCHDIR=/Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0/ext RUBYLIBDIR=/Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0/ext
/Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'rake' (>= 0) among 9 total gem(s) (Gem::LoadError)
from /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /Users/Swanros/.rvm/gems/ruby-2.0.0-p247/bin/rake:22:in `<main>'
Gem files will remain installed in /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0 for inspection.
Results logged to /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0/ext/xcodeproj/gem_make.out
Mac:~ Swanros$
How could I solve this? I'm running OS X Mavericks with Xcode 5 Command Line Tools already installed.
I’ve just released xcodeproj 0.14.1 which contains a fix for this: https://github.com/CocoaPods/Xcodeproj/blob/0.14.1/CHANGELOG.md.
It should work if you try it again, or you can install the xcodeproj gem first and then try again:
$ sudo gem install xcodeproj
$ sudo gem install cocoapods
After updating Xcode 5 to Xcode 5.0.1, cocoapods can be installed successfully
Related
I am installing Dashing Dashboard on Pi3. I have "Could not find 'bundler' problem in installation steps. How can I finish the installation?
$ source /home/pi/.rvm/scripts/rvm
-> OK
$ rvm current
ruby-2.3.0
$ bundle
/usr/lib/ruby/2.1.0/rubygems/dependency.rb:298:in 'to_specs': Could not find 'bundler' (>= 0) among 42 total gem(s) (Gem::LoadError)
from /usr/lib/ruby/2.1.0/rubygems/dependency.rb:309:in 'to_specs'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in 'gem'
from /usr/local/bin/bundle:22:in '<main>'
$ gem install bundler
-> OK
$ bundle
-> the same problem
I imagine you've messed up your permissions, installing bundler into system gems by running sudo gem install bundler.
Delete the bundler and then install it under RVM. Double check your paths so its being installed in the RVM gem stash, not system's.
I tried to install cocoapods on mac according to the instructions http://cocoapods.org/ , but got the error as below:
$sudo gem install cocoapods
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Service Unavailable: Back-end server is at capacity 503 (https://api.rubygems.org/api/v1/dependencies?gems=cocoapods)
but sometimes, the error message is different。
$ sudo gem install cocoapods
Password:
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
rake RUBYARCHDIR=/Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-12/1.9.1/xcodeproj-0.17.0 RUBYLIBDIR=/Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-12/1.9.1/xcodeproj-0.17.0/Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in `to_specs': Could not find 'rake' (>= 0) among 20 total gem(s) (Gem::LoadError)
from /Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:309:in `to_spec'
from /Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:53:in `gem'
from /Users/tap4fun/.rvm/gems/ruby-1.9.3-p484/bin/rake:22:in `<main>'
from /Users/tap4fun/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
from /Users/tap4fun/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /Users/tap4fun/.rvm/rubies/ruby-1.9.3- p484/lib/ruby/gems/1.9.1/gems/xcodeproj-0.17.0 for inspection.
Results logged to /Users/tap4fun/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-12/1.9.1/xcodeproj-0.17.0/gem_make.out
ruby version: 1.9.3
rake version: 10.2.2
Try this (Worked for me with OSX 10.10)
Open Xcode 6
Open Preferences
Click the Locations tab
Change the Command Line Tools version to Xcode 6.0
Uninstall cocoapods
$ sudo gem uninstall cocoapods
Install xcodeproj
$ sudo gem install xcodeproj
Install cocoapods
$ sudo gem install cocoapods
Run pod --version to verify
I installed CocoaPods :
retine:MacOS jdmuys$ sudo gem install cocoapods
[...]
Successfully installed cocoapods-0.29.0
1 gem installed
Installing ri documentation for cocoapods-0.29.0...
Installing RDoc documentation for cocoapods-0.29.0...
However, it doesn't seem to work:
retine:MacOS jdmuys$ pod --version
/Users/jdmuys/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find cocoapods (>= 0) amongst [addressable-2.3.2, bundler-1.2.3, chunky_png-1.2.6, compass-0.11.7, cookiejar-0.3.0, daemons-1.1.9, em-http-request-1.0.3, em-socksify-0.2.1, erubis-2.7.0, eventmachine-1.0.0, extlib-0.9.15, fssm-0.2.9, haml-3.1.7, http_parser.rb-0.5.3, json_pure-1.4.6, rack-1.4.1, rake-10.0.3, rubygems-bundler-1.1.0, rvm-1.11.3.5, sass-3.1.21, sproutcore-1.9.1, thin-1.2.11, thor-0.14.6] (Gem::LoadError)
from /Users/jdmuys/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/jdmuys/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
from /Users/jdmuys/.rvm/rubies/ruby-1.9.3-p327/bin/pod:22:in `<main>'
FWIW:
retine:MacOS jdmuys$ xcode-select --print-path
/Applications/Xcode51-Beta4.app/Contents/Developer
(doesn't help if I switch to a non beta version of Xcode)
and
retine:MacOS jdmuys$ ruby --version
ruby 1.9.3p327 (2012-11-10) [x86_64-darwin12.2.0]
Any idea what is happening and what I can do to fix it?
Thanks
I ran into a similar issue, and re-installing without sudo – gem install cocoapods – fixed the issue for me.
This is my setup:
Mavericks 10.9.1
Xcode 5.0.2
which ruby returns this:
/Users/quique123/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
but dvm install ruby returns:
Already installed ruby-2.1.0.
To reinstall use:
rvm reinstall ruby-2.1.0
So doesn't this mean I have ruby 2.1.0?
gems list says I have installed cocoa pods & cocoapods-core 0.29.0 and some other gems.
After sudo gem install cocoa pods I get the bunch of fetches and change log and Successfully Installed cocoa pods 0.29.0. It then parses and installs documentation and when I run pod setup I got:
Setting up CocoaPods master repo
Setup completed (read-only access)
So I created a file from a tutorial:
platform :iOS, '7.0'
pod 'Mantle'
pod 'TSMessages'
pod 'ReactiveCocoa'
but when I run pod install I get:
/Users/myusername/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in `to_specs': Could not find 'cocoa pods' (>= 0) among 37 total gem(s) (Gem::LoadError)
from /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:309:in `to_spec'
from /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:53:in `gem'
from /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/bin/pod:22:in `<main>'
How do I get the pod to install correctly and why am i getting messages of ruby 1.9.3?
If you have rvm installed do not use sudo gem install cocoapods. It creates problems. Follow these steps to fix your cocoapods installation:
Uninstall Cocoapods:
sudo gem uninstall cocoapods
Make sure you're on the latest Ruby:
which ruby
Install cocoapods without sudo:
gem install cocoapods -V --no-ri --no-rdoc
# V: Verbose; no-ri,no-rdoc: Do not install documentation
Set up Cocoapods:
pod setup
Should work now.
gem install fastthread -v1.0.7
Building native extensions. This could take a while...
ERROR: Error installing fastthread:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:8:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:8
Gem files will remain installed in /var/lib/gems/1.8/gems/fastthread-1.0.7 for inspection.
Results logged to /var/lib/gems/1.8/gems/fastthread-1.0.7/ext/fastthread/gem_make.out
This is what I got when I tried installing from fastthread to set up SUP mail client on my system . How to get rid of this error?
Install these and then try re-installing:
sudo apt-get install ruby1.8-dev
Try this link http://kenno.wordpress.com/2009/07/25/fixed-extconf-rb8in-require-no-such-file-to-load-mkmf-loaderror/
I was getting this same error in OS X Lion. Having Xcode 4.3 installed doesn't cut it. You have to go to preferences in Xcode and install the command line tools, which installs the necessary compiler tools for doing native builds on the system. After I did this, then gem install fastthread worked for me.
Just to add to this, on debian and ubuntu the "complete" ruby package is this:
ruby1.8 ruby1.8-dev ri1.8 rdoc1.8 irb1.8 ruby1.8-elisp
ruby1.8-examples libdbm-ruby1.8 libgdbm-ruby1.8 libtcltk-ruby1.8
libopenssl-ruby1.8 libreadline-ruby1.8
So something like
sudo aptitude install ruby1.8 ruby1.8-dev ri1.8 rdoc1.8 irb1.8 ruby1.8-elisp ruby1.8-examples libdbm-ruby1.8 libgdbm-ruby1.8 libtcltk-ruby1.8 libopenssl-ruby1.8 libreadline-ruby1.8
Will save you a lot of time when doing bundle install on a large project.