travis-ci / dpl

Dpl (dee-pee-ell) is a deploy tool made for continuous deployment.
MIT License
1.29k stars 367 forks source link

DPL seems not compatible with ruby 3.2.0 #1268

Open curzolapierre opened 1 year ago

curzolapierre commented 1 year ago

From the new ruby release (3.2.0), Dir.exists? and File.exists? have been removed.

So exists? method is not working anymore.

Example:

➜ dpl --provider=scalingo --app=$SCALINGO_APP_NAME --api-token=$SCALINGO_API_TOKEN --region=$SCALINGO_REGION --branch=refs/heads/master
Support for deployments to Scalingo is in **alpha**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
$ timeout 60 ./scalingo keys-remove dpl_tmp_key
timeout: failed to run command './scalingo': No such file or directory
Failed to remove the ssh key.

From ruby doc File.exist? should be used instead.

SleeplessByte commented 1 year ago

It's also not compatible with 3.1.x. See #1234

Mth0158 commented 11 months ago

Hi @curzolapierre & @SleeplessByte, I had the same issue while upgrading to Ruby >= 3.1.x, since it's a small scale app, the fix was to change the Gitlab deployment to Scalingo by linking the Gitlab repo to Scalingo instead of using a deploy pipeline stage. It will automatically add a new step in your pipeline as illustrated below:

image

You can find more information about it here: https://doc.scalingo.com/platform/deployment/deploy-with-gitlab