Displaying 15 results from an estimated 15 matches similar to: "Connection problem with a generic-runtime-built ActiveRecord::Base"
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
2000 Dec 20
1
Inconsistency in creating/opening/closing/destroying connections (PR#787)
I expected close() to be the opposite of open(), but
> # create a connection
> con <- file("ex.data")
> # open it
> open(con, "w")
> # close it
> close(con)
> # re-open it
> open(con, "w")
Error in open.connection(con, "w") : invalid connection
>
> con
Error in summary.connection(x) : invalid connection
> # is obviously
2000 Dec 20
0
Inconsistency in creating/opening/closing/destroying (PR#788)
On Wed, 20 Dec 2000 joehl@web.de wrote:
> I expected close() to be the opposite of open(), but
Why? It is not documented to be so, as far as I know.
> > # create a connection
> > con <- file("ex.data")
> > # open it
> > open(con, "w")
> > # close it
> > close(con)
> > # re-open it
> > open(con, "w")
> Error
2007 Jan 12
2
Forking a process in Rails is messing up mongrel
I''m trying to run an external Ruby script from my Rails app.
To do this i''m using this function
def fork_with_new_connection(config, my_class = ActiveRecord::Base)
pid = fork do
begin
my_class.establish_connection(config)
yield
ensure
my_class.remove_connection
end
end
Process.detach(pid)
end
Then, within my controller I do this:
2006 Jan 18
1
Helps!!!!! Rails database connection guru needed!!!!!!!
Hi,
I really need help to understand what is happening
while Rails connect to a database, (we area actually
using postgresql, so my example will be with
postgresql) What I understand is Rails is able to
connect to different DB. Actually, this is what we
want, and we have made some tests, everything is juste
fine. However, all these tests lead us to some
important questions that we did find the
2006 Feb 06
1
Panic: key not found from hash
Hello,
we have about 120 servers doing some million mails per day. Most of
them use dovecot for pop and imap.
In version 1.0.alpha4 we have dovecot-crashes on one or two of the
machines in a week where dovecot log says "Panic: key not found from
hash" and dovecot dies.
We tried version 1.0.beta2 on some machines but with that we have
another problem where log says "Error:
2007 Mar 19
11
Parsechecking in a commit hook
This has been a much-requested feature, and is now a reality (in svn
trunk):
There is a new option, --ignoreimport, that will (surprisingly)
ignore import statements. This is really only useful when using --
parseonly in a commit hook, and note that you''ll have to add the
option to --parseonly, none of the puppet executables will add it for
you. You should be able to
2006 Aug 13
1
establish_connection method
I''m digging into rails source code.
But I''ve got a problem in undestading actionrecord::base source code
which is connection_specification.rb.
In the body of establish_connection method,
def self.establish_connection(spec = nil)
case spec
when nil
raise AdapterNotSpecified unless defined? RAILS_ENV
establish_connection(RAILS_ENV)
2006 May 08
0
ActiveRecord and refreshing column info
Let''s say I want to find out what column names exist in two tables,
table_a and table_b.
One way I''ve been doing this is using ActiveRecord and the column info
it returns. After establishing a connection for ActiveRecord, I do the
following:
ActiveRecord::Base.set_table_name("table_a")
column_names_a = ActiveRecord::Base.column_names
2005 Dec 20
1
How do I close DB connections?
My Rails App makes quite a few calls (all different queries)
to our Postgres DB. Each time I make a find_by_sql method call,
a connection opens and then stays idle. Of course, after 500
or so of these idle postgres processes running, the DB refuses
to let me make any more (and I can''t really add more to the
postgres.conf).
How do I make sure these connections get closed after each query?
2010 Jul 19
0
Forking and integration tests
Hi All,
I had a bug in one project, that data get duplicated in the DB due to
multiple instances of the application (multiple thins) are accessing the
DB at the same time .. The typical mistake.
Problem fixed.
I just need to write a test code that covers the fixed bug.
I need to simulate the concurrent requests that can result in the
original bug. I thought of many ideas and decided to go with
2006 Jan 26
0
If you want to disconnect a database properly, there is the code:)!!!
Hi,
We have worked on a problem of connection: Connect to
two databases with a single ActiveRecord::Base model
class within the same action
The main difficulty is how to disconnect the actual
connection properly and then let the ActiveRecord
establishes a new one.
The actual function "remove_connection" removes the
connection, but its doesn''t unbind the link between
rails and
2009 Oct 26
0
[PATCH node] Users can now work with remote libvirt hosts.
The user can:
* select a remote machine
* add a remote machine
* remove a remote machine
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
nodeadmin/addhost.py | 129 ++++++++++++++++++++++++++++++++++++++++++++
nodeadmin/changehost.py | 58 ++++++++++++++++++++
nodeadmin/configscreen.py | 36 ++++++++++++-
nodeadmin/definenet.py | 1 +
2009 Oct 28
1
[PATCH] Users can now work with remote libvirt hosts.
The user can:
* select a remote machine
* add a remote machine
* remove a remote machine
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
Makefile.am | 5 ++
nodeadmin/addhost.py | 129 ++++++++++++++++++++++++++++++++++++++++++++
nodeadmin/changehost.py | 58 ++++++++++++++++++++
nodeadmin/configscreen.py | 36 ++++++++++++-
2006 Jul 24
7
[PATCH] Support for DB Clusters/Replication in ActiveRecord (RFC)
Skipped content of type multipart/alternative-------------- next part --------------
Index: connection_adapters/abstract/connection_specification.rb
===================================================================
--- connection_adapters/abstract/connection_specification.rb (revision 4617)
+++ connection_adapters/abstract/connection_specification.rb (working copy)
@@ -1,10 +1,21 @@
require