Displaying 2 results from an estimated 2 matches for "connectionfactory".
2006 Jun 29
1
Problems Creating an R package
...s ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking index information ... OK
* checking package subdirectories ... WARNING
Subdirectory 'src' contains no source files.
* checking R files for syntax errors ... ERROR
Syntax error in file 'R/ConnectionFactory.R'
Q1. What should I put in 'src'. I did put two of my source .R files, it
still does not work.
Q2. This is what I get if I source R/ConnectionFactory.R.
Error in parse(file, n = -1, NULL, "?") : syntax error at
5: }
6: , .env = <
These are the contents of R/Connection...
2007 Sep 26
0
activerecord multiple databases
...ase this helps anyone else trying to do the same thing.
I''m using this with activerecord, but not rails, so there may be some
adjustments needed if you are trying to incorporate this into rails.
module Project
DBCONFIG = YAML::load(File.open(''database.yml''))
module ConnectionFactory
class DB1 < ActiveRecord::Base
self.establish_connection(Project::DBCONFIG[''db1''])
end
class DB2 < ActiveRecord::Base
self.establish_connection(Project::DBCONFIG[''db2''])
end
end
module ClassMethods
module SomeClassName...