JeffB6688
JeffB6688

Reputation: 3880

Unable to load cocoapods - Could not find 'encrypted_strings' - Gem::LoadError

I am not able to load cocoapods. No matter what gem command I type in, I get the following error:

/Users/jeff//.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:315:in `to_specs': 
Could not find 'encrypted_strings' (>= 0) among 18 total gem(s) (Gem::LoadError)
Checked in 
'GEM_PATH=/Users/jeff/.gem/ruby/2.1.0:/Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/gems/2.1.0', execute `gem env` for more information
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:324:in `to_spec'
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:58:in `gem'
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:65:in `<module:Kernel>'
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:7:in `<top (required)>'
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems.rb:1235:in `require'
from /Users/jeff/.rvm/rubies/ruby-
2.1.5/lib/ruby/site_ruby/2.1.0/rubygems.rb:1235:in `<top (required)>'
from <internal:gem_prelude>:1:in `require'
from <internal:gem_prelude>:1:in `<compiled>'

I get this error when I type any of the following:

sudo gem install cocoapods

gem uninstall cocoapods

gem env

sudo gem install encrypted_strings

My mac is running version 10.12.6 osx

I do have Ruby in my /Library. The subdirectories contains Gems/2.0.0.

Note that some time ago, I was working on another project that had me update Ruby to version ruby-2.1.5 and ruby-2.1.5-dev. These are found in "/Users/jeff/.rvm/rubies". Now if I go to "/Library/Ruby/Gems", there is a subdirectory called 2.0.0. Is there an incompatibility here?

How can I correct this problem? Should I somehow remove these versions. If so, how?

Upvotes: 0

Views: 45

Answers (1)

Ihar Katkavets
Ihar Katkavets

Reputation: 1570

Probably version of cocoapods is running in unsupported version ruby and install again . To fix it remove all versions of cocoapods. How to do it find at answer https://superuser.com/a/686319

It can be happen after updating to new macOS version. To prevent it happen in future use rbenv Ruby environment

rbenv allows to not use root access

Upvotes: 1

Related Questions