How to Deploy Ruby on Rails With The Opscode Chef Application Cookbook

I already wrote about how to get started with the Opscode Chef Platform. In this article I want to show you a very elegant way to deploy a Ruby on Rails stack with Chef. One of the strengths of Chef is the decent set of available cookbooks. @jtimberman does an especially excellent job in writing … Continue reading How to Deploy Ruby on Rails With The Opscode Chef Application Cookbook

Far Future Expires Headers For Ruby On Rails With Nginx

Browsers load static images from your website again and again if your web server does not send an expires header with a date far in the future. To avoid that unnecessary traffic on your servers and unnecessary load times for your users, it's a good idea to let your nginx send those expires headers. But, … Continue reading Far Future Expires Headers For Ruby On Rails With Nginx

Rethinking code reuse with Modularity for Ruby

This is a guest post by our friends over at makandra, a cool Ruby on Rails development shop. Today they announce a great new Ruby gem for dealing with separating concerns in your ActiveRecord models. Reusing code is hard. But although we knew that high-level components don't work, we found ourselves rewriting similar code again … Continue reading Rethinking code reuse with Modularity for Ruby

Real World Example: Using factory_girl to simplify our test setup

When you do integration testing in a ruby on rails application, you don't want to stub out all involved models. Rails' built in approach of using fixtures is considered to be sub-optimal and the way to go today is to use factories. Homegrown Factories In our application we used to write our own factories, one … Continue reading Real World Example: Using factory_girl to simplify our test setup

Aegis: Role-based Permissions for your Ruby on Rails application

This is a guest post by our friends over at makandra, a cool Ruby on Rails development shop. Today they announce a great new Ruby gem for dealing with role-based permissions. You know the game! Each time you start a new application the same procedure starts over again: You set up your tools like git, … Continue reading Aegis: Role-based Permissions for your Ruby on Rails application

Setting up a test database on a ruby on rails continuous integration server using SQL instead of schema.rb

For developing our Ruby on Rails based web site, we usually take regular SQL dumps from our production servers (of course, anonymizing sensitive customer data along the way). Always having a fresh dump allows us to be on the safe side when writing database migrations. Having an up to date development database enables us to … Continue reading Setting up a test database on a ruby on rails continuous integration server using SQL instead of schema.rb

webrat: Automated Acceptance Testing with RSpec or Cucumber

Recently, I was looking deeper into how we could add some automated acceptance tests to our Ruby on Rails based website. We're using RSpec since quite a while now for TDD, but doing some high level acceptance tests was not on our agenda so far. DRY Cucumber Scenarios The new cool kid on the block … Continue reading webrat: Automated Acceptance Testing with RSpec or Cucumber