You cannot run CocoaPods as root (Ionic) iOS - ios

I am getting this error, when i am installing 'phonegap-plugin-push' i m getting the following error, i think i am having trouble installing pods.
Thanks in advance
Failed to install 'phonegap-plugin-push':undefined
Error: /Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:439:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)
Usage:
$ pod COMMAND
CocoaPods, the Cocoa library package manager.
Commands:
+ cache Manipulate the CocoaPods cache
+ env Display pod environment
+ init Generate a Podfile for the current directory
+ install Install project dependencies according to versions from a
Podfile.lock
+ ipc Inter-process communication
+ lib Develop pods
+ list List pods
+ outdated Show outdated project dependencies
+ repo Manage spec-repositories
+ setup Setup the CocoaPods environment
+ spec Manage pod specs
+ update Update outdated project dependencies and create new Podfile.lock
Options:
--silent Show nothing
--version Show the version of the tool
--verbose Show more debugging information
--no-ansi Show output without ANSI codes
--help Show help banner of specified command
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/command.rb:47:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'

did you use install it with using sudo ?
that's why it gave you error. you can directly install with without using sudo. It should work.

fixed this issue, there was folder rights issue

Related

Pods unable instal or update

I've opened my 1 month old project and when I try to build it showing me error.
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
and when I try to install 'pod install' or update 'pod update it shows me following error.
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=%5B%21%5D+Xcodeproj+doesn%27t+know+about+the+following+attributes+%7B%22inputFileListPaths%22%3D%3E%5B%5D%2C+%22outputFileListPaths%22%3D%3E%5B%5D%7D+for+the+%27PBXShellScriptBuildPhase%27+isa.%0AIf+this+attribute+was+generated+by+Xcode+please+file+an+issue%3A+https%3A%2F%2Fgithub.com%2FCocoaPods%2FXcodeproj%2Fissues%2Fnew&type=Issues
If none exists, create a ticket, with the template displayed above,
on: https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to
properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
as shown following screenshot
What I've done
Delete Drive Data
Close xcode, restart system
Delete pods 'deintegrate pod'
But When I hit command 'pod install' it give me error.
Kindly help me where is issue and how to fix this.
Thanks
I would suggest you to update Ruby using Homebrew- https://brew.sh, this package manager comes out useful in many cases, after you installed it you can run brew install ruby in terminal in order to install the latest ruby version.
Here's what Ruby wrote:
Homebrew is a commonly used package manager on macOS. Installing a Ruby using Homebrew is easy: brew install ruby This should install the latest Ruby version.
Source: https://www.ruby-lang.org/en/documentation/installation/

Unable to setup Cocoapods, pod setup --verbose command failed

I'm trying to install cocoapods on my mac to use for iOS apps. So before finding a cocoapod tutorial, I may have tried to install a cocoapod for an xcode project with pod init and some other random things. I don't think pod init worked but another similar command did something
I then decided it would be a better idea to follow a tutorial from the beginning, so I started with installing cocoapods with the sudo gem install cocoapods, which worked.
However, when I typed pod setup --verbose, terminal threw an error which also happened when I typed pod setup
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version` ("xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun\n") (RuntimeError)
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:130:in `verify_minimum_git_version!'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:49:in `run'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:22:in `load'
from /usr/local/bin/pod:22:in `<main>'
Please help, I can't find any answers on stackoverflow or any other website.
Based on the error message you are getting, it seems like you don't have command line tools installed. You need to install that and then go to Xcode -> Preferences -> Locations -> Command Line Tools and confirm you have current Xcode version selected there.

pod install fails with error: error:1006706B:elliptic curve routines

I have two Macs both up to date with OS X and Xcode. On one, I can install cocoapods and the pods specified in my project's podfile. The other fails:
pod install --verbose Preparing
Updating local specs repositories
Creating shallow clone of spec repo master from
https://github.com/CocoaPods/Specs.git $ /opt/local/bin/git clone
https://github.com/CocoaPods/Specs.git master --depth=1 Cloning into
'master'... error: error:1006706B:elliptic curve
routines:ec_GFp_simple_oct2point:point is not on curve while accessing
https://github.com/CocoaPods/Specs.git/info/refs?service=git-upload-pack
fatal: HTTP request failed [!] Unable to add a source with url
https://github.com/CocoaPods/Specs.git named master. You can try
adding it manually in ~/.cocoapods/repos or via pod repo add.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/sources_manager.rb:48:in
rescue in find_or_create_source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/sources_manager.rb:53:in
find_or_create_source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:616:in block in sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:615:inmap'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:615:in sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:211:inupdate_repositories'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:129:in
block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in
section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:128:in
resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:104:in
install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:71:in
run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:101:in
run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in
run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in
run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/bin/pod:44:in
<top (required)>' /usr/bin/pod:23:inload' /usr/bin/pod:23:in
`'
I've completely uninstalled and reinstalled cocoapods and tried everything else remotely relevant on SO. To me it smells like an encryption/decryption issue or https/ssl issue.
On the machine having trouble, I did have a pre-beta Xcode installed, but I've since deleted it and made sure it's command line tools are set correctly.
Anyone have suggestion on how to remedy this or diagnosis it further?
I resorted to taking drastic action. I uninstalled Xcode (app, libraries, preferences), uninstalled cocoapods, and uninstalled MacPorts (I could have had an old port getting in the mix). Reinstalled Xcode and cocoapods and now it works.

Cannot install a pod (fatal: unable to access 'https://github.com/CocoaPods/Specs.git/')

I'm trying to use the command pod install and always have that :
$ pod setup
OR
$ sudo pod setup
Setting up CocoaPods master repo
[!] Pod::Executable clone 'https://github.com/CocoaPods/Specs.git' master
Cloning into 'master'...
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': Failed connect to github.com:443; Operation timed out
/Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:217:in `rescue in run': undefined method `verbose?' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:210:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command.rb:51:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:24:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
I have no idea what this is about. Can someone help me? This is the first time I try to do anything with CocoaPods on OS X Mavericks.
Thanks!
First please check your network, you can use curl or git clone to check it directly under terminal
If you have another problem you can try gem uninstall claide and then install it
Or you can try ruby 1.9
cocoapods 0.29 and claide 0.4.0 works fine under my ruby 1.9 env
you can use rvm to work with different ruby env
I got the same issue while using a virtual machine. I started getting the error after switching connection to Bridged. The problem was that the machine had no MAC address generated.
Solution: Go to Network Adapter settings -> Advanced -> press
Generate MAC Address

Error running a Rails app in RVM: 'Could not open library'

Under 10.4.11, ruby-1.9.2-p290 and RVM I've just installed gems from an app's gemfile, but on running the server I get the following (a search only yields two similar questions, both unanswered), so even hints are welcome:
$ rails server
/Users/deveritt/.rvm/gems/ruby-1.9.2-p290/gems/ffi-1.0.9/lib/ffi/library.rb:75:in `block in ffi_lib': Could not open library 'libmagic.1.dylib': dlopen(libmagic.1.dylib, 5): image not found. Could not open library 'libmagic.so.1': dlopen(libmagic.so.1, 5): image not found. Could not open library 'libmagic.so.1.dylib': dlopen(libmagic.so.1.dylib, 5): image not found. Could not open library 'magic1.dll': dlopen(magic1.dll, 5): image not found. Could not open library 'libmagic1.dll.dylib': dlopen(libmagic1.dll.dylib, 5): image not found (LoadError)
from /Users/deveritt/.rvm/gems/ruby-1.9.2-p290/gems/ffi-1.0.9/lib/ffi/library.rb:54:in `map'
from /Users/deveritt/.rvm/gems/ruby-1.9.2-p290/gems/ffi-[SNIP]
3.0.6/lib/rails/commands.rb:27:in <top (required)>'
from script/rails:6:inrequire'
from script/rails:6:in `'
Is this familiar to anyone?
Update: found a Homebrew install just for libmagic that avoids the horrendous ImageMagick install, adapted it for a straight install without brew (YMMV):
get the file:
curl -O 'ftp://ftp.astron.com/pub/file/file-5.04.tar.gz'
Unzip etc. (or double-click) and move the resulting folder to /tmp, then ./configure, make and sudo make install as usual (see the file INSTALL if not sure). After this, RoR launched.

Resources