解决“in `full_gem_path': uninitialized constant Bundler::Plugin::API::Source (NameError)”

pod intall 后出现如下提示:

/Users/fu/.rvm/gems/ruby-2.2.4/gems/bundler-1.14.4/lib/bundler/rubygems_ext.rb:45:in `full_gem_path': uninitialized constant Bundler::Plugin::API::Source (NameError)
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:144:in `block in full_require_paths'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `map'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `full_require_paths'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:76:in `contains_requirable_file?'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `block in find_in_unresolved'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `each'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `find_all'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `find_in_unresolved'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:74:in `require'
from /Users/fu/.rvm/gems/ruby-2.2.4/gems/bundler-1.14.4/lib/bundler/plugin/api/source.rb:2:in `'
from /Users/fu/.rvm/gems/ruby-2.2.4/gems/bundler-1.14.4/lib/bundler/rubygems_ext.rb:45:in `full_gem_path'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:144:in `block in full_require_paths'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `map'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `full_require_paths'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1370:in `add_self_to_load_path'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1283:in `activate'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1314:in `block in activate_dependencies'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in `each'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in `activate_dependencies'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1282:in `activate'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1314:in `block in activate_dependencies'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in `each'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in `activate_dependencies'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1282:in `activate'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:67:in `block in gem'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in `synchronize'
from /Users/fu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in `gem'
from /Users/fu/.rvm/rubies/ruby-2.2.4/bin/pod:22:in `
' from /Users/fu/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `eval' from /Users/fu/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `
'

解决:
更新gem:

gem -v // 检查版本
gem update --system //升级 gem

你可能感兴趣的:(解决“in `full_gem_path': uninitialized constant Bundler::Plugin::API::Source (NameError)”)