Displaying 20 results from an estimated 10000 matches similar to: "multiple database users for rails app?"
2005 Nov 10
6
Manually loading fixture data
Hi all,
I''ve got some tables with fixed amounts of data in them (a "states"
table, for example). For tables like this I can easily put *all* of the
data in the fixture.
For general futzing purposes, and for those times I want to reload a
database from scratch outside of testing (for whatever reason), what''s
the best approach? I thought perhaps ActiveRecord::Base had
2006 Feb 01
3
Getting database config info
Hi folks. I have a very small problem which is probably very simple. But
I''ve scoured the api and the rails book with no luck.
I''m trying to get information about the database definition out of active
record. When I go into console and say
ActiveRecord::Base.connection
I get a MysqlAdapter object, with an instance variable called @config that''s
a hash containing all
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:
2010 Apr 20
4
Can I access another apps mysql database with my rails app?
Sorry if the answer is obvious (nube alert) but would it be possible for
me to access the DB of a php app using a mysql database, from within my
Rails app?
I want to install my (php) forums in forum.site.com, and my main site
(using rails) will be at the root, site.com - so could I list the latest
forum thread, in my Rails side of the site, by simply accessing the
mysql database directly?
Guess
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 Feb 15
6
Draggables and overflow:auto
Hey guys. I''m trying to drag between two lists, except one list is
really long so I set a height on the <ul> with overflow:auto.
Unfortunately when I drag between the lists I can''t drag items outside
of the <ul> with the overflow on. Does anyone know how I can make this
work? I think I might be able to hack up something with rico''s live
tables, but that
2006 Aug 05
22
MySQL vs SQLite
I have an application where speed is probably the #1 priority here. I am
using MySQL 5.0.22. Would SQL be considerably faster than MySQL?
I know this has been discussed before, but the search on the forums is
not working.
Thanks for your help.
--
Posted via http://www.ruby-forum.com/.
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 May 16
4
Oracle and MySql simultaneously from rails app
I searched this site on Oracle && MySql, nothing came up, so perhaps
this is a new topic for this forum.
I''d like to access two databases from the same application
simultaneously (well, more precisely, in rapid succession, calling one
first and then the other, as any "joins" will be done in the application
code).
One database is in MySql, the other is Oracle.
2007 Apr 03
5
Inifinite loop problem with DRb server
Hi all,
We''re attempting to use Ferret with the DRb server at the moment, and
it doesn''t work, at all...
= Executive Summary
The DRb server process keeps on calling the remote index to the DRb
server process... Which means DRb is calling itself, and itself, and
itself, until Ruby kills the Thread with a SystemStackLevel error.
= The excruciating details...
# Mongrel is
2006 May 10
8
dynamic setting of username and password in database.yml
Hello
I''ve now read a lot about application-level authentication in Rails, but
I need to do database-level authentication.
The reason is that my database needs to have the current_user (database
current_user, not current_user defined in an ActiveRecord Model) set to
execute triggers for automatically updating audit tables. So it is not
enough to have a session check against a User
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
2005 Dec 23
6
Agile book - test error
Hi all,
I get an error when testing the "store_controller_test.rb"
The troublesome line is in the test below:
def test_add_to_cart
get :add_to_cart, :id => @version_control_book.id <<<
cart = session[:cart]
assert_equal @version_control_book.price, cart.total_price
assert_redirected_to :action => ''display_cart''
follow_redirect
2006 Jan 03
4
in-memory test database -- where''s the schema?
I''m trying to get the unit testing for a new project to use the wonderful
:memory: database specification for SQLite. However, like many people
before me, I can''t get the schema to import or have anything else useful.
Initially, the error I get is:
/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/errors.rb:94:in
`check'': cannot rollback - no transaction is
2007 Aug 01
1
multipart remote_form_for
I''m trying to figure out how to create an AJAXified form with
remote_form_for that can submit a file upload, to no avail. Any pointers
for me?
- donald
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Sep 05
3
Testing vs Production manifests
So, the usual problem -- we want to be able to test our manifests before
putting them into full-scale no-holds-barred oh-shit-we-broke-teh-intarweb
production. The two possible solutions I''ve considered so far are:
1) Set a tag on objects we only want to be run on our test machines, and run
Puppet on the test machines with "please run objects tagged ''test''".
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 Jun 19
4
share model definition
I want to share everything about a model except the db connection. Is
this a reasonable way to do it?
module NotebookDefinition
--
Posted via http://www.ruby-forum.com/.
2007 Oct 03
3
manually invoking routing?
Hey folks. I have a rails controller which is filtering search results
for access control. The search results are typically URLs into the rest
of the rails app. I''m finding it would simplify the grotty code which is
accumulating if I could manually invoke the router. That is to say, if I
could send something a URI path string and get back the hash of
controller, action, and params that
2008 May 11
8
From "schema.rb" file to MySQL
Hello,
I have write a schema.rb database such as this:
ActiveRecord::Schema.define do
create_table :arts do |t|
t.string :name, :null => false, :limit => 45
end
end
This file is saved into test/db/schema.rb, and test/config/database.yml
is correctly configured with "test_development" database created in a
MySQL server.
Could you help me to install the content of