Using Cloud Foundry Services with Ruby: Part 1 – Auto-reconfiguration

by March 12, 2012

Right from the launch, Cloud Foundry supported auto-reconfiguration of Spring and Rails apps that use a relational database service.  This allowed deploying such an app without changing a single line of code.  Recently, we extended this support for Spring apps to cover all services (Redis, Mongo, and Rabbit).  We are now extending this support for all services for Rails and making this available for Sinatra apps as well.  In this blog, we will explore how auto-reconfiguration works with Rails and Sinatra applications.
Auto-reconfiguration in action
To demonstrate auto-reconfiguration, we will grab an application from github and deploy it to Cloud Foundry without modification.  Let’s use lamernews, a Sinatra app that uses Redis.