0

I'm following the tutorial from CircleCI (https://circleci.com/blog/deploy-flutter-android/) to deploy android flutter apps. After installing and configuring fastlane I set the following config.yml:

version: 2.1

executors:
  android-flutter:
    docker:
      - image: gmemstr/flutter-fastlane:latest
    environment:
      TERM: dumb
      _JAVA_OPTIONS: "-Xmx2048m -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
      GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m"'
jobs:
  beta_deploy:
    executor: android-flutter
    steps:
      - checkout
      - run: echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > key.jks
      - run: echo "$PLAY_STORE_UPLOAD_KEY_INFO" | base64 --decode > android/key.properties
      - run: cd android && fastlane beta

workflows:
  deploy:
    jobs:
      - beta_deploy:
          filters:
            branches:
              only: beta

But I receive the error: Could not find 'bundler' (2.3.11) required by your xx/Gemfile.lock. I can't install bundler using gem install so what do I have to change?


Edit: When doing bundle install it results in

Gemfile.lock is bundled with bundler version 2.3.11
Installing bundler 2.3.11
Fetching bundler-2.3.11.gem
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /var/lib/gems/2.7.0 directory.
Ma1
  • 232
  • 3
  • 10

1 Answers1

0

Make sure you're entering "bundle" update, if you have the bundler gem installed.

bundle update

If you don't have bundler installed, do gem install bundler.

  • Thanks but somehow I can't do that. It results in "you don't have write permissions". Please see my edit. – Ma1 Aug 02 '22 at 07:39
  • Here is the solution of your problem.[link](https://stackoverflow.com/questions/37720892/you-dont-have-write-permissions-for-the-var-lib-gems-2-3-0-directory) –  Aug 02 '22 at 07:43
  • That path is a system path so you need to prefix your command with `sudo`. – FelicianoTech Aug 03 '22 at 14:46