Do we need a database.yml file for a Ruby on rails application using Redis

I created a Ruby on Rails application without active entries: -

$ rails new rails_using_redis_demo_app --skip-active-record 

Now, to perform the database operation, I must include the database.yml file containing the necessary data regarding the database adapter.

I also have follwing in my gemfile: -

 gem 'redis' 

I also found that redis actually stores data in a .rdb file with a pair of key values ​​that can be accessed using existing keys. I am doing everything right.

+4
source share
1 answer

Are all entries in ActiveRecord in the Rails configuration files deleted?

Perhaps you should check the application.rb file.

A typical application.rb file includes

 require 'rails/all' 

This is what you should write instead to completely remove ActiveRecord

 # 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" 

Hope this helps ...

+3
source

All Articles