Continuous Integration, and Continuous Deployment for Ruby/Rails

Scrutinizer makes testing and analyzing Rails code simple. Before each build, Scrutinizer infers your build configuration and test commands. This works very well most of the time. If you have a specific set-up that does not follow the standard practices, you can fine tune your configuration by placing a .scrutinizer.yml file in your project's root folder.

Ruby Version

We use rbenv to make a range of Ruby versions available in our build environment. By default, we either use 1.9.3-p448 or 1.8.7-p358 for running your build, whatever seems best.

If you would like to force a specific Ruby version, you can do so in your .scrutinizer.yml:

        ruby: 'jruby-1.7.9'

You can learn more about how the configuration file works, and the available Ruby versions and checks in our build environment documentation.


Scrutinizer automatically installs your dependencies if you have placed a Gemfile in your project using bundle install. If you need to run other commands, you can add them in your .scrutinizer.yml:

            - bundle exec rake assets:precompile

Project Setup/Database

We will take care of initializing the database using the standard rake tasks for setting up and migrating your database. We provide several databases and queues including MySQL, PostgreSQL, and RabbitMQ pre-installed, if you like you can also install custom software in your build environment.


Scrutinizer will automatically try to infer your test commands. We support running tests via Test::Unit, MiniTest, cucumber, spinach, rspec, jasmine, konacha and qunit.

You can override the default test commands in your .scrutinizer.yml file:

            - ./

Code Coverage

Scrutinizer can automatically process the code coverage of your test runs - whether you only have a single run or run your tests in parallel. When you have set-up the scrutinizer-ocular gem, you can adjust your test command to generate code coverage:

                command: bundle exec rake test
                    'SCRUTINIZER_CC_FILE': 'my-coverage'
                    file: 'my-coverage'
                    format: 'rb-cc'

If you have multiple commands that generate code coverage data, we will automatically take care of merging it.


Scrutinizer provides first-class support for deployment. Once all your tests have passed, it will automatically trigger deployment of your code. You can define deploy commands in your .scrutinizer.yml file:

            branch: master          # you can use either the full branch name,
            branch: feature_*       # an asterisc for e.g. any feature branches
            branch: /feature_.*/    # or the same as a regular expression
                - cap deploy

Automated Reviews

Scrutinizer supports a wide-range of automated checks for Ruby code including code rating, code metrics, duplicate code detection, and many more. A basic configuration which enables code rating and duplicate code detection looks like this:

    ruby: true

Learn more about configuring automated code reviews for Ruby.