Could not locate Gemfile or .bundle/ directory circleci when using fastlane

ios
android
fastlane
circle.yml
mobile
#1

I’m trying to to build a react-native application both in iOS and Android, but I keep getting the error specified on the title when running the following job:

  - &restore-gemfile-cache
    key: v1-bundle-{{ checksum "ios/Gemfile.lock" }}--{{ arch }}
  - &save-gemfile-cache
    key: v1-bundle-{{ checksum "ios/Gemfile.lock" }}--{{ arch }}
    paths:
      - vendor/bundle

...omitted_code

# iOS Ad Hoc
  adhoc:
    macos:
      xcode: "10.2.0"
    working_directory: ~/app
    environment:
      FL_OUTPUT_DIR: ouput
      FASTLANE: adhoc
      shell: /bin/bash --login -o pipefail
    steps:
      - checkout
      - restore_cache: *restore-gemfile-cache
      - run: *install-gems
      - save_cache: *save-gemfile-cache
      - run:
          name: Fastlane
          command: bundle exec fastlane $FASTLANE_LANE
      - store_artifacts:
          path: output/besafeapp.ipa

...omitted_code

Am I doing something wrong? Thanks

0 Likes

#2

It looks like your Gemfile and probably also your fastlane folder is not in the root of the repo but instead in a subfolder called ios.

Have you tried running:

cd ios; bundle exec fastlane $FASTLANE_LANE
1 Like