Blake Smith

create. code. learn.

»

rails 3 app without a database

In Rails 2, you used to be able to run an application without a database by adding the following line to your config/environment.rb file:

config.frameworks -= [ :active_record ]

Rails 3 has switched the convention around. Go into your config/application.rb file and remove the following line:

require 'rails/all'

Replace it with the following lines:

require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "rails/test_unit/railtie"

You should now be able to fire up your rails application without a database.


about the author

Blake Smith is a Principal Software Engineer at Sprout Social.