You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to use read_from_slave in a standalone environment? I'm trying the following without success (all reads, even inside of with_primary_slave go to the master). I'm using activerecord 3.1.3 and read_from_slave 0.5.2.
require'rubygems'require'active_record'db_config=YAML::load(File.open(File.join(File.dirname(__FILE__),'config','database.yml')))ActiveRecord::Base.establish_connection(db_config)require'read_from_slave'classMember < ActiveRecord::Base;end# Queries master instead of slaveMember.first# Also queries master instead of slaveActiveRecord::Base.with_primary_slavedoMember.firstend
The text was updated successfully, but these errors were encountered:
Is it possible to use read_from_slave in a standalone environment? I'm trying the following without success (all reads, even inside of
with_primary_slave
go to the master). I'm using activerecord 3.1.3 and read_from_slave 0.5.2.config/database.yml
example code
The text was updated successfully, but these errors were encountered: