Search code examples
cocoapodsintegration-testingearlgrey

Pod install fails with "LoadError - cannot load such file -- earlgrey"


I followed the instructions as verbatim on https://github.com/google/EarlGrey/blob/master/docs/install-and-run.md#cocoapods-installation and I when I run pod install, I get:

LoadError - cannot load such file -- earlgrey
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:121:in `require'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:121:in `require'

What am I missing?


Solution

  • EarlGrey uses the the earlgrey gem in order to download any Swift or CocoaPods dependencies as stated here in the doc. It seems like the gem wasn't installed correctly.

    Remember that gems are installed in /usr/local/bin, which you might need to provide access to. To do so, do sudo gem install earlgrey or sudo gem install -n /usr/local/bin and you should be ready to go!