Ruby on Rails – Open source web application framework for Ruby

Read more posts below for ruby on rails tutorials and rails web development.

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 [...]

Far Future Expires Headers For Ruby On Rails With Nginx

by Matthias Marschall on July 20, 2010 · 0 comments

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, [...]

Rethinking code reuse with Modularity for Ruby

by Matthias Marschall on March 26, 2010 · 2 comments

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 [...]

RSpec Tips & Tricks

by Matthias Marschall on February 18, 2010 · 0 comments

Throughout the last couple of days, I did a bigger refactoring of our Ruby on Rails application. As I changed quite a few moving parts, I covered everything I did with RSpec. It’s really an incredible feeling to have all your bases covered with automated tests when you finally start the manual regression test. Along [...]

Post image for 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.

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, [...]

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 [...]

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 [...]

Seed Data In Ruby On Rails

by Matthias Marschall on May 28, 2009 · 12 comments

To run automated tests for your Ruby on Rails webapp, not only do you need your latest database structure deployed to the test database (created by rake db:test:prepare), but you also need some seed data for lookup tables, e.g. like zip codes. Common approaches like adding seed data through rails migrations are discouraged, and plugins [...]

Acceptance Testing with Cucumber

by Matthias Marschall on May 22, 2009 · 0 comments