I decided to try to build my project with specifying “dist: jammy” instead of “focal”. The build itself went well, however some ruby related error stopped the process at Installing deploy dependencies.
It’s possible that it would work with some “apt-get upgrade” (or dist-upgrade?) also included in the build script, however I find these kind of things problematic, as it greatly increases the build time, thus the amount of consumed credits per build.
Installing deploy dependencies
Successfully installed public_suffix-3.0.3
Successfully installed multipart-post-2.3.0
Successfully installed faraday-0.15.4
Successfully installed addressable-2.8.5
Successfully installed sawyer-0.8.2
Successfully installed octokit-4.6.2
Successfully installed dpl-pages-1.10.16
7 gems installed
/home/travis/.rvm/gems/ruby-3.1.2/gems/faraday-0.15.4/lib/faraday/options.rb:166:in `new': tried to create Proc object without a block (ArgumentError)
from /home/travis/.rvm/gems/ruby-3.1.2/gems/faraday-0.15.4/lib/faraday/options.rb:166:in `memoized'
from /home/travis/.rvm/gems/ruby-3.1.2/gems/faraday-0.15.4/lib/faraday/options.rb:247:in `<class:ProxyOptions>'
from /home/travis/.rvm/gems/ruby-3.1.2/gems/faraday-0.15.4/lib/faraday/options.rb:229:in `<module:Faraday>'
[...etc...]
failed to deploy
So, the core problem of Travis seems to be this one:
/home/travis/.rvm/gems/ruby-3.1.2/gems/faraday-0.15.4/lib/faraday/options.rb:166:in `new’: tried to create Proc object without a block (ArgumentError)
EDIT: just found this report: Github-release fail after ruby version update It is very similar, however I don’t have any “edge” specification. Also it seems to be an older report, which commented to fixed by now.
So in nutshell, it seems, in ruby 2.7 there was a change which brakes older version of ruby_faraday. The solution seems to be to use up-to-date faraday, the issue mentions 1.0 and it seems travis uses 0.15 or something, however ruby seems to be 3.0 (so well above 2.7). Thus the incompatibility.
Unfortunately I don’t know about ruby too much, and I am not sure I can fix this, as my own, like giving various commands in the yml section before_deploy. Since the ruby/gem stuff happens outside of my control when hitting the deploy section, as far as I can see.
FYI I’ve received the following information from Travis support:
It seems jammy doesn’t support ruby versions below v3.x. Since our deployment tool[1] relies on a lower version due to some dependencies, this was raised with our engineering team for a fix to be made. Please keep an eye out on our changelog for further correspondence in this regard.
Not sure if it’s relevant to your particular pipeline but I had the same failure during the deploy stage. Turned out using Focal instead of Jammy fixes the problem for me. HTH