Tag Archives: cruisecontrolrb

Setup your Rails environment with rails_setup

Rails provides great tools to manage the application environment. Using gems instead of freezed librairies is usefull in many cases (when you’re using GitHub for example ;-) ). But it can become quickly painful too.

A specific situation makes the “all-in-gems” policy very painful : making a continuous integration server with a several rails projects. Adding a project, changing a config.gem, each time you need to make the required gem installs in a ssh session :-(

rails_setup provides a simple solution.

You’re a new developer on a rails project ? Retrieve the project sources and make ./script/rails_setup. It will install :

  • the rails gem (and “active” dependencies) (in the version required by the project)
  • the gems configured in the application,
  • the gems required by the database adapter (to be improved)

If you’re using a continuous integration tool (like CruiseControl.rb), build yours projects with ./scripts/rake_with_rails_setup (which runs rails_setup before rake). With the provided sudo support, your CruiseControl.rb daemon user will install required gems for you.

rails_setup is a very simple rails plugin which provides a small set of scripts and rake tasks :

./script/plugin install git://github.com/albanpeignier/rails_setup.git

More details in the rails_setup README file.

Install CruiseControl.rb on debian or ubuntu

CruiseControl.rb is a continuous integration tool. It runs a build process when modifications are detected in a project. Java developers know CruiseControl (often discussed in this blog). CruiseControl.rb is very practical for projects built with rake, especially rails projects.

For example, CruiseControl.rb can:

  • follow several branches of your project,
  • run tests or specs in a clean environment,
  • notify our team when something goes wrong (by email, twitter, jabber, irc, campfire, …),
  • deploy with capistrano our development stage when specs are verified,

This CruiseControl.rb debian package is based on CruiseControl.rb github branch of ThoughtWorks.

Continue reading