是否有 travis ci 环境变量来获取当前 ruby 版本用于测试?
Is there a travis ci environment variable to get the current ruby version to be used for the test?
在我的 gemfile 中,我有:
ruby ENV['RUBY_VERSION'] || '2.2.0'
RUBY_VERSION 在 travis 中不存在,因为当 travis 运行s 说它不能 运行 时我得到一个错误,因为环境是用一个设置的ruby 的版本,并且 gemfile 指定了另一个版本。
错误:
Your Ruby version is 2.2.0, but your Gemfile specified ruby-2.2.0
是的,有 - TRAVIS_RUBY_VERSION
。
https://docs.travis-ci.com/user/environment-variables#Default-Environment-Variables
在我的 gemfile 中,我有:
ruby ENV['RUBY_VERSION'] || '2.2.0'
RUBY_VERSION 在 travis 中不存在,因为当 travis 运行s 说它不能 运行 时我得到一个错误,因为环境是用一个设置的ruby 的版本,并且 gemfile 指定了另一个版本。
错误:
Your Ruby version is 2.2.0, but your Gemfile specified ruby-2.2.0
是的,有 - TRAVIS_RUBY_VERSION
。
https://docs.travis-ci.com/user/environment-variables#Default-Environment-Variables