Queried the experience of the great God
Http://stackoverflow.com/questions/19078044/disable-activerecord-for-rails-4
Http://stackoverflow.com/questions/821251/how-to-configure-ruby-on-rails-with-no-database
The one I liked the most was the way I used it.
If you is creating a new application, you can use-O to skip activerecord:rails new My_app-ofor Existing applications:1. Remove Database Adapter Gems fromyour Gemfile (MYSQL2, Sqlite3, etc.)2. Change your config/Application.rbremove require'Rails/all line and require frameworks your want to use, for example:require"Action_controller/railtie"require"Action_mailer/railtie"require"Sprockets/railtie"require"Rails/test_unit/railtie"3. Delete your config/database.yml file, db/schema.rb andMigrations (ifAny )4. Delete Migration Checkinchtest/test_helper.rb5. Delete any ActiveRecord configuration fromYour config/environments files (this isWhat iscausing your error)
This step directly deletes all the files in environments. isAll need to do forAn empty Rails app. If you run to problems caused by your existing code, stack trace should give you sufficient information on what do you need to the change. You might forExample have some ActiveRecord configurationinchYour initializers.
6. Remove the call to model from the controller and delete the model's dependency on ActiveRecord
Ruby on Rails New project does not use database, configuration process logging