Came up against this recently when trying to upgrade a Rails app which was using MongoDB. Obviously I didn't want to use ActiveRecord, so I set about removing it.
The old way of removing ActiveRecord was to place this line in the environment.rb file, "config.frameworks -= [ :active_record ]". However, in Rails 3 you can simply pass the "-O" switch to the rails command, like so:-
rails yourapp -O
But what if you've already created your app? If you look in your config/application.rb file, you'll see this line at the top:-
This does what it says on the tin; includes all rails modules. If you want to exclude ActiveRecord, remove the above line and replace it with:-
# Pick the frameworks you want: # require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "active_resource/railtie" require "rails/test_unit/railtie"
This is the beauty of Rails 3, pick and choose what suits you.