Ruby 2.5.0 still a problem

Same result. Did this as a pre of machine:

sudo ln -s /home/circleci /home/travis

ln: failed to create symbolic link `/home/travis': File exists

sudo ln -s /home/circleci /home/travis returned exit code 1

Action failed: sudo ln -s /home/circleci /home/travis

The problem is you can’t create a symbolic link called /home/travis on the machine when home Travis already exists. In all the variants that have been suggested, it has failed because the link trying to be created already exists.

I guess the idea of this work around is this is trying to put the link in place before ruby 2.5 is installed in /home/travis. But that’s not going to work if /home/travis already exists.

So I attempted this as the pre to machine:

  pre:
    - sudo rm -rf /home/travis
    - sudo ln -s /opt/circleci /home/travis

and with the variant of /home:

  pre:
    - sudo rm -rf /home/travis
    - sudo ln -s /home/circleci /home/travis

And so while that succeeded in creating the link this time. It didn’t actually solve the problem. Still fails at bundle install:

bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 

bash: /home/ubuntu/.rvm/rubies/ruby-2.5.0/bin/bundle: /home/travis/.rvm/rubies/ruby-2.5.0/bin/ruby: bad interpreter: No such file or directory
bash: /home/ubuntu/.rvm/rubies/ruby-2.5.0/bin/bundle: /home/travis/.rvm/rubies/ruby-2.5.0/bin/ruby: bad interpreter: No such file or directory

bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3  returned exit code 126

Action failed: bundle install