# Rails

**URL:** https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=1730

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 1731

---

## [Perform these db tasks using a single function](https://www.ruby-forum.com/t/perform-these-db-tasks-using-a-single-function/113371)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 0\
**Last updated:** [August 30, 2007, 1:19pm UTC](https://www.ruby-forum.com/t/perform-these-db-tasks-using-a-single-function/113371 "2007-08-30T13:19:13Z")

</div>

hello frnds I want to perform these tasks using a single function in ror first select all records from table 1 then create table named 2 then copy the records to table 2 and finally delete all records from table 1 P…

---

## [Has\_many relationship question](https://www.ruby-forum.com/t/has-many-relationship-question/113369)

<div class="topic-metadata">

**Author:** [@mariko](https://www.ruby-forum.com/u/mariko)\
**Replies:** 3\
**Last updated:** [August 30, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/has-many-relationship-question/113369 "2007-08-30T13:15:53Z")

</div>

Say I have a model called Order. Can I specify that an order “:has\_many orders” ? That is, an order has many other orders associated with it. I’m trying to do this, but I’m getting an error saying “undefined method o…

---

## [How to scan images using RoR](https://www.ruby-forum.com/t/how-to-scan-images-using-ror/113370)

<div class="topic-metadata">

**Author:** [@hinaresh2000](https://www.ruby-forum.com/u/hinaresh2000)\
**Replies:** 0\
**Last updated:** [August 30, 2007, 1:00pm UTC](https://www.ruby-forum.com/t/how-to-scan-images-using-ror/113370 "2007-08-30T13:00:04Z")

</div>

want to introduce a feature of scanning images in my RoR application. It simply activates a plugged in scanner device and scan the image available there and save or upload to a folder. kindly suggest me the way, as ye…

---

## [Tunnelling through SSH to MySql instance](https://www.ruby-forum.com/t/tunnelling-through-ssh-to-mysql-instance/113368)

<div class="topic-metadata">

**Author:** [@saha860](https://www.ruby-forum.com/u/saha860)\
**Replies:** 1\
**Last updated:** [August 30, 2007, 12:45pm UTC](https://www.ruby-forum.com/t/tunnelling-through-ssh-to-mysql-instance/113368 "2007-08-30T12:45:03Z")

</div>

Hello, I want to tunnel a mysql connection to a database behind a firewall. I can connect to the database from a terminal using a tunnel to the host machine if I specify --protocol like this: mysql -u xxxx -h localho…

---

## [Need help before beta release of zena cms](https://www.ruby-forum.com/t/need-help-before-beta-release-of-zena-cms/113367)

<div class="topic-metadata">

**Author:** [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Replies:** 0\
**Last updated:** [August 30, 2007, 11:54am UTC](https://www.ruby-forum.com/t/need-help-before-beta-release-of-zena-cms/113367 "2007-08-30T11:54:56Z")

</div>

Hi everyone ! The first beta release of Zena (a cms based on rails) will happen in about a month if all goes well. The work on this cms started in november 2005 and most hard core refactoring is about to end which m…

---

## [Has\_many through, model lost their methods after second load](https://www.ruby-forum.com/t/has-many-through-model-lost-their-methods-after-second-load/113365)

<div class="topic-metadata">

**Author:** [@benni](https://www.ruby-forum.com/u/benni)\
**Replies:** 0\
**Last updated:** [August 30, 2007, 11:50am UTC](https://www.ruby-forum.com/t/has-many-through-model-lost-their-methods-after-second-load/113365 "2007-08-30T11:50:06Z")

</div>

hello I’m using the has\_many through association, because i want additional attributes in the assignment-table. my association looks like this: class Task \< ActiveRecord::Base has\_many :assignments, :dependent =\> :de…

---

## [Need help before beta release of zena cms](https://www.ruby-forum.com/t/need-help-before-beta-release-of-zena-cms/113361)

<div class="topic-metadata">

**Author:** [@Gaspard\_Buma](https://www.ruby-forum.com/u/Gaspard_Buma)\
**Replies:** 0\
**Last updated:** [August 30, 2007, 11:31am UTC](https://www.ruby-forum.com/t/need-help-before-beta-release-of-zena-cms/113361 "2007-08-30T11:31:50Z")

</div>

Hi everyone ! The first beta release of Zena (a cms based on rails) will happen in about a month if all goes well. The work on this cms started in november 2005 and most hard core refactoring is about to end which me…

---

## [Daemons in Rails](https://www.ruby-forum.com/t/daemons-in-rails/113358)

<div class="topic-metadata">

**Author:** [@osteo](https://www.ruby-forum.com/u/osteo)\
**Replies:** 0\
**Last updated:** [August 30, 2007, 10:48am UTC](https://www.ruby-forum.com/t/daemons-in-rails/113358 "2007-08-30T10:48:06Z")

</div>

I tried for quite a few hours in vain to use the Daemons module for Rails. Ultimately, Rails was always trying to write to STDOUT and that is not allowed for real daemons. No matter where I reopened STDOUT to write …

---

## [Help - deploying on Apache1.3/FCGI - Dispatcher failed to ca](https://www.ruby-forum.com/t/help-deploying-on-apache1-3-fcgi-dispatcher-failed-to-ca/113336)

<div class="topic-metadata">

**Author:** [@bmihelac](https://www.ruby-forum.com/u/bmihelac)\
**Replies:** 6\
**Last updated:** [August 30, 2007, 10:43am UTC](https://www.ruby-forum.com/t/help-deploying-on-apache1-3-fcgi-dispatcher-failed-to-ca/113336 "2007-08-30T10:43:46Z")

</div>

Hi, I am in need to deploy Rails application on CentOS with Apache 1.3 and FCGI. Nothing happens except these in fast\_cgi\_crash log: 30/Aug/2007:00:25:24 :: 11521\] Dispatcher failed to catch: You have a nil object w…

---

## [Using Matrix properities in ror](https://www.ruby-forum.com/t/using-matrix-properities-in-ror/113356)

<div class="topic-metadata">

**Author:** [@advait](https://www.ruby-forum.com/u/advait)\
**Replies:** 0\
**Last updated:** [August 30, 2007, 10:28am UTC](https://www.ruby-forum.com/t/using-matrix-properities-in-ror/113356 "2007-08-30T10:28:58Z")

</div>

Hi, I need to know how to make use of matrix in my ruby on rails application as I am clearly clueless. Let me give you an example to understand it better. If I have a 2x4 matrix how would I carry out the functionalit…

---

## [Visual\_effect resetting display to none](https://www.ruby-forum.com/t/visual-effect-resetting-display-to-none/113351)

<div class="topic-metadata">

**Author:** [@neevor](https://www.ruby-forum.com/u/neevor)\
**Replies:** 0\
**Last updated:** [August 30, 2007, 8:33am UTC](https://www.ruby-forum.com/t/visual-effect-resetting-display-to-none/113351 "2007-08-30T08:33:24Z")

</div>

I am trying to make images “grow” into place. The problem is that I want them to do it one by one. Right after one image grows, it refreshes the display to none on the others and I end up with only one image. \<% @i =…

---

## [Ssl, apache, mongrel, capastrano](https://www.ruby-forum.com/t/ssl-apache-mongrel-capastrano/113345)

<div class="topic-metadata">

**Author:** [@Dcjgoose](https://www.ruby-forum.com/u/Dcjgoose)\
**Replies:** 1\
**Last updated:** [August 30, 2007, 8:00am UTC](https://www.ruby-forum.com/t/ssl-apache-mongrel-capastrano/113345 "2007-08-30T08:00:22Z")

</div>

Hello All, I’m having issues getting ssl to work with my RoR code. Here is the scenario: http://myapp.com/account/login - works https://myapp.com/account/login - gives me a 404 error. My stack is apache, mongrel and…

---

## [Background Processing](https://www.ruby-forum.com/t/background-processing/89313)

<div class="topic-metadata">

**Author:** [@simon1](https://www.ruby-forum.com/u/simon1)\
**Replies:** 6\
**Last updated:** [August 30, 2007, 7:45am UTC](https://www.ruby-forum.com/t/background-processing/89313 "2007-08-30T07:45:55Z")

</div>

Hi, I have an application that accepts XML files through an HTTP POST, and then needs to process these files and send back a response. On some larger file sizes, this processing isn’t occurring quickly enough, and t…

---

## [Convert line ending to \<br\>](https://www.ruby-forum.com/t/convert-line-ending-to-br/113306)

<div class="topic-metadata">

**Author:** [@george\_b](https://www.ruby-forum.com/u/george_b)\
**Replies:** 7\
**Last updated:** [August 30, 2007, 4:35am UTC](https://www.ruby-forum.com/t/convert-line-ending-to-br/113306 "2007-08-30T04:35:05Z")

</div>

This is more of a ruby question, but I have a textarea in a form, and for later presentation I need to convert the line endings to . The value from the form is, for example “line of text\\r\\nmore text”. I tried gsub…

---

## [Require](https://www.ruby-forum.com/t/require/113339)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [August 30, 2007, 2:02am UTC](https://www.ruby-forum.com/t/require/113339 "2007-08-30T02:02:54Z")

</div>

Newbie question. When I am looking at a addon/plugin and I see the “require” this or “require” that for the plugin, is there a simple way I am missing of finding out if I already have what is required? For example, I…

---

## [How to fix this error, help please!](https://www.ruby-forum.com/t/how-to-fix-this-error-help-please/113314)

<div class="topic-metadata">

**Author:** [@OnRails](https://www.ruby-forum.com/u/OnRails)\
**Replies:** 1\
**Last updated:** [August 30, 2007, 1:32am UTC](https://www.ruby-forum.com/t/how-to-fix-this-error-help-please/113314 "2007-08-30T01:32:51Z")

</div>

I want to run this simple test, but something is wrong. I don’t know how to fix them! help!! work\_test.rb: require File.dirname(FILE) + ‘/…/test\_helper’ class WorkTest \< Test::Unit::TestCase fixtures :works def se…

---

## [Easy way to render a tree](https://www.ruby-forum.com/t/easy-way-to-render-a-tree/113333)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 1\
**Last updated:** [August 30, 2007, 1:19am UTC](https://www.ruby-forum.com/t/easy-way-to-render-a-tree/113333 "2007-08-30T01:19:50Z")

</div>

Hello list, I’m trying to render a tree using the following helper function (added it to ApplicationHelper): def display\_tree\_recursive(tree, parent\_id) ret = “ ” tree.each do |node| if node.parent\_id == parent\_id …

---

## [Turn of dependencies so that a destroy will not destroy chil](https://www.ruby-forum.com/t/turn-of-dependencies-so-that-a-destroy-will-not-destroy-chil/113330)

<div class="topic-metadata">

**Author:** [@newrubyguy](https://www.ruby-forum.com/u/newrubyguy)\
**Replies:** 4\
**Last updated:** [August 30, 2007, 12:09am UTC](https://www.ruby-forum.com/t/turn-of-dependencies-so-that-a-destroy-will-not-destroy-chil/113330 "2007-08-30T00:09:39Z")

</div>

Hello, Can i turn of dependencies so that a destroy on one table will not automatically destroy data in the child table? Thanks

---

## [Chaining validate method in a plugin, completely stumped](https://www.ruby-forum.com/t/chaining-validate-method-in-a-plugin-completely-stumped/112850)

<div class="topic-metadata">

**Author:** [@random52k](https://www.ruby-forum.com/u/random52k)\
**Replies:** 6\
**Last updated:** [August 29, 2007, 11:32pm UTC](https://www.ruby-forum.com/t/chaining-validate-method-in-a-plugin-completely-stumped/112850 "2007-08-29T23:32:34Z")

</div>

I’m trying to write a plugin which adds some new logic to the validate method of an ActiveRecord model. However, I still want the user to be able to define their own validate method in the model, and to call that as …

---

## [Postgres sql error](https://www.ruby-forum.com/t/postgres-sql-error/113235)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 1\
**Last updated:** [August 29, 2007, 11:03pm UTC](https://www.ruby-forum.com/t/postgres-sql-error/113235 "2007-08-29T23:03:22Z")

</div>

getting the error shown below on a simple “find\_by\_name” for an active record. I’ve seen this with migrations when creating tables with “force =\> true” but never a simple select like this. There is nothing wrong with …

---

## [Any experience with running Rails on SunFire T2000?](https://www.ruby-forum.com/t/any-experience-with-running-rails-on-sunfire-t2000/113331)

<div class="topic-metadata">

**Author:** [@alexeyv](https://www.ruby-forum.com/u/alexeyv)\
**Replies:** 0\
**Last updated:** [August 29, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/any-experience-with-running-rails-on-sunfire-t2000/113331 "2007-08-29T22:50:20Z")

</div>

Hi all, Has anybody tried running a Rails app on this hardware: Hardware | Oracle ? – Alexey V. CruiseControl.rb \[http://cruisecontrolrb.thoughtworks.com\] RubyWorks \[http://rubyworks.thoughtworks.com\]

---

## [Non-blocking ajax requests](https://www.ruby-forum.com/t/non-blocking-ajax-requests/113083)

<div class="topic-metadata">

**Author:** [@martijn](https://www.ruby-forum.com/u/martijn)\
**Replies:** 2\
**Last updated:** [August 29, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/non-blocking-ajax-requests/113083 "2007-08-29T22:50:20Z")

</div>

Hello group! I have a problem using multiple ajax updaters on one page. The first one is a slow one; it a form\_remote\_tag and it calls a method that takes about 5 seconds to process. The second one is faster, it’s a…

---

## [New to rails, quick (hopefully simple) question](https://www.ruby-forum.com/t/new-to-rails-quick-hopefully-simple-question/113328)

<div class="topic-metadata">

**Author:** [@telefauna](https://www.ruby-forum.com/u/telefauna)\
**Replies:** 2\
**Last updated:** [August 29, 2007, 10:26pm UTC](https://www.ruby-forum.com/t/new-to-rails-quick-hopefully-simple-question/113328 "2007-08-29T22:26:06Z")

</div>

I am brand new to rails and I am attempting to make my first web app. I have quickly run into my first problem however that I can’t seem to get by. It seems like it would be easy to get around (with my knowledge of o…

---

## [Find( \[1,2,3\] ) find from array without raising error](https://www.ruby-forum.com/t/find-1-2-3-find-from-array-without-raising-error/113324)

<div class="topic-metadata">

**Author:** [@dougal](https://www.ruby-forum.com/u/dougal)\
**Replies:** 7\
**Last updated:** [August 29, 2007, 10:00pm UTC](https://www.ruby-forum.com/t/find-1-2-3-find-from-array-without-raising-error/113324 "2007-08-29T22:00:57Z")

</div>

Hello! Best way to explain this is with some code… id\_arr = \[1,2,3,4,5\] # There is no record with id 5. =\> results = find(id\_arr) ActiveRecord::RecordNotFound: Couldn’t find all Posts with IDs (1,2,3,4,5). From re…

---

## [Nil object?](https://www.ruby-forum.com/t/nil-object/113316)

<div class="topic-metadata">

**Author:** [@eagoweb](https://www.ruby-forum.com/u/eagoweb)\
**Replies:** 3\
**Last updated:** [August 29, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/nil-object/113316 "2007-08-29T21:55:31Z")

</div>

Hello i got this: \<%Payment.find\_all.each do |p|%\> \<li\>\<a href="#"\>\<%=p.member.name%\>-\<%=p.payer\_id%\>\</a\>\</li\> \<%end%\> it throw : You have a nil object when you didn’t expect it! The error occurred while evalua…

---

## [Where can I get more info about Unit/Test on ruby](https://www.ruby-forum.com/t/where-can-i-get-more-info-about-unit-test-on-ruby/113326)

<div class="topic-metadata">

**Author:** [@OnRails](https://www.ruby-forum.com/u/OnRails)\
**Replies:** 2\
**Last updated:** [August 29, 2007, 9:42pm UTC](https://www.ruby-forum.com/t/where-can-i-get-more-info-about-unit-test-on-ruby/113326 "2007-08-29T21:42:52Z")

</div>

who can tell me where I can get more info about Unit/Test on ruby? Thanks!

---

## [Setting an attribute when building or creating?](https://www.ruby-forum.com/t/setting-an-attribute-when-building-or-creating/113319)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 1\
**Last updated:** [August 29, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/setting-an-attribute-when-building-or-creating/113319 "2007-08-29T21:30:50Z")

</div>

I appreciate any help you can give me on this. Say you have categories and products. Category has many products. So you do the following c = Category.new p = c.products.build p.category\_id is already set. Say you ha…

---

## [What's wrong, I don't know how to fix it](https://www.ruby-forum.com/t/whats-wrong-i-dont-know-how-to-fix-it/113253)

<div class="topic-metadata">

**Author:** [@zlai](https://www.ruby-forum.com/u/zlai)\
**Replies:** 1\
**Last updated:** [August 29, 2007, 9:13pm UTC](https://www.ruby-forum.com/t/whats-wrong-i-dont-know-how-to-fix-it/113253 "2007-08-29T21:13:47Z")

</div>

I want to run this simple test, but something is wrong. I don’t know how to fix them! help!! work\_test.rb: require File.dirname(FILE) + ‘/…/test\_helper’ class WorkTest \< Test::Unit::TestCase fixtures :works def set…

---

## [What can I do for model testing in Unit/Test on ruby](https://www.ruby-forum.com/t/what-can-i-do-for-model-testing-in-unit-test-on-ruby/113325)

<div class="topic-metadata">

**Author:** [@OnRails](https://www.ruby-forum.com/u/OnRails)\
**Replies:** 0\
**Last updated:** [August 29, 2007, 9:04pm UTC](https://www.ruby-forum.com/t/what-can-i-do-for-model-testing-in-unit-test-on-ruby/113325 "2007-08-29T21:04:44Z")

</div>

For model testing in Unit/test on ruby, I just test the DB saving of all the tables? Like this model def self.get\_latest\_answers\_for\_person(person\_id, limit=10) return nil if person\_id.nil? return Answer.find\_by\_sql…

---

## [If only I could get 'observe\_field' to fire?](https://www.ruby-forum.com/t/if-only-i-could-get-observe-field-to-fire/113312)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [August 29, 2007, 9:01pm UTC](https://www.ruby-forum.com/t/if-only-i-could-get-observe-field-to-fire/113312 "2007-08-29T21:01:44Z")

</div>

I’ve been programming in Rails for about a year and have made great progress. If I could just fire an event inside a form and respond with code, I could go much further. I’ve created an example using the observe\_field…

[Previous page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=1729)

[Next page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=1731)
