How can I use Ruby 2.7.5 with xcode13.1?

I’m trying to get Ruby 2.7.5 to be the version used.

I added this to my .travis.yml:

  - 2.7

This is from the build log:

$ rvm alias create 2.7 ruby-2.7.1

Required ruby-2.7.1 is not installed.
Creating alias 2.7 for ruby-2.7.1....

$ rvm use 2.7 --install --binary --fuzzy

Required ruby-2.7.1 is not installed - installing.
curl: (22) The requested URL returned error: 404 Not Found
Searching for binary rubies, this might take some time.
Requested binary installation but no rubies are available to download, consider skipping --binary flag.
Gemset '' does not exist, 'rvm ruby-2.7.1 do rvm gemset create ' first, or append '--create'.
The command "rvm use 2.7 --install --binary --fuzzy" failed and exited with 2 during .

Can anyone let me know what I’m doing wrong?

Given that you are using xenial or higher, using 2.7.5 shouldn’t be an issue.

Travis CI: Precompiled Ruby Versions.

Here’s a test repo I created for you: Travis CI - Test and Deploy with Confidence. Here is the .travis.yml I created for you:

dist: xenial 
language: ruby
  - 2.5.7
install: skip
script: ruby -v 

The command ruby -v yields:

ruby -v

224ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-linux]

225The command "ruby -v" exited with 0.
1 Like

I need 2.7.5, not 2.5.7.

I’m using objective-c as language and xcode13.1 as the environment.

I can’t tell from this link what if that Ruby version is available for that setup AND how to make sure I’m using it:

Ah, I see,

Just tweaked my .travis.yml, and in the test repo it works:

Would you mind sharing your .travis.yml (if not all of it, the relevant parts that correspond with your issue) as well? It wasn’t clear what you were asking at first, but I understand the question now.

I see you’re still using a different setup though.

The relevant parts of my file:

language: objective-c
osx_image: xcode13.1
sudo: false
  cocoapods: true
  bundler: true

I then tried to add:

  - 2.7.5

which caused the error in the original post.

To use second programming language, please refer to our documentation;

But let the build [1] be completed to use Ruby2.7.5 on the 11.6 image, this may take a day for availability.


[1] Travis CI - Test and Deploy with Confidence