Home > other >  Faraday::Connection without adapter has been made. CICD on Gitlab
Faraday::Connection without adapter has been made. CICD on Gitlab

Time:01-06

everything was going well, before this morning, I'm totally new to cicd and things like that so I write this to deploy my app to heroku

`'API deploy':
  stage: deploy back
  image: ruby:latest
  script:
    - apt-get update -qy
    - apt-get install -y ruby-dev    
    - gem install dpl
    - cd back
    - dpl --provider=heroku --app=$HEROKU_BACK --api-key=$HEROKU_API_KEY --skip_cleanup
  only:
    refs:
      - main
    changes:
      - back/**/*
      - .gitlab-ci.yml`

And I receive this:

An attempt to run a request with a Faraday::Connection without adapter has been made. (RuntimeError)
Please set Faraday.default_adapter or provide one when initializing the connection.

I really don't know how to do it and whats going on as I say yesterday all was good.

Update: It's seems due to the current update Faraday-2.0.0

CodePudding user response:

I faced the same problem today. Apparently there is some problem in the latest version of FARADAY, at the moment. I solved it this way: add manual installation of the previous version of the dependency to your .gitlab.yml, and everything will work. Have a nice day.

before_script:
  - apt-get update -qy
  - apt-get install -y ruby-dev
  - gem install dpl
  - gem install faraday -v 1.8.0

CodePudding user response:

I add the step below and it works fine

- gem install faraday -v 1.8.0
  •  Tags:  
  • Related