fastlane: Fastlane Error: Add 'gem "cocoapods"' to your Gemfile and restart fastlane

Issue Description

When I try to run my Lane using bundle exec fast lane <mylane> I get an error saying I don’t have cocoapods installed, but I do, and I have it in my GemFile as well.

I have tried uninstalling and reinstalling cocoapods, but I still get the same error when running the lane.

Captured Output:

INFO [2017-04-18 12:05:19.51]: All required keys, certificates and provisioning profiles are installed 🙌
INFO [2017-04-18 12:05:19.52]: Setting Provisioning Profile type to 'enterprise'
INFO [2017-04-18 12:05:19.52]: -----------------------
INFO [2017-04-18 12:05:19.52]: --- Step: cocoapods ---
INFO [2017-04-18 12:05:19.52]: -----------------------
WARN [2017-04-18 12:05:19.64]: Missing gem 'cocoapods', please add the following to your local Gemfile:
WARN [2017-04-18 12:05:19.64]: 
INFO [2017-04-18 12:05:19.64]: ▸ gem "cocoapods"
WARN [2017-04-18 12:05:19.64]: 
WARN [2017-04-18 12:05:19.64]: Lane Context:
INFO [2017-04-18 12:05:19.64]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios qa_modoseguro", :SIGH_PROFILE_TYPE=>"enterprise"}
ERROR [2017-04-18 12:05:19.64]: Add 'gem "cocoapods"' to your Gemfile and restart fastlane
INFO [2017-04-18 12:05:19.65]: Successfully generated documentation at path '/Users/jay/Desktop/drivemode/fastlane/README.md'

+------+---------------------+-------------+
|             fastlane summary             |
+------+---------------------+-------------+
| Step | Action              | Time (in s) |
+------+---------------------+-------------+
| 1    | Verifying required  | 0           |
|      | fastlane version    |             |
| 2    | default_platform    | 0           |
| 3    | ensure_git_branch   | 0           |
| 4    | match               | 2           |
| 💥   | cocoapods           | 0           |
+------+---------------------+-------------+

ERROR [2017-04-18 12:05:19.66]: fastlane finished with errors


✅ fastlane environment ✅

Stack

Key Value
OS 10.12.4
Ruby 2.2.4
Bundler? true
Git git version 2.6.2
Installation Source ~/.fastlane/bin/bundle/bin/fastlane
Host Mac OS X 10.12.4 (16E195)
Ruby Lib Dir ~/.fastlane/bin/bundle/lib
OpenSSL Version OpenSSL 1.0.2g 1 Mar 2016
Is contained false
Is homebrew true
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 8.3

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE en_US.UTF-8

GEMFILE:

frozen_string_literal: true

A sample Gemfile

source “https://rubygems.org

gem “fastlane” gem “cocoapods” gem ‘rest-client’ gem ‘aws-sdk’ gem ‘krausefx-shenzhen’

GEMFILE.LOCK:

GEM remote: https://rubygems.org/ specs: CFPropertyList (2.3.5) activesupport (4.2.8) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) addressable (2.5.1) public_suffix (~> 2.0, >= 2.0.2) aws-sdk (2.9.7) aws-sdk-resources (= 2.9.7) aws-sdk-core (2.9.7) aws-sigv4 (~> 1.0) jmespath (~> 1.0) aws-sdk-resources (2.9.7) aws-sdk-core (= 2.9.7) aws-sigv4 (1.0.0) babosa (1.0.2) claide (1.0.1) cocoapods (1.2.1) activesupport (>= 4.0.2, < 5) claide (>= 1.0.1, < 2.0) cocoapods-core (= 1.2.1) cocoapods-deintegrate (>= 1.0.1, < 2.0) cocoapods-downloader (>= 1.1.3, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) cocoapods-stats (>= 1.0.0, < 2.0) cocoapods-trunk (>= 1.2.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) escape (~> 0.0.4) fourflusher (~> 2.0.1) gh_inspector (~> 1.0) molinillo (~> 0.5.7) nap (~> 1.0) ruby-macho (~> 1.1) xcodeproj (>= 1.4.4, < 2.0) cocoapods-core (1.2.1) activesupport (>= 4.0.2, < 5) fuzzy_match (~> 2.0.4) nap (~> 1.0) cocoapods-deintegrate (1.0.1) cocoapods-downloader (1.1.3) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.0) cocoapods-stats (1.0.0) cocoapods-trunk (1.2.0) nap (>= 0.8, < 2.0) netrc (= 0.7.8) cocoapods-try (1.1.0) colored (1.2) colored2 (3.1.2) commander (4.4.3) highline (~> 1.7.2) commander-fastlane (4.4.4) highline (~> 1.7.2) domain_name (0.5.20170404) unf (>= 0.0.5, < 1.0.0) dotenv (2.2.0) escape (0.0.4) excon (0.55.0) faraday (0.12.0.1) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) faraday (>= 0.7.4) http-cookie (~> 1.0.0) faraday_middleware (0.11.0.1) faraday (>= 0.7.4, < 1.0) fastimage (2.1.0) fastlane (2.27.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) bundler (>= 1.12.0, < 2.0.0) colored commander-fastlane (>= 4.4.0, < 5.0.0) dotenv (>= 2.1.1, < 3.0.0) excon (>= 0.45.0, < 1.0.0) faraday (~> 0.9) faraday-cookie_jar (~> 0.0.6) faraday_middleware (~> 0.9) fastimage (>= 1.6) gh_inspector (>= 1.0.1, < 2.0.0) google-api-client (~> 0.9.2) highline (>= 1.7.2, < 2.0.0) json (< 3.0.0) mini_magick (~> 4.5.1) multi_json multi_xml (~> 0.5) multipart-post (~> 2.0.0) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 1.1.0, < 2.0.0) security (= 0.1.3) slack-notifier (>= 1.3, < 2.0.0) terminal-notifier (>= 1.6.2, < 2.0.0) terminal-table (>= 1.4.5, < 2.0.0) tty-screen (~> 0.5.0) word_wrap (~> 1.0.0) xcodeproj (>= 1.4.4, < 2.0.0) xcpretty (>= 0.2.4, < 1.0.0) xcpretty-travis-formatter (>= 0.0.3) fourflusher (2.0.1) fuzzy_match (2.0.4) gh_inspector (1.0.3) google-api-client (0.9.28) addressable (~> 2.3) googleauth (~> 0.5) httpclient (~> 2.7) hurley (~> 0.1) memoist (~> 0.11) mime-types (>= 1.6) representable (~> 2.3.0) retriable (~> 2.0) googleauth (0.5.1) faraday (~> 0.9) jwt (~> 1.4) logging (~> 2.0) memoist (~> 0.12) multi_json (~> 1.11) os (~> 0.9) signet (~> 0.7) highline (1.7.8) http-cookie (1.0.3) domain_name (~> 0.5) httpclient (2.8.3) hurley (0.2) i18n (0.8.1) jmespath (1.3.1) json (1.8.6) jwt (1.5.6) krausefx-shenzhen (0.14.11) commander (>= 4.3, < 5.0) dotenv (>= 0.7) faraday (~> 0.9) faraday_middleware (~> 0.9) highline (>= 1.7.2) json (~> 1.8) net-sftp (~> 2.1.2) plist (>= 3.1.0, < 4.0.0) rubyzip (~> 1.1) security (~> 0.1.3) terminal-table (~> 1.4.5) little-plugger (1.1.4) logging (2.2.2) little-plugger (~> 1.1) multi_json (~> 1.10) memoist (0.15.0) mime-types (2.99.3) mini_magick (4.5.1) minitest (5.10.1) molinillo (0.5.7) multi_json (1.12.1) multi_xml (0.6.0) multipart-post (2.0.0) nanaimo (0.2.3) nap (1.1.0) net-sftp (2.1.2) net-ssh (>= 2.6.5) net-ssh (4.1.0) netrc (0.7.8) os (0.9.6) plist (3.2.0) public_suffix (2.0.5) representable (2.3.0) uber (~> 0.0.7) rest-client (1.8.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) retriable (2.1.0) rouge (1.11.1) ruby-macho (1.1.0) rubyzip (1.2.1) security (0.1.3) signet (0.7.3) addressable (~> 2.3) faraday (~> 0.9) jwt (~> 1.5) multi_json (~> 1.10) slack-notifier (1.5.1) terminal-notifier (1.7.1) terminal-table (1.4.5) thread_safe (0.3.6) tty-screen (0.5.0) tzinfo (1.2.3) thread_safe (~> 0.1) uber (0.0.15) unf (0.1.4) unf_ext unf_ext (0.0.7.3) word_wrap (1.0.0) xcodeproj (1.4.4) CFPropertyList (~> 2.3.3) claide (>= 1.0.1, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.2.3) xcpretty (0.2.6) rouge (~> 1.8) xcpretty-travis-formatter (0.0.4) xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS ruby

DEPENDENCIES aws-sdk cocoapods fastlane krausefx-shenzhen rest-client

BUNDLED WITH 1.14.6

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

@KrauseFx The same thing happened to me. Any workaround?

I’m having the same issue. Here is my fastlane env output.

✅ fastlane environment ✅

Stack

Key Value
OS 10.12.6
Ruby 2.2.4
Bundler? true
Git git version 2.13.5 (Apple Git-94)
Installation Source ~/.fastlane/bin/bundle/bin/fastlane
Host Mac OS X 10.12.6 (16G29)
Ruby Lib Dir ~/.fastlane/bin/bundle/lib
OpenSSL Version OpenSSL 1.0.2g 1 Mar 2016
Is contained true
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 9.0

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE en_US.UTF-8

fastlane files:

`./fastlane/Fastfile`
# More documentation about how to customize your build
# can be found here:
# https://docs.fastlane.tools
fastlane_version "2.59.0"

# This value helps us track success metrics for Fastfiles
# we automatically generate. Feel free to remove this line
# once you get things running smoothly!
generated_fastfile_id "9775fb6d-9e70-4da7-aec1-0e04bf8dbb64"


ENV["SLACK_URL"] = "https://hooks.slack.com/services/T...."

default_platform :ios


platform :ios do
before_all do
    cocoapods
  end

#Helpers
lane :version do
    get_version_number
end

# Fastfile actions accept additional configuration, but
# don't worry, fastlane will prompt you for required
# info which you can add here later
lane :beta do
  # cocoapods

  # build your iOS app
  gym(
    # scheme: "YourScheme",
    export_method: "ad-hoc"
  )
  after_all do |lane|
   # This block is called, only if the executed lane was successful

   slack(
     message: "#{lane} finished successfully."
   )
 end

 error do |lane, exception|
   slack(
     message: exception.message,
     success: false
   )
 end
end
end

`./fastlane/Appfile`
# The Appfile can be used to specify information that's used across all fastlane
# tools, like your username or the app's bundle identifier.
#
# For more details, check out the documentation at:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md

# app_identifier "com.your.app" # the bundle identifier of your app
# apple_id "apple@fastlane.tools" # Your Apple ID

fastlane gems

Gem Version Update-Status
fastlane 2.59.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
CFPropertyList 2.3.5
addressable 2.5.1
babosa 1.0.2
bigdecimal 1.2.6
bundler 1.14.6
claide 1.0.2
colored 1.2
colored2 3.1.2
commander-fastlane 4.4.5
declarative 0.0.10
declarative-option 0.1.0
domain_name 0.5.20170404
dotenv 2.2.0
excon 0.55.0
faraday 0.12.1
faraday-cookie_jar 0.0.6
faraday_middleware 0.11.0.1
fastimage 2.1.0
gh_inspector 1.0.3
google-api-client 0.13.6
googleauth 0.5.1
highline 1.7.8
http-cookie 1.0.3
httpclient 2.8.3
hurley 0.2
io-console 0.4.3
json 1.8.1
jwt 1.5.6
libxml-ruby 3.0.0
little-plugger 1.1.4
logging 2.2.2
memoist 0.15.0
mime-types 3.1
mime-types-data 3.2016.0521
mini_magick 4.5.1
minitest 5.4.3
multi_json 1.12.1
multi_xml 0.6.0
multipart-post 2.0.0
nanaimo 0.2.3
nokogiri 1.5.6
os 0.9.6
plist 3.2.0
power_assert 0.2.2
psych 2.0.8
public_suffix 2.0.5
rake 10.4.2
rdoc 4.2.0
representable 3.0.4
retriable 2.1.0
rouge 1.11.1
rubygems-update 2.5.2
rubyzip 1.2.1
security 0.1.3
signet 0.7.3
slack-notifier 1.5.1
sqlite3 1.3.13
terminal-notifier 1.7.1
terminal-table 1.7.3
test-unit 3.0.8
tty-screen 0.5.0
uber 0.0.15
unf 0.1.4
unf_ext 0.0.7.4
unicode-display_width 1.1.3
word_wrap 1.0.0
xcodeproj 1.5.2
xcpretty 0.2.6
xcpretty-travis-formatter 0.0.4

generated on: 2017-09-26