Peter Alfvin Peter Alfvin - 7 months ago 26
Ruby Question

How to access secondary travis logs

I know the primary travis build logs are available on the web and with the

logs
command in the travis command line client, but I was wondering if there is a way to access other files generated as part of the build process, such as the file
/home/travis/.rvm/log/1391454748_rbx-2.2.4/rubygems.install.log
referenced in https://travis-ci.org/rspec/rspec-its/jobs/18148204

Answer

Those files are lost once the build is finished. If you want to read them, you should add a cat command to print out to the log you see.

before_script: cat /home/travis/.rvm/log/*_rbx-2.2.4/rubygems.install.log

If the install command is failing, then you should override install to install the gem for which the installation is failing:

install: gem install XXX || cat /home/travis/.rvm/log/*_rbx-2.2.4/rubygems.install.log