search for: howtousemultipledatabases

Displaying 17 results from an estimated 17 matches for "howtousemultipledatabases".

2006 Mar 09
3
How to copy between databases?
I want to copy data from one database to another using rails. But, it seems that rails only will talk to one database at a time. Is there a way around this? Any help would be greatly appreciated. -- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed...
2006 Jan 18
1
Helps!!!!! Rails database connection guru needed!!!!!!!
...hing we miss that make us misunderstand the mecanism of connection and reconnection???? Question B inside the same methode of a controller, like: www.myrails.com/mycontroller/mymethode1. It is possible to change the database, because the example give on the http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases the basic idea is to change the connection, while user change methode(link to a new page or something...) is it possible to change the database inside the same method? like class mycontroller < ApplicationController def mymethode1 # first connection ActiveRecord::base.establish_connection...
2006 Jan 09
4
Switching databases in Rails v1.0 app
...login shows my area of interest to be boats, then I want to disconnect from the system-level database, and establish a connection to the boats database. At this point in time only the system-level database appears in the database.yml file. The example at http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases seemed pretty straight-forward, but I''ve been unable to make this work. The code in "hijack_db" is executing, but the new database is not connected when the change to my "items" connector is called. The example looks like it''s for a version of Rails prior t...
2006 Feb 08
8
Strategies for Unit testing 2 databases
Hi, My application spans 2 (or more) databases for some very specific reasons... My models are working fine, even dynamically establishing connections as needed at runtime, and spanning relationships across the databases (which really impressed me). The problem is, I can''t seem to force Units for these models (that use a secondary db) to load their fixtures into and use the
2006 Mar 16
5
Multiple databases + switching databases
Hello, I have an application that access two different DBMS - Firebird and Postgres. So far, that''s ok. The problem is, depending on the customer logged, a different database (Firebird) must be selected. To make the things clearer: Postgres: 1 database shared by all customers with these tables: - user - vehicle - driver Firebird: several databases with different names and identical
2006 Jul 14
2
Per Session Database Connection
Hi, I am creating a Rails front-end for a legacy application. For this application the username and password for the database must be provided by the user. i.e. each session needs a separate connection to the database using the credentials of the user logged in to that session. Does anyone have any idea where to even start? It seems like Rails won''t boot without a database
2006 Jun 15
1
multple sqlite connections from single rails application
Please help to work out solution for the following task : There are several users of my application and I want to allow each one to have personal sqlite database. It''s going to be very useful for me when all user''s data incapsulated in one single file. All users can be logged-in at one time. Is it possible to implement it with ruby on rails? If so what is the best way to
2006 Apr 19
1
Separate databases for reads and writes?
Hi all - New to rails... been reading as much as I can though and have yet to find a solid answer (although I think I found an unsolid negative). I''m wondering if there''s a way to split up the reads and writes in Rails so that pages/actions that don''t need to write can query from a group of mirrored databases. And my content managers can update a single master. I
2006 Feb 13
1
master and slave issue.
hi all. i have a model called "Comment": #--------------------------------------------------------- class Comment < ActiveRecord::Base def read ... end def write ... end end #--------------------------------------------------------- i want "read" connect to slave server and "write" connect to master server any ideas? all regards. -- Posted via
2005 Nov 28
1
Getting a model to connect to a different DB
...ll the User model specifically to connect to the user DB. I have added an extra DB definition to the databases.yml file but I''m not sure how to tell the User model to use this database. How can I do this? There are instuctions on the rails wiki (http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases) but they don''t seem to work ;( Thanks! Sirdavidoff -- Posted via http://www.ruby-forum.com/.
2007 Apr 24
2
remote database ActiveRecord model
Does anyone know how to make a model connect to a remote database and only for that specific model? That way I can do the typical CRUD functions on a remote server? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2006 Sep 21
10
Can I use 2 DB connections in my app?
Hi there! How can i use 2 database connections in my rails application ( if it''s possible of course ): one for reading from DB and one for writing to DB? Thanks, Dmitry -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2006 Jan 13
1
How to disconnect to a database????
Hi, We have experienced some problems with ActiveRecord::Base class of Ruby-Rails. We are building a web-application based on the Ruby-rails framework and the web-application needs to access to difference databases, so we do not pre-define our database accesses in the database.yml file. In fact, we are using the ActiveRecord::Base.establish_connection() to connect to our database, the function
2006 Feb 27
5
Database connections...so many connections!
...ll. I am currently running a very simple ruby app. It connects to an Oracle server using the OCI8 adapter. I have two controllers, each one connects to a different schema on the server, I looked at the WIKI that had details of multiple database connections (http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases), I moved the code from the application controller into each controller (as I thought it was prettier / easier / simpler ) . In each controller is the following code: class XYZController < ApplicationController before_filter :change_database def change_database ActiveRecord::Base.estab...
2006 Nov 17
5
configure a rails app for multiple databases
Hello Rails community I cannot seem to find via Google what I had hoped would be a simple issue On a single DB system (currently, postgres 8.1.4), I have two databases, each containing multiple tables. I would like to configure my app and database.yml to recognize these two databases. What is the corrrect config for the database.yml ? Is it something like: > production: > adapter:
2006 Jan 19
4
multiple database in the same actions?
Hi, I read the example in http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases, it show us how to connect to other database, each time we start a new action, however, this doesn''t work while you try to connect to two different database within the same action. SO I wonder is it possible to bind to two or more database within the same action???? Thanks you very much...
2006 Sep 06
13
Ruby/Rails facts?
I found these facts while in #ruby-lang irc? <duracell8> 1. Limited Pool of developers who know Ruby. Get developers to nominate if Ruby will be their secondary language. <duracell8> 2. The serving of Ruby Apps from Apache using FastCGI is broken the world over. It causes periodic process and database connection blowouts. Move to a Mongrel Pack. <duracell8> 3. Limited