Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Install Ruby gems on all agents using TeamCity?

I am working on Teamcity 6.5.6, and looking for a way to automatically install required ruby GEMS on build agents. For Ex: Suppose I have two gems that are required on each agent/remote (build) machine. Ex: Watir and Selenium gems. Then am I suppose to install them manually by logging on to those machines, or can I do keep them in a common library folder in SVN, and perform some tasks in Teamcity to install them if not present on machine. If so, then What would be that task in Teamcity?

Thanks

like image 878
Viku Avatar asked Feb 22 '12 22:02

Viku


1 Answers

Take a look at Bundler.

You could maintain a list of your required gems in a Gemfile, then run bundle install on each machine before the build starts. This would install all of the gems in the Gemfile (and you could lock gems to a particular version by also including the Gemfile.lock file).

like image 89
Jamie Penney Avatar answered Sep 28 '22 17:09

Jamie Penney