Hi, I''m trying to switch from one database to another. Current, I have this: def set_database @client_id = ''production'' config = YAML.load( File.open(File.join(RAILS_ROOT, ''config/ database.yml'')) ) db = config[@client_id] raise ''Invalid client id'' if db.nil? ActiveRecord::Base.connection ActiveRecord::Base.establish_connection(db) end Obviously, that''s not working ''cause I''m asking for help! :) No errors being thrown, but database is not getting switched. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---