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.
Related
I'm having an error messages with trying to run "bundle install". My ruby version is 2.2.0. Also, I installed it with rvm and did an "rvm use" command to change it from 2.4.0 to 2.2.0 because I thought it might fix the error. Anyway I need your help. Much appreciated.
I currently have 3 versions of ruby : 2.2.3, 2.2.0, 2.4.0
My OS MAC OS Sierra 10.12.3
My shell is zsh.
/Users/root/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems.rb:270:in `find_spec_for_exe': can't find gem bundler (>= 0.a) (Gem::GemNotFoundException)
from /Users/root/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems.rb:298:in `activate_bin_path'
from /usr/local/bin/bundle:22:in `<main>'
from /Users/root/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /Users/root/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
It seems you have not installed gem bundler. Try:
gem install bundler
then bundle install again.
Not exactly sure what the issue was. But going into my .gemrc file and deleting
install: "--user --no-document"
update: "--user --no-document"
solved the problem
I'm just trying to learn to write the example-output-plugin,follow this page:
http://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_output_plugin.html#_clone_and_test_4
when I type the "bundle install" in the folder ~/logstash-output-example,I get the the error:
Could not find gem 'logstash-devutils (>= 0) ruby' in any of the gem sources
listed in your Gemfile or installed on this machine.
it seems the gem 'logstash-devutils (>= 0) ruby' missed,but when I type the
"sudo gem install logstash-devutils", I get the error
ERROR: Could not find a valid gem 'logstash-devutils' (>= 0)
Here is why:
Found logstash-devutils (0.0.12), but was for platform java
Anyone else can help me?
environment:MAC OSX 10.9.5
I just ran into the same problem. Solved it by just downloading the gem via the download link on its rubygems.org page and installing it with:
sudo gem install logstash-devutils-0.0.13-java.gem
That worked for me.
Update:
Well, that will install the gem but it will not solve the real problem. I needed to switch to jruby for the tutorial to work. This can be done via the RVM:
sudo rvm install jruby
I tried installing the gem manually and got a different error:
There was a RuntimeError while loading logstash-devutils.gemspec:
Only JRuby is supported from
/Users/bnewton/.rvm/gems/ruby-2.2.1/bundler/gems/logstash-devutils-15c59bfaab59/logstash-devutils.gemspec:2:in `'
This leads me to believe the logstash-devutils requires jruby rather than the usual ruby. I use rvm, so it was a matter of installing and using jruby instead of regular ruby. So if you are using rvm, run:
rvm install jruby-1.7.19
rvm use jruby-1.7.19
gem install bundler
bundle install
This fixed it for me, and I was able to run bundle install without error.
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
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
rubygems/dependency.rb:296:in `to_specs': Could not find 'cocoapods' (>= 0) among 35 total gem(s) (Gem::LoadError)
from /Users/divyam.shukla/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /Users/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /Users/user/.rvm/gems/ruby-2.0.0-p247/bin/pod:22:in `<main>'
I am getting this error.
Hey I had the same problem that you have, I solve it following the next steps:
(I strongly recommend to use rvm to manage ruby versions)
Remove cocoapods using gem uninstall cocoapods
Install rvm, to do this I followed this steps
https://rvm.io/rvm/install
After that reinstall cocoapods using gem install cocoapods
run pod setup
And after that everything works like a charm!.
You could notice that I didn't use sudo.
Hope it could helps you.
EDIT: If you have a slow internet connection it could take several minutes, to check the progress or steps use pod setup --verbose
I just ran this without doing any changes using rvm.
I do have rvm version: rvm 1.25.30 (stable).
Step 1: sudo gem uninstall cocoapods
Step 2: gem install cocoapods
Step 3: pod setup
Make sure not to install with sudo.
do this :
sudo gem install -n /usr/local/bin cocoapods