similar to: Database connection parameters are tied to the filesystem

Displaying 20 results from an estimated 3000 matches similar to: "Database connection parameters are tied to the filesystem"

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 Mar 27
5
Fake ActiveRecord model?
Hi all, I have a legacy table which I cannot get to work with ActiveRecord (no ids etc). All I want is to create a class which opens a connection manually and allows me to execute some plain SQL statements. What I can''t figure out is how to either build up a connection and execute queries from a non-AR inherited class, or how to create a AR-inherited class minus all the AR magic and
2006 Jan 19
4
multiple database in the same actions?
Hi, I read the example in http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases, it show us how to connect to other database, each time we start a new action, however, this doesn''t work while you try to connect to two different database within the same action. SO I wonder is it possible to bind to two or more database within the same action???? Thanks you very much Saiho
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
2006 Apr 18
7
Connecting to multiple databases
Hi Everyone, I am trying to connect to multiple databases and followed along the Recipe in Chad Fowlers ''Rails Recipes'' book (which basically is about establishing the connection in a subclass of ActiveRecord::Base, and inheriting all classes in need of this connection from this class) Chad Fowler says: "You won''t be able to instantiate an External, of course,
2012 Jun 02
1
Determining frequency and period of a wave
Hello! I'm collecting data on a refrigerator that I'm using to cure meat. Specifically I am collection humidity and temperature readings. The temperature readings look sinusoidal (due to the refrigerator turning on and off). I'd like to calculate the frequency and period of the wave so that I can determine if modifications I make to the equipment are increasing or decreasing
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:
2007 May 03
2
How to run a cpu intensive ruby script with rails functionality
Hi All, I am new to this list and to rails. So far I am loving the way in which it is easy to put together web pages with a database backend. I would love to use the rails functionality (to do the sql queries) and then process the results using some very cpu intensuve tasks. The results will take far longer than it is viable to use a web browser to view the results. I would like to see the
2013 Feb 19
4
Float::INFINITY ranges in where() clause
This seems like such an obvious idea that I''m having trouble believing I''m the first to think of it. Why not take ranges containing Float::INFINITY and translate them to the appropriate greater than or less than comparisons? Example: class Person scope :voters, -> { where(born_on: (-Float::INFINITY..18.years.ago)) } end This would generate something along the lines of
2006 Jan 14
5
New problem with Mac OS X + rails + mysql. Please help!
All, I am working through the ''depot'' sample application from the "Pragmatic Programmers" book on my powerbook. I was going through the install process on http://hivelogic.com/articles/2005/12/01/ ruby_rails_lighttpd_mysql_tiger and it seemed to work fine. But when I try to create the first table, I get the following error, and I have no idea what this means. Any
2019 Mar 08
2
8.0 Regression with __builtin_constant_p.
Hi All, I know we're late in the release process, but I've discovered a regression I believe is serious enough to hold the release [1]. The regression is in usages of `__builtin_constant_p` applied to a dereferenced pointer in a constant expression. In certain cases Clang now rejects this as a non-constant expression [2]. This regression will have a larger impact than it initially
2005 Jun 29
3
trouble with active record and sqlite
I am getting an error that I can''t figure out. I have a class called Test with 3 fields, id, x, and y. When I do Test.new(''x''=>1, ''y''=>2).save, I get an error saying that id (my ''not null primary key'') can''t be null. But isn''t active record supposed to deal with setting that for me? Here''s the code
2010 Jun 16
2
class methods from module where active rec is involved
I have a module as shown below and when I extend an active record to use it, I can not access the primary_key method. In a simple test program using a similar approach where active record is not involved, access to the class methods seems to work ok. What can I do to make this work or so that I can access the class methods ? ################################## require
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
2019 Mar 08
2
[cfe-dev] 8.0 Regression with __builtin_constant_p.
Hi Bill, I committed a fix already as r355743 [1], and it fixes `test2` as well. I believe we should merge this into 8.0. /Eric [1] https://github.com/llvm/llvm-project/commit/680e865c313a80b6ec329abde61e1f0c66bdc103 On Fri, Mar 8, 2019 at 5:46 PM Bill Wendling <isanbard at gmail.com> wrote: > Hi Eric, > > The attached patch may help matters, though it now fails because
2005 Mar 03
4
Loading data with fixtures
Can anyone point me to an easy way to load fixture data into the development (not test) database? - Tim __________________________________ Celebrate Yahoo!''s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/
2013 Mar 26
2
Using rack.hijack with ActionController::Live
Pinging @tenderlove Some questions on how best to move forward with this: 1.) AC::Live is making use of the stream object on ActionDispatch::Response. Should the rack.hijack_io object be used instead of this in AC::Live or should ActionDispatch::Response be changed to use rack.hijack_io? 2.) What do you think about changing AC::Live to work with adapters? I suspect the primary use case for
2006 Sep 15
2
unable to figure out how to get backgroundrb.yml to be used when starting backgroundrb
i ran rake backgroundrb:setup and modified the default config/backgroundrb.yml file as: --- port: "22223" timer_sleep: 60 load_rails: true environment: production host: localhost database_yml: config/database.yml acl: deny: all allow: localhost 127.0.0.1 order: deny,allow and my database.yml production: adapter: mysql database: chip2_production username: xxxxx password:
2005 Dec 16
6
active record outside of rails
I really like how Active Record logs the SQL that is executed inside of rails. Is there a way to get the SQL output when using Active Record outside of rails? Thanks, phil _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
2006 Jul 22
3
Connection refused - connect(2)
Dear all, Please help me in this regards, I am using models to access LegacySchemas using set_table_name and set_primary_key... [code for model] class CdDetails < ActiveRecord::Base def self.find_data set_table_name ''cd_details'' set_primary_key ''cd_label'' find (:first, :select => "cd_label") end