cocoapods installation errors and Solutions

Keywords: Front-end Ruby Java JDK Gradle

Error in updating pod

rubygems/core_ext/kernel_warn

/Users/joanfen/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rubygems/core_ext/kernel_warn (LoadError)
    from /Users/joanfen/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/joanfen/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems.rb:1390:in `<top (required)>'
    from <internal:gem_prelude>:4:in `require'
    from <internal:gem_prelude>:4:in `<internal:gem_prelude>'

Implemented

rvm fix-permissions
# 2.5.6 here is the ruby version number
rvm reinstall 2.5.6

It's still not working, so it's done

rvm info 

Found no default ruby Version set

system:

system:
uname:       "Darwin joanfendeMacBook-Pro.local 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64 x86_64"
system:      "osx/10.15/x86_64"
bash:        "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)"
zsh:         "/bin/zsh => zsh 5.7.1 (x86_64-apple-darwin19.0)"

rvm:
version:      "rvm 1.27.0 (latest) by Wayne E. Seguin wayneeseguin@gmail.com, Michal Papis mpapis@gmail.com [https://rvm.io/]"
updated:      "3 years 2 months 18 days 22 hours 36 minutes 25 seconds ago"
path:         "/Users/joanfen/.rvm"

homes:
gem:          "not set"
ruby:         "not set"

binaries:
ruby:         "/usr/bin/ruby"
irb:          "/usr/bin/irb"
gem:          "/usr/bin/gem"
rake:         "/usr/bin/rake"

environment:
PATH:         "/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/Home/bin:/usr/local/bin/gradle-2.13/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/share/scala/bin:/usr/local/share/sbt/bin:/Users/joanfen/.rvm/bin"
GEM_HOME:     ""
GEM_PATH:     ""
MY_RUBY_HOME: ""
IRBRC:        ""
RUBYOPT:      ""
gemset:       ""

I looked at several versions of ruby in my. rvm/gems /, so I deleted the version except 2.5.6

rvm remove version number

I have seen that my rvm version number is too low. Update the rvm version

rvm get stable

Set ruby Version after update

rvm use 2.5.6

Check again

rvm info

Get information

ruby-2.5.6:

  system:
    uname:        "Darwin joanfendeMacBook-Pro.local 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64 x86_64"
    name:         "OSX"
    version:      "10.15"
    architecture: "x86_64"
    bash:         "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)"
    zsh:          "/bin/zsh => zsh 5.7.1 (x86_64-apple-darwin19.0)"
    remote_path:  "osx/10.15/x86_64"
    xcode:        "11.1"

  rvm:
    version:      "1.29.9 (latest)"
    updated:      "7 minutes 59 seconds ago"
    path:         "/Users/joanfen/.rvm"
    autolibs:     "[4] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

  ruby:
    interpreter:  "ruby"
    version:      "2.5.6p201"
    date:         "2019-08-28"
    platform:     "x86_64-darwin19"
    patchlevel:   "2019-08-28 revision 67796"
    full_version: "ruby 2.5.6p201 (2019-08-28 revision 67796) [x86_64-darwin19]"

  homes:
    gem:          "/Users/joanfen/.rvm/gems/ruby-2.5.6"
    ruby:         "/Users/joanfen/.rvm/rubies/ruby-2.5.6"

  binaries:
    ruby:         "/Users/joanfen/.rvm/rubies/ruby-2.5.6/bin/ruby"
    irb:          "/Users/joanfen/.rvm/rubies/ruby-2.5.6/bin/irb"
    gem:          "/Users/joanfen/.rvm/rubies/ruby-2.5.6/bin/gem"
    rake:         "/Users/joanfen/.rvm/rubies/ruby-2.5.6/bin/rake"

  environment:
    PATH:         "/Users/joanfen/.rvm/gems/ruby-2.5.6/bin:/Users/joanfen/.rvm/gems/ruby-2.5.6@global/bin:/Users/joanfen/.rvm/rubies/ruby-2.5.6/bin:/Users/joanfen/.rvm/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/Home/bin:/usr/local/bin/gradle-2.13/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/share/scala/bin:/usr/local/share/sbt/bin"
    GEM_HOME:     "/Users/joanfen/.rvm/gems/ruby-2.5.6"
    GEM_PATH:     "/Users/joanfen/.rvm/gems/ruby-2.5.6:/Users/joanfen/.rvm/gems/ruby-2.5.6@global"
    MY_RUBY_HOME: "/Users/joanfen/.rvm/rubies/ruby-2.5.6"
    IRBRC:        "/Users/joanfen/.rvm/rubies/ruby-2.5.6/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

Re execution

pod install

The error message has changed, indicating that the previous problem has been solved

Traceback (most recent call last):
	4: from /Users/joanfen/.rvm/gems/ruby-2.5.6@global/bin/ruby_executable_hooks:24:in `<main>'
	3: from /Users/joanfen/.rvm/gems/ruby-2.5.6@global/bin/ruby_executable_hooks:24:in `eval'
	2: from /usr/local/bin/pod:23:in `<main>'
	1: from /Users/joanfen/.rvm/rubies/ruby-2.5.6/lib/ruby/2.5.0/rubygems.rb:303:in `activate_bin_path'
/Users/joanfen/.rvm/rubies/ruby-2.5.6/lib/ruby/2.5.0/rubygems.rb:284:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)

I didn't find any cocoapods. It's obvious that I have reinstalled the cocoapods. It's weird here. I don't know what I did to make the cocoapods installed the day before tomorrow

gem install cocoapods

Try pod install again Start Analyzing dependencies Problem solving

Posted by xcoderx on Mon, 18 Nov 2019 06:09:04 -0800