Faraday::Connection without adapter has been made. CICD on Gitlab
Asked Answered
R

2

6

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

Retharethink answered 4/1, 2022 at 22:54 Comment(0)
S
7

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
Stortz answered 5/1, 2022 at 4:58 Comment(0)
K
0

I add the step below and it works fine

- gem install faraday -v 1.8.0
Karlynkarma answered 5/1, 2022 at 13:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.