GitHub Pages deploy failing on Trusty: dpl failing to install

There appears to be a permissions error when dpl is being installed:

$ rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied @ rb_sysopen - /home/travis/.rvm/gems/ruby-2.4.1/wrappers/nokogiri
The command "rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl" failed and exited with 1 during .

So far, I’ve noticed that the Bundler (1.16.6 -> 1.17.2) and gem (2.7.8 -> 3.0.0) versions have changed since it was last working:

Before

$ ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
$ rvm --version
rvm 1.29.3 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
$ bundle --version
Bundler version 1.16.6
$ gem --version
2.7.8

Now

$ ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
$ rvm --version
rvm 1.29.3 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
$ bundle --version
Bundler version 1.17.2
$ gem --version
3.0.0

I decided to try changing from Trusty to Xenial, and dpl now installs:

$ rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl
Successfully installed dpl-1.10.6
1 gem installed

Here are the versions when using Xenial:

ruby --version
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
$ rvm --version
rvm 1.29.4 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
$ bundle --version
Bundler version 1.17.1
$ gem --version
2.7.7

I’m not going to debug any further. Perhaps this info could help someone in the future.

Could you point to a failing build log URL? Thanks.