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
Tag: Ruby on Rails
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
RSpec Tips & Tricks
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 … Continue reading RSpec Tips & Tricks
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
Seed Data In Ruby On Rails
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 … Continue reading Seed Data In Ruby On Rails
Acceptance Testing with Cucumber
After watching a Pivotal Labs Tech Talk Making a Case for Cucumber, I decided to give it a try. Especially the seamless integration with rails and webrat made me curious. Webrat is a headless browser simulator, which can execute UI tests for you. You even can use the same syntax to drive a real browser … Continue reading Acceptance Testing with Cucumber