similar to: Can I access another apps mysql database with my rails app?

Displaying 20 results from an estimated 30000 matches similar to: "Can I access another apps mysql database with my rails app?"

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 19
1
Separate databases for reads and writes?
Hi all - New to rails... been reading as much as I can though and have yet to find a solid answer (although I think I found an unsolid negative). I''m wondering if there''s a way to split up the reads and writes in Rails so that pages/actions that don''t need to write can query from a group of mirrored databases. And my content managers can update a single master. I
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 Aug 13
10
:limit text mysql
I have a rails 3.rc app that I''m developing. I have a text entry in one my models that can sometimes be quite big. I tried setting :limit => 4294967296 on the text column in my migration file but this doesn''t seem to have any effect. The column is till created as a TEXT column rather than MEDIUMTEXT or LONGTEXT. Does anyone have any idea why this might be happening? Is there
2010 May 13
6
to "loop through" the instance variables of ActiveRecord?
to wrap each instance variable of an ActiveRecord object between "<td>" and "</td>", is there a way to "loop through" them, at least in the debug mode, no matter there is getter methods to get them or not, or at least the ones with the getter methods? Such as <% @stories.each do |s| %> <%= "<tr>" %> <% s.each_property
2010 Jul 09
6
deployment question: has anyone deployed w. sqlite?
Hi, I''d like to make a demo version of my app available, but I''m not ready to get into database stuff, yet. Has anyone ever deployed with sqlite (what I used to develop my app)? If so, what hosting service(s) would you recommend? Thanks, Lille -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2011 Jan 02
6
Database Design
Hello, I have a user table that stores their username, email address, and password. (along with salt, etc) However, now I want to have more complex information associated with each user (address, etc). I''m no DBA expert, so in terms of performance, which is better: - A user table that has all the fields in it (Username, Email, password, country, state, zipcode, etc) - A user table that
2006 Jul 19
13
MySQL Replication as Load Balancing
Hello: We will be setting up MySQL replication for a load balanced environment, but we have to separate reads and writes. How can we modify rails to do so? Has anyone done this already? Thank you in advance! Dan -- Posted via http://www.ruby-forum.com/.
2011 Mar 02
3
haml to erb - does it work with new html5 tags?
Hi, I wanted to covert all my erb over to haml, but I use HTML5 tags like nav, section, article, etc. Any idea if this is supported by haml? Checked out their site, nothing mentioned there or did I miss something. Sorry noob here. -- 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
2010 Jun 24
3
DRY a named scope
Is there a way to DRY this up a bit? named_scope :has_valid_sysoid, lambda{|sysoid| (sysoid.nil?) ? {:conditions => ["nodesysoid IS NOT NULL AND nodelabel LIKE ''%-to-%''"], :include => [:ipinterface, :alarm]} : {:conditions => ["nodesysoid IS NOT NULL AND nodelabel LIKE ''%-to-%'' AND nodesysoid = ? ", sysoid], :include =>
2006 May 03
6
ActiveRecord and Lost Connection
This isnt totally a rails question; I am using ActiveRecord for storing some simple values into a database. My problem; I keep gettign MySQL Errors. On the Win32 machine it was off and on. Now on the linux machine (ubuntu) I can'' t connect at all. I have all the password settings correct. My only thought, I am working with Threads and thought that might cause the issue, but I
2010 Sep 18
11
Commenting in an ERB without generating a compiling error
Hello, I have the following: <% @projects.each do |project| %> <tr> . <td><%= link_to ''Destroy'', project, :confirm => ''Are you sure?'', :method => :delete %></td> . </tr> <% end %> How can I safely comment out the TD line above? Do I have to use the =begin way? -- You received this message because you
2007 Oct 05
5
PostgreSQL, templates, and test databases
Hi everyone. I''m having a bit of a problem with an application I''m currently developing with Rails 1.2.3 and PostgreSQL, attempting to use test-first development. Here''s the scenario: * I have the usual three databases, with migrations. Testing has been working beautifully. * I need to store geographic data, so I add PostGIS to all three databases (along with
2009 Aug 20
7
bulk email solutions
i need to send massive emails to various customers, here 2 solutions i have think: 1- customers = Customer.find(:all, :conditions => "newsletter = 1") customers.each do |c| @email = c.email Mailer.deliver_send_newsletter(@subject, @email, @notice_id) end 2- customers = Customer.find(:all, :conditions => "newsletter = 1") customers.each do |c| addresses <<
2009 Oct 20
5
Annoying problem with file_field and paperclip
Hi all, I have a really really annoying problem that''s driving me nuts with file_field and paperclip and having to upload images everytime a form is edited even though the user is quite happy with the currently uploaded image or loose the previously uploaded image. This seems to be caused by the rails file_field helper not storing the data that has been read in from the db in the same
2010 Feb 15
4
Changing the :path and :url options of has_attached_file in paperclip
Hello, I am using the paperclip plugin to upload images and it works absolutely fine. I intend to save my uploaded images to C:\Application_name\public folder. Accordingly, with some study over the i-net, I changed the :path option of has_attached_file to - :path => "C:/Application_name/ public/:class/:attachment/:id/:style_:basename.:extension" Now, the files are being saved to
2011 Mar 29
2
recaptcha displaying weirdly
Hi List, I''ve followed and read several guides for getting recaptcha working with a site but I keep coming across this problem. The recaptcha images look...weird: This image is taken with the "white" theme, however the sandard one is exactly as weird. I can''t work out what is causing this: http://www.mattharrison.org/images/recaptcha-weird-look.JPG Any tips
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 Jun 14
6
Lost Connection to MySQL
Error Message: MyMysql::Error: Lost connection to MySQL server during query: SHOW FIELDS FROM products Running Fedora 5, using available Red Hat modules and latest version of Rails. This problem just appeared. I had been enjoying going through the tutorial "Depot" when it started displaying this problem. With phpMyAdmin I am able to access the depot_development data base containing
2010 Sep 03
2
2.3.5 guide
It seems the guide at http://guides.rubyonrails.org/ has been updated to 3.0. I am still using 2.3.5 with plans of upgrading. Any ideas on how I can get the older guide? Thanks -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org