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

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

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
2 Likes

@petergp it worked thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.