Displaying 20 results from an estimated 900 matches similar to: "Can I use 2 DB connections in my app?"
2005 Apr 26
10
Cannot force WeBRICK into submission (UTF-8)
Hello everyone!
Pushing my new rails project I stumbled upon some weird problem.
I cannot force WeBRICK to show me my MySQL records in UTF-8. All I
recieve into the object (instead of russian letters) are question marks
(a la ?????? style). I am running MySQL 4.1 (the one with switchable
charsets) and a binary Ruby extension for it, all on OSX.
To me it looks like MySQL never recieves what I
2006 May 15
8
Databases... write master, multiple read-only slaves.. will this work?
Hi all -
I have a need to have my models write to one database and read from
another. From what I''ve read, Rails doesn''t do this out of the box. I
came up with something that does work, but I''m wondering if there is
something I''m missing in the code below that''s going to bite me, such as
establish_connection creating a huge number of objects as
2007 Jan 22
4
Postamble vs campingrc
Hi,
Should I be able to use the Webrick postamble instead of using
.campingrc, to tell Camping I want to use mysql? It doesn''t seem to
be working for me. It does work however, when I''m using FastCGI
(establish_connection :adapter => ''mysql'').
James
2011 Jul 21
1
nested loop for
Hi everyone,
I have been working some days in a nested loop in R but I can't find the solution.
I have a data.frame with an unique ID for individuals and unique ID for different stands, for each indiviadual I have a dbh record and a SBA (stand basal area) field.
Pma<-rep (1:40)
P<-seq(1,4, 1)
Plot<-rep(P,10)
dbh2<-rnorm(40, mean=200, sd=5)
SBA2<-rnorm(40, mean=10, sd=1)
As
2006 Feb 08
1
Possible AGI Bug in Asterisk?
Dear All,
I seem to have stumbled across an AGI problem;
I have written an AGI Script (bottom of this email);
The script does the following;
Makes a CDR entry when called
Records the call
Updates the CDR
Finds a corresponding DNIS from the SMDR table (captured via a serial
port logger)
Matches up the record and updates the CDR.
The script works perfectly in my test lab and has been doing so
2006 Nov 10
2
Testing with foreign keys
I''m looking for a plugin/whatever for preloading fixtures, to run
tests with FKs defined.
Specifying load order just doesn''t work for me, I need to purge the
test db, load all fixtures, and only then create the FK constraints.
Any suggestions?
Isak
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2006 Sep 10
11
Using partials with Markaby
I''m trying to use a partial from within Markaby. I haven''t been able to
figure out how to access a parameter passed into the partial. Here''s the
code I''m using:
h1 "Create a new note"
if @note
render :partial => ''form/errors'', :record => @note
end
...
(that snippet, as well as the partial is stolen shamelessly from Restolog
2005 Jul 06
4
undefined method `stringify_keys!'
I have a Model whose table name and primary key don''t follow Rails conventions.
So I have used set_table_name() and set_primary_key() and can do the
Record.find() method ok.
My problem is that the Record.new(params[:id]) idiom in a controller complains:
undefined method `stringify_keys!'' for "REAL_PKEY":String
Is there something else I need to do?
2007 Dec 03
1
coplot and xyplot and panel functions
Hi,
I wrote a panel function called panelwhite.corplot. If i use this function in a coplot is working fine, but if i use same function with xyplot i get the error: Error using packet 1: plot.new has not been called yet ..... and so on filling all my plots.
So with:
coplot(be~ch|dbh1, envmetr1, panel=panelwhite.corplot)
I get the expected result
with:
xyplot(be~ch | dbh1,
2004 May 10
1
RODBC in RAqua
I've been trying to get RODBC working in RAqua. For my database,
let's call it "mydb", when I enter
odbcConnect("mydb")
or
odbcConnect("mydb", uid="postgres", pwd="secret"),
RAqua thinks for about 10 seconds, then crashes.
mydb is a PostgreSQL 7.4.2 database running on my machine (Mac OS X
10.3.3). I am using the pgsqlodbc 7.2.5 driver
2009 Feb 20
2
importing data to SQLite database with sqldf
Hi all,
I am attempting to learn SQL through sqldf...
One task I am particularly interested in is merging separate
(presumably large) files into a single table without loading these
files into R as an intermediate step (by loading them into SQLite and
merging them there).
Taking a step back, I've considered these alternatives:
1) I know if I use straight SQLite commands I might use the
2009 Jan 20
1
Problem with FAME
Dear All,
I wonder whether anyone has an experience with FAME package written by Jeff Hallman. All my attempts to send him the following problem report did not succeed (the mail system says that my e-mail could not be delivered), so I turn for help to this list.
I tried to use your FAME package written for R, but somehow I cannot get it working. I am using Windows XP and the newest R
2005 May 19
5
[OT] Sqlite2 question
So, under Sqlite2, if I want to update a database''s schema, I have to
dump the DB, modify the table''s structure, then go and modify EVERY
insert statement.
The insert statements look like (from memory):
INSERT INTO my_table VALUES (''some_id'', ''some_val'', '''', '''', '''',
''some_other
2012 May 15
5
setting up the SQLite database
I know this isn''t Python, but I''d like to get a view on the ''one
obvious'' way to set up an SQLite (or other) database and its location
per-app. I''ve got a bit lost with the Camping 2 changes and various
code snippets I have kicking around.
1.
is it best to set up the DB creation/connection:
1.1
at the end of the app
2009 May 09
1
sqlSave()
Hi all: I have created a MS Access table named 'PredictedValues' through the statement below:
myDB <- odbcConnectAccess("C:/Documents and Settings/Owner/Desktop/Rpond Farming.mdb",uid="admin",pwd="")
sqlSave(myDB,PredictedValues,rownames=FALSE)
close(myDB)
But if I run the code again with new values I get the message below:
Error in sqlSave(myDB,
2006 May 19
7
AR transactions and isolation levels
I''m trying to create a sequence with no gaps in my db (contrived
example, but should work out the same as my real one), and believe
db-managed transactions are the way to go about this.
It''s my first real ''go'' at transactions, so I may be mistaken about
how things really work.
Anyway.. Consider this example code:
Class Invoice < ActiveRecord::Base
def
2007 May 15
4
Need help with singleton worker
We have a fairly expensive task that we''d rather not schedule too many
instances of in parallel.
Couldn''t get pool_size to limit the amount of workers, and I figure
that''s hardly optimal anyway, so would like to have the work queued up
for a single named worker instead, running as soon as possible.
Using MiddleMan.schedule_worker() with :job_key does start off a
2011 Dec 06
3
Riak on Camping
Good day, does anyone here have a clue on how to make use of the NoSQL
database "Riak" with Camping?
I am building my website and Riak seems like pretty much the ultimate
database!
This would probably ruin every little feature in ActiveRecord, I don''t
think I''d be able to do any has_many''s or belongs_to
but I''d LOVE to be proven wrong. As far as
2013 Mar 04
4
sieve-filter ignoring separator
It seems like running sieve-filter from the console ignores the separator
setting, thus not letting me filter into folder names containing dots.
Normal delivery using lda handles it just fine, but not when using the
sieve-filter command.
Character not allowed in mailbox name: '.'
Is there anyway to override this or is patching and recompiling the source
my only option?
# dovecot
2011 Feb 15
1
samba authenticates only against the primary group of a user?
Hello everyone!
I seem to be have a bit of a problem setting up a few network folders for a
my office on a Qnap storage device running Samba -v3.5.2. So I ask:
when the 'write list' of a share contains ONLY groups, and a user tries to
log on to that share, then samba authenticates against the primary group
only of that user only??
Here is the example that fails:
-the user is