Skip to main content
Ruby

Setting Up a Killer CI for Your Rails Application

Nesha Zoric

In this blog, we'll dive into configuring a robust Continuous Integration (CI) setup for your Rails application. We'll be using a popular open-source project called Chatwood as our example. This guide will walk you through each step, ensuring that you can replicate the process for your own projects.

Forking the Project

To get started, the first step is to fork the Chatwood project. This creates a personal copy of the repository that you can modify without affecting the original project. Forking is a common practice in open-source development, allowing you to experiment with changes or enhancements.

Forking the Chatwood project

Once you have forked the project, the next step is to install the Ruby CI GitHub app. This app is essential for integrating CI into your workflow.

Installing the Ruby CI GitHub App

To install the Ruby CI app, you simply need to search for "Ruby" on GitHub. It should be the first result in the search. Click on it, and then scroll down to find the option to install it for free.

Installing Ruby CI GitHub App

After installing, you'll be directed to the Ruby CI interface. Here, select your newly forked project and click on the connect button. This simple action will link your project with the Ruby CI platform.

Setting Up Your Environment Variables

One of the primary differences with Ruby CI compared to other CI platforms is its ease of setup. After connecting your project, you’ll need to set up your environment variables. This is crucial because environment variables allow your application to run with the necessary configurations and secrets.

Setting up environment variables

Once you've configured your environment variables, click on the "analyze" button. At this point, Ruby CI will begin analyzing your project. The platform gathers information about your project's dependencies, including essential elements like Selenium, Elasticsearch, Redis, and PostgreSQL.

Analyzing Your Project

This analysis process may take between 5 to 10 minutes, depending on the complexity of your project. During this time, Ruby CI is working hard to create a custom environment tailored specifically for your project needs.

Analyzing project dependencies

After the analysis is complete, you will be redirected to the environments tab. Here, you can verify that the auto setup was successful. If you need to make any changes, such as modifying versions or adding specific buildbacks, you can do so by editing the YAML file generated by Ruby CI.

Customizing Your YAML Configuration

The YAML file is where you can fine-tune the CI environment to fit your project's requirements. Customizing this file allows you to specify particular versions of dependencies or adjust settings that suit your development workflow.

Editing the YAML file

And that's all for this video! In the next installment, we'll explore some of the amazing and unique features that make Ruby CI a no-brainer choice for your Rails application.

Conclusion

This guide has provided a straightforward approach to setting up a killer CI for your Rails application using Ruby CI. By forking the Chatwood project and configuring Ruby CI, you can ensure that your application is well-prepared for continuous integration and deployment.

Stay tuned for the next part, where we will delve deeper into the features of Ruby CI that can enhance your development experience.