Travis-ci doesn't switch to specified ruby ​​version on android project build

I am trying to run the ruby ​​tool after successfully building travis for android and I need rvm version 2.0.0 for that, but even when I specified the rvm version in .travis.yml, installing the package installs the following error:

Your Ruby version is 1.9.3, but your Gemfile is listed as 2.0.0

To try and recognize the ruby ​​version of travis, I tried the following:

  • Created a .ruby version file since 2.0.0
  • Install rvm version to .travis.yml as follows:
language: android
rvm:  
- 2.0.0
...
after_script:
- bundle install

      

  • Install the ruby ​​version in the Gemfile according to the desired rvm version:

    ruby: '2.0.0'

None of these options worked and I always got the above message. Is there something else I forgot to do?

Thanks and regards, Federico.-

+3


source to share


1 answer


According to travis-ci support:

"For Android builds, RVM only has 1.9.3 installed (and we don't extend the rvm section in .travis.yml for non-Ruby builds, so the specs in this section are ignored). To get Ruby 2.0.0 for your Android images use : in the section, before_install

you can add appropriate lines to install / enable via RVM, for example:



before_install:
   - rvm install 2.0.0

      

So basically I removed the "rvm" section on travis.yml and added "rvm install 2.0.0" in the before_install section and solved the problem.

+5


source







All Articles