Can we start (or) run a rails application without any database?
How can I do it?
Can we start (or) run a rails application without any database?
How can I do it?
At the beginning of your config/application.rb
file you should have something like this:
require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
#require "active_resource/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
When you remove this line:
require "active_record/railtie"
ActiveRecord
will be gone and your app won't require a database connection.
You can also create the project with --skip-activerecord
if it's a new one.
Check this link Rails 3 - how do I avoid database altogether?.
You just need to make sure in configuration that the database related classes are not in use. There might be more help on web.