Pete Hamilton

CI for Rails With CircleCi

Recently I have been working on a Rails app to facilitate Corporate & Industry links here at Imperial.

As a team we decided that some form of continuous integration was needed and so I set about in search of a solution. We just needed something simple so we could start making use of CI straight away and get the hang of integrating it into our workflow.

I looked at a few potential solutions and have outlined a brief summary of my findings.

Option 1 - Travis CI

Travis CI seems like a fantastic CI system and I’ve seen it all over various repositories and projects so it was my first port of call.

Unfortunately it transpires that Travis CI doesn’t currently support private repositories and given the nature of the project, it can’t be hosted in a public repo just yet.

Apparently you can sign up for early-access to Travis CI at but it doesn’t appear ready yet.

Option 2 - Roll your own

Another option I considered was a ‘roll-you-own’ approach. Surely it couldn’t be complicated to set up a local virtual machine or even a server in the cloud. This could then repeatedly pull in changes from the git repository and re-run test and integration suites. If anything failed, I could simply have it email/text/notify me.

It sounds simple, but as I discovered, I had grossly oversimplified the process. Whilst this method theoretically worked for this particular project, it would get very complicated when people started branching to work on features etc. I still wanted the other team members to be able to take advantage of the test suites which we were writing, even if they weren’t on the master branch (without too much code-fu).

Option 3 - Circle CI

Similar to Travis CI, Circle CI is currently in beta and so is offering the ability to sign up private repositories on their system for free.

After a very basic setup linking the code repository and their continuous integration system, we were off! A nice clean list of commits (on all branches) and the consequent status of the build/test suite.

There were a few hiccups and it feels much less polished and feature-filled than Travis CI but the functionality is there and it works. On top of this, on the odd occasion we have had questions or issues, the team has been fantastic and taken our feedback on board. The one issue we did have (some failed auto-pulls of my git repo) was fixed within a matter of hours and didn’t really slow us down at all.


Out of the selection of options above and the few others I looked over, the easiest to integrate with (for this project right now) was Circle CI.

However, if this was an open source community project, I would choose Travis CI hands down. It just seems more mature and also has the weight of the open source community behind a lot of additional plugins and features which.