What is ActiveSalesforce?

ActiveSalesforce (ASF) is a Ruby on Rails framework connection adapter that provides direct access to Force.com managed data via the Force.com SOAP API and Rail's ActiveRecord model layer. Standard and custom objects, standard and custom fields are all automatically surfaced as active record attributes, simplifying the creation of applications that use data from those entities. ASF also includes a Force.com aware scaffold generator that leverages layout metadata to generate list, show, edit, and new views and a corresponding controller that closely match the look and feel of their native Force.com counterparts.

With ActiveSalesforce, developers can extend Force.com and create new composite Apex applications directly through the Rails framework.

ActiveSalesforce is an open source project created and managed by the Force.com developer community. Salesforce.com support cannot provide assistance with your use of this code. Developers can find community support available via the message boards at developer.force.com, or the ActiveSalesforce Help forum.

There is also a new Google Group to connect developers and users of Active Salesforce:

http://groups.google.com/group/activesalesforce

and you can find the latest version of ActiveSalesforce on GitHub:

http://github.com/luigi/activerecord-activesalesforce-adapter/

How do I get started with ActiveSalesforce?

ActiveSalesforce is distributed via RubyGems, and is available via a few simple steps. In addition to requiring Rails, you'll need either a salesforce.com Enterprise Edition or Developer Edition account; if you don't have one already, you can get a free Developer Edition account here.

The below describes ancient (which is older than a month ;) rails 1.0 procedures. For contemporary 2.x docs visit http://activesfdc.rubyforge.org/ .

To get started, install ActiveSalesforce:

$ gem install activesalesforce

If you haven't already done so, generate your rails app:

$ rails yourappname

Open the config/environment.rb file to add the required dependancy. At the end of the "Rails::Initializer.run do |config|" block, add:

require 'activesalesforce'

Next, edit the database.yml file to add your salesforce.com account information.

adapter: activesalesforce
url: https://www.salesforce.com
username: salesforce-username
password: salesforce-password

Thats it! You can now generate Rails for all of your Apex objects just as you would for a local database table.

NOTE: If you want to access your Salesforce Sandbox account use https://test.salesforce.com as your url instead

How do I get started with Rails?

There are a number of great resources available to get you up an running quickly with rails. For help getting your rails environment setup, you can visit the rubyonrails.org wiki's getting started page.