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.
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
Accepted answer in this post of mechanicalfish is right.
But in my case, I've done following 2 additional things (I've used Rails 5.1.2)
Delete model files in models directory
models/application_record.rb
models/widget.rb
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With