Disable ActiveRecord in Ruby on Rails 5

Viewed 5980

I am a newbie in Rails.

I want to disable ActiveRecord in Rails 5.

I've already found several answers Here, Here and Here

But none of them seems working for me.

Would you help me with this issue, please?

Thanks.

3 Answers

Just to update, there is no need to delete anything by hand if you are using Rails 5 or greater.

For new rails application in Rails version 5 or newer, all of these are handled. Just run the rails new command with -O (--skip-active-record) argument.

> rails new proj_no_db -O

For api only Rails application without DB,

> rails new proj_api_no_db -O --api

Just comment database in database.yml and it will be working. Tested in rails 5.2

 username: root
 password: anyPass
 #database: db_name
Related