Fog is a Ruby gem that gives a web developer control of cloud services through a unified API. Fog features both server cloud and storage based services, including support for most popular solutions (the lsit is pretty impressive) like Amazon S3 and Rackspace Files, Amazon EC2, Rackspace Servers, Terremark vCloud and Slicehost. Amazon ELB and SimpleDB are also supported.

The strong point of Fog gem for Ruby on Rails is it’s versatility. That versatility comes from utilizing object mapping (just like ActiveRecord mapper in Ruby on Rails framework) that allows easy switching between different cloud services. Some experienced Ruby on Rails developers may ask here: and what about features that are exclusively available only in certain solutions?

Well, fog’s Requests help you do just that – every cloud has an internal API that fog allows you to use as well as the uncommon features of particular services.

Here is the example command:

AWS.servers.create(:image_id => 'ami-5ee70037')

Looks like the Ruby code from Ruby on Rails application, right? This one command actually sets up the whole instance and loads it up. Just check Fog documentation and build your own, automated scripts for cloud computing your Ruby on Rails applications. Fog is safe for production and is an ideal choice if you are looking for some cloud control tool.