NullVoxPopuli
NullVoxPopuli

Reputation: 65143

Is there a travis ci environment variable to get the current ruby version to be used for the test?

in my gemfile, I have:

ruby ENV['RUBY_VERSION'] || '2.2.0'

RUBY_VERSION is doesn't exist in travis, as I get an error when travis runs saying that it can't run because the environment is set up with one version of ruby, and the gemfile specifies another.

the error:

Your Ruby version is 2.2.0, but your Gemfile specified ruby-2.2.0

Upvotes: 0

Views: 281

Answers (1)

rohitpaulk
rohitpaulk

Reputation: 427

Yes, there is - TRAVIS_RUBY_VERSION.

https://docs.travis-ci.com/user/environment-variables#Default-Environment-Variables

Upvotes: 2

Related Questions