# Rails

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

[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:** 1696

---

## [How i can deploy ROR on a Win 2k server?](https://www.ruby-forum.com/t/how-i-can-deploy-ror-on-a-win-2k-server/82413)

<div class="topic-metadata">

**Author:** [@Fausto](https://www.ruby-forum.com/u/Fausto)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 10:45pm UTC](https://www.ruby-forum.com/t/how-i-can-deploy-ror-on-a-win-2k-server/82413 "2007-09-25T22:45:40Z")

</div>

Id like to start developing in ROR but first i need to understand if i can deploy it on my production server running windows 2k server.At the moment i’m using a mongrel process on a port linked to a website redirectio…

---

## [Large file storage in database](https://www.ruby-forum.com/t/large-file-storage-in-database/82614)

<div class="topic-metadata">

**Author:** [@quangn](https://www.ruby-forum.com/u/quangn)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 10:45pm UTC](https://www.ruby-forum.com/t/large-file-storage-in-database/82614 "2007-09-25T22:45:21Z")

</div>

I’m in the planning stage of an app that will store images and short video clips approximately 1 meg in size from user uploads. My partner wants to use the database to store all of the files, mainly for scaling purpos…

---

## [Finding and Sorting](https://www.ruby-forum.com/t/finding-and-sorting/82622)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:45pm UTC](https://www.ruby-forum.com/t/finding-and-sorting/82622 "2007-09-25T22:45:21Z")

</div>

I am just trying to work through David Black’s block of code from Ruby For Rails, on page 80. def all @order = params\[:order\] || “number” sort\_proc = case @order when “author” then lambda {|r| \[r.user.name.downcase,…

---

## [Polymorphic table - find one associated object](https://www.ruby-forum.com/t/polymorphic-table-find-one-associated-object/81551)

<div class="topic-metadata">

**Author:** [@kim](https://www.ruby-forum.com/u/kim)\
**Replies:** 8\
**Last updated:** [September 25, 2007, 10:44pm UTC](https://www.ruby-forum.com/t/polymorphic-table-find-one-associated-object/81551 "2007-09-25T22:44:29Z")

</div>

Hello, I know how to find all the associated objects in a polymorphic relationship, but how do you find a particular associated object ? Currently, I have a method that collects all the associated objects. Then, to f…

---

## [Avoiding duplicate inserts from multiple ruby processes](https://www.ruby-forum.com/t/avoiding-duplicate-inserts-from-multiple-ruby-processes/82462)

<div class="topic-metadata">

**Author:** [@bataras](https://www.ruby-forum.com/u/bataras)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:44pm UTC](https://www.ruby-forum.com/t/avoiding-duplicate-inserts-from-multiple-ruby-processes/82462 "2007-09-25T22:44:02Z")

</div>

How do I use ActiveRecord to safely add-or-update the same unique row in a table from multiple ruby processes? Suppose I have a table called People with a column called ‘name’. In the DB (which is MySql), the name col…

---

## [Leading blanks in text areas](https://www.ruby-forum.com/t/leading-blanks-in-text-areas/82490)

<div class="topic-metadata">

**Author:** [@jankers](https://www.ruby-forum.com/u/jankers)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/leading-blanks-in-text-areas/82490 "2007-09-25T22:43:34Z")

</div>

I’ve been struggling with this for a while now and I give up. I searched and searched but couldn’t find the answer either. My edit form has a text area with the following HTML Description \<%=@workout.descriptio…

---

## [Loading ActiveRecords via a complex query](https://www.ruby-forum.com/t/loading-activerecords-via-a-complex-query/82509)

<div class="topic-metadata">

**Author:** [@Christopher\_JSBott](https://www.ruby-forum.com/u/Christopher_JSBott)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/loading-activerecords-via-a-complex-query/82509 "2007-09-25T22:43:34Z")

</div>

Ok, I have a many\_to\_many relationship between two tables (A, B) implemented by a join table (J). J has two columns: a\_id and b\_id. Currently, I use a query like this: recs = A.find :all, :select =\> ‘A.\*’, :join…

---

## [Login\_engine license?](https://www.ruby-forum.com/t/login-engine-license/81546)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/login-engine-license/81546 "2007-09-25T22:43:34Z")

</div>

Hi! I can’t seem to find any licensing information for the login\_engine plugin. I notice that the engines plugin is covered by the MIT license (and includes a file called MIT-LICENSE), so I’m assuming that the login…

---

## [Send\_data bombs out after 64K](https://www.ruby-forum.com/t/send-data-bombs-out-after-64k/82525)

<div class="topic-metadata">

**Author:** [@mjpowers](https://www.ruby-forum.com/u/mjpowers)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/send-data-bombs-out-after-64k/82525 "2007-09-25T22:42:31Z")

</div>

I’m using acts\_as\_attachment plugin to store files in the database. Uploading works fine, but when I use send\_data to allow users to download them, I only get the first 64K of the stream. Here’s a stripped down contr…

---

## [ActionMailer](https://www.ruby-forum.com/t/actionmailer/81276)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/actionmailer/81276 "2007-09-25T22:42:30Z")

</div>

I would like to do something like this class MailHandler \< ActionMailer def one end def two end end class InfoHandler \< MailHandler def three end end class NewHandler \< MailHandler def three end end The pr…

---

## [How to deploy with RoR 1.2?](https://www.ruby-forum.com/t/how-to-deploy-with-ror-1-2/81699)

<div class="topic-metadata">

**Author:** [@dankelley](https://www.ruby-forum.com/u/dankelley)\
**Replies:** 10\
**Last updated:** [September 25, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/how-to-deploy-with-ror-1-2/81699 "2007-09-25T22:42:11Z")

</div>

Compared with PHP, I’d say that frameworks reduce the pain of application development, but they increase the pain of deployment. Part of the problem is choice (a bad thing, in my view) and another part is change (agai…

---

## [RoR Roadmap](https://www.ruby-forum.com/t/ror-roadmap/81658)

<div class="topic-metadata">

**Author:** [@Joe\_at\_CodeGear](https://www.ruby-forum.com/u/Joe_at_CodeGear)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/ror-roadmap/81658 "2007-09-25T22:41:45Z")

</div>

I’ve been looking around for a “roadmap”, something that shows planned releases of RoR. I’m working with RC2, and I’m curious what and when there will be new releases. Thanks, Joe

---

## [Where to put algorithm class](https://www.ruby-forum.com/t/where-to-put-algorithm-class/82428)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/where-to-put-algorithm-class/82428 "2007-09-25T22:41:40Z")

</div>

I have a large class of algorithms (50-100 methods) used in calculating some results for a model class. I have created a separate algorithm.rb file which contains the class. Where should this file go ? Should it ev…

---

## [Migrations with Engines 1.2?](https://www.ruby-forum.com/t/migrations-with-engines-1-2/83438)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/migrations-with-engines-1-2/83438 "2007-09-25T22:41:39Z")

</div>

So do I have to install plugin\_migrations to run my migrations now? I installed the plugin\_dependencies, loaded\_plugins, and plugin\_migrations plugins (uggggh) and rake db:migrate:plugins gibs with: rake aborted! ca…

---

## [Functional tests : rescue\_action-rewrite causing problems (a](https://www.ruby-forum.com/t/functional-tests-rescue-action-rewrite-causing-problems-a/81609)

<div class="topic-metadata">

**Author:** [@Jonathan\_del\_Stroth](https://www.ruby-forum.com/u/Jonathan_del_Stroth)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/functional-tests-rescue-action-rewrite-causing-problems-a/81609 "2007-09-25T22:41:23Z")

</div>

Functional tests all come with a handy line that gives more sensible exception reporting, looking something like : class FooController; def rescue\_action(e) raise e end; end This can cause a few problems. For example…

---

## [Complex sql query approach](https://www.ruby-forum.com/t/complex-sql-query-approach/82652)

<div class="topic-metadata">

**Author:** [@Sean\_OSHara](https://www.ruby-forum.com/u/Sean_OSHara)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 10:40pm UTC](https://www.ruby-forum.com/t/complex-sql-query-approach/82652 "2007-09-25T22:40:32Z")

</div>

Hi All, I have a question about what would be the best or the “rails” way to generate a report from my web app that is basically a web store. I wonder if I should just come up with a complex sql query by hand (which …

---

## [Fixtures Max Size? SystemStackError: stack level too deep](https://www.ruby-forum.com/t/fixtures-max-size-systemstackerror-stack-level-too-deep/98778)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/fixtures-max-size-systemstackerror-stack-level-too-deep/98778 "2007-09-25T22:39:56Z")

</div>

Hello, I have a table of zipcodes that I am using in my application, so there are approximately 50,000 rows in this table. I have dumped the table to a fixture yaml file to represent this data, but when I try to load…

---

## [How to collapse all with a toggle](https://www.ruby-forum.com/t/how-to-collapse-all-with-a-toggle/82642)

<div class="topic-metadata">

**Author:** [@patcito](https://www.ruby-forum.com/u/patcito)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/how-to-collapse-all-with-a-toggle/82642 "2007-09-25T22:39:48Z")

</div>

Hey all, I have a loop that kind of looks like this: \<% for item in @items %\> \<% item.id %\> \<%= link\_to\_remote ‘show other ids’, :url=\>{:action=\>showall} %\> \<%end%\> What I want to do is when “show other ids” is …

---

## [Clean sheet, PHP/Java to a Rails core via \<insert method\>, b](https://www.ruby-forum.com/t/clean-sheet-php-java-to-a-rails-core-via-insert-method-b/82425)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/clean-sheet-php-java-to-a-rails-core-via-insert-method-b/82425 "2007-09-25T22:39:08Z")

</div>

Hi folks, I’ve been working on basic personal rails stuff for a bit now and have reached a point here I have the opportunity to develop something for my job. The basic scenario is this, take a half dozen or more php …

---

## [FC4 and ruby 1.8.5](https://www.ruby-forum.com/t/fc4-and-ruby-1-8-5/82604)

<div class="topic-metadata">

**Author:** [@suer\_rick](https://www.ruby-forum.com/u/suer_rick)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 10:38pm UTC](https://www.ruby-forum.com/t/fc4-and-ruby-1-8-5/82604 "2007-09-25T22:38:54Z")

</div>

I followed the directions for installing RoR on FC4 at http://digitalmediaminute.com/howto/fc4rails/#installROR. This resulted in ruby 1.8.4 being installed. I can’t seem to find a way to install ruby 1.8.5. Has any…

---

## ["def rescue\_action(e) raise e end" causing problems in integ](https://www.ruby-forum.com/t/def-rescue-action-e-raise-e-end-causing-problems-in-integ/82505)

<div class="topic-metadata">

**Author:** [@jon](https://www.ruby-forum.com/u/jon)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 10:38pm UTC](https://www.ruby-forum.com/t/def-rescue-action-e-raise-e-end-causing-problems-in-integ/82505 "2007-09-25T22:38:05Z")

</div>

Functional tests all come with a handy line that gives more sensible exception reporting, looking something like : class FooController; def rescue\_action(e) raise e end; end This causes problems in autotest. AFAICT, …

---

## [Where to define global functions and classes?](https://www.ruby-forum.com/t/where-to-define-global-functions-and-classes/82562)

<div class="topic-metadata">

**Author:** [@Christopher\_JSBott](https://www.ruby-forum.com/u/Christopher_JSBott)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/where-to-define-global-functions-and-classes/82562 "2007-09-25T22:37:45Z")

</div>

Where or how should I define functions and classes to be globally available to my entire Rails application? When I use script/generate to make a new model, it is available to to entire app… what if I want to make a s…

---

## [There appears to be a new version of the AWDWR 2.0 book](https://www.ruby-forum.com/t/there-appears-to-be-a-new-version-of-the-awdwr-2-0-book/81751)

<div class="topic-metadata">

**Author:** [@cskidmore](https://www.ruby-forum.com/u/cskidmore)\
**Replies:** 10\
**Last updated:** [September 25, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/there-appears-to-be-a-new-version-of-the-awdwr-2-0-book/81751 "2007-09-25T22:37:44Z")

</div>

Does anyone know what updates were applied to the book?

---

## [Is this group moderated in any way, and what's up with googl](https://www.ruby-forum.com/t/is-this-group-moderated-in-any-way-and-whats-up-with-googl/82597)

<div class="topic-metadata">

**Author:** [@surf](https://www.ruby-forum.com/u/surf)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/is-this-group-moderated-in-any-way-and-whats-up-with-googl/82597 "2007-09-25T22:37:39Z")

</div>

I posted a message that I was willing to work for sort of cheap so I could get more rails stuff on my resume. The post does not seem to be there however. I suspect it was removed ? Also, messages posted after jan 9th …

---

## [How to use API from AWS -- help!](https://www.ruby-forum.com/t/how-to-use-api-from-aws-help/82295)

<div class="topic-metadata">

**Author:** [@rph](https://www.ruby-forum.com/u/rph)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/how-to-use-api-from-aws-help/82295 "2007-09-25T22:37:17Z")

</div>

I’m building a users web service (direct dispatching) that will (I hope) allow several other applications to manage the same pool of users. Plus it will act as a single-sign-on solution for what I’m doing. But I’m h…

---

## [Undefined method \`each' for](https://www.ruby-forum.com/t/undefined-method-each-for/82645)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:34pm UTC](https://www.ruby-forum.com/t/undefined-method-each-for/82645 "2007-09-25T22:34:39Z")

</div>

Hi all. I am very new to ruby rails and I got this error. undefined method \`each’ for #Video:0x370bdd8 in selectaction.rhtml that calls video controller 3: 4: 5: \<% x = 0 %\> 6: \<% for video in @videos %\> …

---

## [Engines.current small useful patch](https://www.ruby-forum.com/t/engines-current-small-useful-patch/82467)

<div class="topic-metadata">

**Author:** [@Samuel\_W](https://www.ruby-forum.com/u/Samuel_W)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:34pm UTC](https://www.ruby-forum.com/t/engines-current-small-useful-patch/82467 "2007-09-25T22:34:31Z")

</div>

Hello. I wrote some code that I use to simplify including images. This function needs to know about engines as it is used within engine views, and can access images within the engine public repository. I have made a …

---

## [Rails 1.2.1 singleton resources (map.resource)](https://www.ruby-forum.com/t/rails-1-2-1-singleton-resources-map-resource/82419)

<div class="topic-metadata">

**Author:** [@dusty](https://www.ruby-forum.com/u/dusty)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 10:34pm UTC](https://www.ruby-forum.com/t/rails-1-2-1-singleton-resources-map-resource/82419 "2007-09-25T22:34:16Z")

</div>

I just installed rails 1.2.1 and am having trouble starting my application when I define a singleton resource. It loads up fine with all my normal map.resources, but when I use map.resource, I get an error. For exam…

---

## [How to see if string is true compared with a pattern](https://www.ruby-forum.com/t/how-to-see-if-string-is-true-compared-with-a-pattern/81802)

<div class="topic-metadata">

**Author:** [@paul](https://www.ruby-forum.com/u/paul)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 10:34pm UTC](https://www.ruby-forum.com/t/how-to-see-if-string-is-true-compared-with-a-pattern/81802 "2007-09-25T22:34:12Z")

</div>

hi, I have the following pattern to validate email address’s ^(0-9a-zA-Z@((\[0-9a-zA-Z\])+(\[-\\w\]\[0-9a-zA-Z\])\*.)+\[a-zA-Z\]{2,9})$ how can I compare this with a string and return true or false? thanks paul

---

## [Page layouts / general site layout with RoR](https://www.ruby-forum.com/t/page-layouts-general-site-layout-with-ror/82523)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/page-layouts-general-site-layout-with-ror/82523 "2007-09-25T22:32:42Z")

</div>

Hi, I’m pretty new to the whole RoR thing (coming from a .NET background) and have gone through some tutorials both in books and online. In the tutorials the controllers / views make sense. But suppose I have a layou…

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

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