dpl icon indicating copy to clipboard operation
dpl copied to clipboard

DPL seems not compatible with ruby 3.2.0

Open curzolapierre opened this issue 3 years ago • 2 comments

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.

curzolapierre avatar Dec 29 '22 13:12 curzolapierre

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

SleeplessByte avatar Jan 09 '23 15:01 SleeplessByte

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

Mth0158 avatar Jan 03 '24 18:01 Mth0158