Displaying 20 results from an estimated 30000 matches similar to: "remote database connection disconnecting after certain amoun"
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,
2007 Jan 06
2
S3 throwing invalid argument using AWS S3 API
Hello,
Im using the following amazon web service API for S3 :
http://amazon.rubyforge.org/
The problem is that after I establish a connection using
establish_connection!, and try using the "store" command, I keep getting
the following error. However, if I reboot my webrick server, it works
fine for about one hour and then starts throwing this error:
Errno::EINVAL in
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
2007 May 16
7
return ONLY total_hits without querying from real database
Hey guys,
I know I can run search(q).total_hits, but if I try to put :limit=>0 it
gives me an error. I don''t want it actually query any of the results, I
just want it to tell me how many total_hits I would have if I wanted to
search it.
How can I do this?
--
Posted via http://www.ruby-forum.com/.
2011 Nov 01
0
Rails 3 Multiple database with Joins conditions throws exception
My environment: Ruby 1.9.2p290, Rails 3.0.9 and RubyGem 1.8.8
unfortunately I have an issue when come across multiple database.
The situation is this: I have two model connect with two different
database and also establishing association between each other.
database connection specifying in each model, look likes
class Visit < ActiveRecord::Base
self.establish_connection "lab"
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
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
2012 Jul 17
6
Database connection parameters are tied to the filesystem
HI Guys,
I recently tried VERY hard to override the database configuration bassed on
ENV vars or actual API calls. This task is almost next to impossible.
I know that the database.yml file is parsed as ERB but that is sane for
simple ENV replacement if you want to actually change which database
adaptor it is (requires extra config/params) it becomes messy.
I found
2006 Aug 01
7
MySQL binding problem on Max OS X 10.4
Hi all.
No matter what I do I can''t get rails to see my MySQL database. All
details are below. I really appreciate any assistance. Thanks!!!
DETAILS
-------
1. I''m using Rails 1.1.4 with Ruby 1.8.4 on Mac OS X 10.4.7. I have
installed the MySQL bindings following the instructions here:
2006 Jun 26
1
Separate Read and Write Database
Hello,
I need to access an mirrored database with one read and one write
cluster. Is there a way to tell a model to use two connections? So that
all updates etc go to the write database and all read from the read one?
This is a fixed set up I can not use MySQL 5.x stuff and additionally i
get a token on write, which can be checked on read (and wait for
replication) if new data is needed.
I
2006 Apr 18
2
Connecting to multiple databases with multiple database users
Hi everyone,
I was wondering what the common practice for handling multiple db
users with fine grained privileges on multiple databases is. Against
the often read guideline for rails users to keep with a single db as
"more dbs don''t really make sense anyway", my opinion is that it DOES
make sense to use more than one db schema for a number of reasons that
I won''t
2006 Feb 27
5
Database connections...so many connections!
Hello all.
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
2007 Feb 08
0
RAW_POST_DATA not in header
Has anyone been able to successfully access the RAW_POST_DATA? I know Rails has a fix for this. Haven''t been able to do it in Merb.
I tried doing "request.body.read" which gives nothing, however when I do request.body.length, I get a length over 2000. I tried accessing $stdin, however I can''t seem to get the darn data out of it.
Aryk
-------------- next part
2006 May 04
1
Multiple database problem in rails 1.1 ?
Hi ...
We are constructing at rails GUI using two differant databases, and this
seems to work out nicely using a "establish_connection" per model, where
each model enherit directly from ActiveRecord::Base.
But ! I like to use a model where we can inherit from one parent class
that handles the connection exactly as descripted in this document :
2006 Dec 18
3
Creating another database connection for large mysql import?
I''m using backgroundrb to periodically download a large file via ftp from a
remote location and then import it into the database. To perform the
import, I was using the following:
ActiveRecord::Base.connection.execute(%{load data infile ...;})
although on a file with 2.5 million records, this can take 5 minutes, which
seems to tie up my rails application while this executes (even
2006 Jul 20
1
guru needed: connecting to a second (remote) db that may not be available
hi,
My rails app connects to 2 databases a local one and a remote one. No
problems there.. The problem is that the remote database may or may not be
available at any given time. My problem: when the remote db is unavailable,
any time my code tries to query the remote database it hangs for a few
minutes until it times-out. I would very much like to change the timeout
value to something
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
2006 Jun 20
1
Extracting a connection out of ActiveRecord::Base
Hi
I''m trying to use the Typo wordpress converter script, but it requires
that the wordpress database is accessible over the connection to the
Typo database.
To get around this, I''m trying to use ActiveRecord::establish_connection
(...) to get a connection object to run the raw SQL queries that Typo''s
wordpress converter uses on. It doesn''t work with Ruby
2009 Jun 09
2
ActiveRecord subclass with manual DB connection can’t directly access column variables.
Hi All,
I''m having a slight issue with one of my Rails models. It''s nothing I
can''t work around (as I''ve already done so), but I''m interested in the
actual issue.
Basically, I have an ActiveRecord-based class named "Events" that I''ve
connected to a remote database using "establish_connection". It all
works fine and I can
2006 Dec 03
2
How To Create Database Tables With Merb 0.0.7?
Howdy,
I just gem unpacked merb and have configured the sample_app to use an
sqlite3 database. I see that the Rakefile has a task named "schema",
but it points to /dist/schema/schema1.rb", which doesn''t exist. I
copied /dist/schema/schema1.rb to /dist/schema/schema.rb then ran
"rake schema". What''s the recommended way to create the database
tables?