# Rails

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

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

---

## [The page does not load](https://www.ruby-forum.com/t/the-page-does-not-load/152813)

<div class="topic-metadata">

**Author:** [@Delirium\_tremens](https://www.ruby-forum.com/u/Delirium_tremens)\
**Replies:** 2\
**Last updated:** [November 7, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/the-page-does-not-load/152813 "2008-11-07T18:12:39Z")

</div>

I am trying to load an upcoming stories page for a Digg clone, but I am getting an error message. http://pastie.org/309612 How to correct the error?

---

## [Create 50 objects and show only them](https://www.ruby-forum.com/t/create-50-objects-and-show-only-them/152534)

<div class="topic-metadata">

**Author:** [@medwedj](https://www.ruby-forum.com/u/medwedj)\
**Replies:** 2\
**Last updated:** [November 7, 2008, 6:10pm UTC](https://www.ruby-forum.com/t/create-50-objects-and-show-only-them/152534 "2008-11-07T18:10:40Z")

</div>

Hello all! Situation: user has a possibility to create variable amount number of objects. The number choses user himself. After creating user wants to see all just created objects. And only them. Not the rest. How ca…

---

## [Caching data in memory](https://www.ruby-forum.com/t/caching-data-in-memory/152743)

<div class="topic-metadata">

**Author:** [@thabenksta](https://www.ruby-forum.com/u/thabenksta)\
**Replies:** 8\
**Last updated:** [November 7, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/caching-data-in-memory/152743 "2008-11-07T16:13:57Z")

</div>

I need to load some read-only lookup data from the database into memory for fast access (i.e. caching). What’s the best way to cache data in memory in Rails apps? For example, should I use global, class or instance v…

---

## [Database documentation](https://www.ruby-forum.com/t/database-documentation/152736)

<div class="topic-metadata">

**Author:** [@fernando](https://www.ruby-forum.com/u/fernando)\
**Replies:** 3\
**Last updated:** [November 7, 2008, 2:25pm UTC](https://www.ruby-forum.com/t/database-documentation/152736 "2008-11-07T14:25:52Z")

</div>

so far i havent been able to find a way to document my database with rails. is this a flaw? a feature? a hidden feature? or they just dont care about documenting the database?

---

## [Validations on array checkbox in Model](https://www.ruby-forum.com/t/validations-on-array-checkbox-in-model/196838)

<div class="topic-metadata">

**Author:** [@babar](https://www.ruby-forum.com/u/babar)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 2:00pm UTC](https://www.ruby-forum.com/t/validations-on-array-checkbox-in-model/196838 "2008-11-07T14:00:38Z")

</div>

Hi, I am using array ‘sub\_id\[\]’ for multiple checkbox, i want to place validations on all array ‘sub\_ids\[\]’ checbox in model just like other validations. \<% for e in @subjects do -%\> \<input type=“checkbox” name=“su…

---

## [Validation on array checkbox in Model](https://www.ruby-forum.com/t/validation-on-array-checkbox-in-model/152792)

<div class="topic-metadata">

**Author:** [@babar](https://www.ruby-forum.com/u/babar)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 2:00pm UTC](https://www.ruby-forum.com/t/validation-on-array-checkbox-in-model/152792 "2008-11-07T14:00:02Z")

</div>

Hi, I am using array ‘sub\_id\[\]’ for multiple checkbox, i want to place validations on all array ‘sub\_ids\[\]’ checbox in model just like other validations. \<% for e in @subjects do -%\> \<input type=“checkbox” name=“su…

---

## [Add message to model validation errors](https://www.ruby-forum.com/t/add-message-to-model-validation-errors/152791)

<div class="topic-metadata">

**Author:** [@Erik\_Dahlstrand](https://www.ruby-forum.com/u/Erik_Dahlstrand)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 1:47pm UTC](https://www.ruby-forum.com/t/add-message-to-model-validation-errors/152791 "2008-11-07T13:47:43Z")

</div>

Hi! I’m using CAPTCHA plugin (http://github.com/zendesk/captcha/tree). When CAPTCHA validation fails the error message is added to flash\[“error”\]. How can I add the CAPTCHA error message to the model validation mess…

---

## [Insert key/value pair into hash, then read it out](https://www.ruby-forum.com/t/insert-key-value-pair-into-hash-then-read-it-out/152723)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 5\
**Last updated:** [November 7, 2008, 1:11pm UTC](https://www.ruby-forum.com/t/insert-key-value-pair-into-hash-then-read-it-out/152723 "2008-11-07T13:11:50Z")

</div>

Hi there, I’ve been trying to figure out if/how the following is possible… @books: array of books @books.each do |book| do stuff… do stuff… do stuff… book\[“number\_of\_pages”\] = 123 #this is supposed to “inject” t…

---

## [How to overwrite a method?](https://www.ruby-forum.com/t/how-to-overwrite-a-method/152787)

<div class="topic-metadata">

**Author:** [@ss\_1982](https://www.ruby-forum.com/u/ss_1982)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 12:17pm UTC](https://www.ruby-forum.com/t/how-to-overwrite-a-method/152787 "2008-11-07T12:17:59Z")

</div>

Hi, The following file within rails /activeresource/lib/active\_resource/formats/xml\_format.rb Has the method def extension “xml” end How can I overwrite this so that it returns PHP without editing any core file? …

---

## [Attachment\_fu Validation Error](https://www.ruby-forum.com/t/attachment-fu-validation-error/152786)

<div class="topic-metadata">

**Author:** [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 12:13pm UTC](https://www.ruby-forum.com/t/attachment-fu-validation-error/152786 "2008-11-07T12:13:04Z")

</div>

Hi there! I am trying to get attachment\_fu to work. It is so good as done, just one strange error is still there. this is my model: class Motorbike \< ActiveRecord::Base has\_attachment :content\_type =\> :image, :sto…

---

## [New on Ruby on Rails setup problem](https://www.ruby-forum.com/t/new-on-ruby-on-rails-setup-problem/152784)

<div class="topic-metadata">

**Author:** [@fabiocmc](https://www.ruby-forum.com/u/fabiocmc)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 11:42am UTC](https://www.ruby-forum.com/t/new-on-ruby-on-rails-setup-problem/152784 "2008-11-07T11:42:14Z")

</div>

Hi there I’m new here and I’ve just installed the Instant Rails package, and I’m getting this error message: “Either Apache or MySql cannot run because another program is using it’s port”. What should I do? Thanks, F…

---

## [\[ANN\] ActiveRecord :select with :include gem](https://www.ruby-forum.com/t/ann-activerecord-select-with-include-gem/104739)

<div class="topic-metadata">

**Author:** [@Paolo\_N](https://www.ruby-forum.com/u/Paolo_N)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 11:41am UTC](https://www.ruby-forum.com/t/ann-activerecord-select-with-include-gem/104739 "2008-11-07T11:41:36Z")

</div>

I’m writing to announce the first release of select\_with\_include gem. This gem allows the use of the :select option together with the :include in the #find ActiveRecord method. In the current ActiveRecord version if a…

---

## [SQL question](https://www.ruby-forum.com/t/sql-question/152670)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 4\
**Last updated:** [November 7, 2008, 11:37am UTC](https://www.ruby-forum.com/t/sql-question/152670 "2008-11-07T11:37:17Z")

</div>

This works as expected in sqlite3 select id, title || body as tb from docs where tb like ‘%en%’ But fails in postgres because tb is unknown. and works in ms-sql like: select id from docs where title+body like ‘%en%’ …

---

## [Recursive problem](https://www.ruby-forum.com/t/recursive-problem/152782)

<div class="topic-metadata">

**Author:** [@eqbal](https://www.ruby-forum.com/u/eqbal)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 11:32am UTC](https://www.ruby-forum.com/t/recursive-problem/152782 "2008-11-07T11:32:37Z")

</div>

Hi everybody, I was trying to create a rake task to import geo data by accessing geonmae API’s xml data , I wanna create a list of countries , cities , sub cities that r related to each other through nested list , any…

---

## [Set whether the mail is read or not](https://www.ruby-forum.com/t/set-whether-the-mail-is-read-or-not/152756)

<div class="topic-metadata">

**Author:** [@Ishara\_G](https://www.ruby-forum.com/u/Ishara_G)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 11:23am UTC](https://www.ruby-forum.com/t/set-whether-the-mail-is-read-or-not/152756 "2008-11-07T11:23:28Z")

</div>

i have a model called Reply which includes user\_id, msg\_id, msg,date,read\_or\_not when a user read a mail i want to set the read\_or\_not variable true,

---

## [Adding methods to an array of AR objects](https://www.ruby-forum.com/t/adding-methods-to-an-array-of-ar-objects/152779)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 11:22am UTC](https://www.ruby-forum.com/t/adding-methods-to-an-array-of-ar-objects/152779 "2008-11-07T11:22:18Z")

</div>

I have some methods that i want to be able to call on any collection of ActiveRecord objects. What’s the ‘right’ way to set this up? I don’t want to just monkey patch Array as it’s specific to an AR array. Thanks m…

---

## [Different renders on main page](https://www.ruby-forum.com/t/different-renders-on-main-page/152759)

<div class="topic-metadata">

**Author:** [@panatura](https://www.ruby-forum.com/u/panatura)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 11:21am UTC](https://www.ruby-forum.com/t/different-renders-on-main-page/152759 "2008-11-07T11:21:43Z")

</div>

Hi all, just want to know how to act: It’s some kind of community website and at the main site I want to have different boxes with information from differen models -\> new users, new news, etc. How to set up? Do I ne…

---

## [Still undefined pagination](https://www.ruby-forum.com/t/still-undefined-pagination/152659)

<div class="topic-metadata">

**Author:** [@up1notch](https://www.ruby-forum.com/u/up1notch)\
**Replies:** 7\
**Last updated:** [November 7, 2008, 10:40am UTC](https://www.ruby-forum.com/t/still-undefined-pagination/152659 "2008-11-07T10:40:01Z")

</div>

I have tried to install both the classic\_pagination and will\_paginate using the commands below, but still get the “undefined method paginate”. Source code and error dump shown below. What did i miss out. Thanks. =====…

---

## [3 failures, 4 errors](https://www.ruby-forum.com/t/3-failures-4-errors/152766)

<div class="topic-metadata">

**Author:** [@Delirium\_tremens](https://www.ruby-forum.com/u/Delirium_tremens)\
**Replies:** 2\
**Last updated:** [November 7, 2008, 10:23am UTC](https://www.ruby-forum.com/t/3-failures-4-errors/152766 "2008-11-07T10:23:40Z")

</div>

error http://pastie.org/309370 failure http://pastie.org/309371 error http://pastie.org/309372 error http://pastie.org/309373 error http://pastie.org/309374 failure http://pastie.org/309376 failure http://pastie.or…

---

## [Another question about database modelling](https://www.ruby-forum.com/t/another-question-about-database-modelling/152710)

<div class="topic-metadata">

**Author:** [@msmsms](https://www.ruby-forum.com/u/msmsms)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 10:10am UTC](https://www.ruby-forum.com/t/another-question-about-database-modelling/152710 "2008-11-07T10:10:08Z")

</div>

Hello, thanks for reading! :slight\_smile: Ich will describe my problem with the help of an example, I think, that’s the quickiest way to present my thoughts. Let’s assume, you want to save locations. Locations can be …

---

## [Sort array of strings with ÄÅ¡Å¾](https://www.ruby-forum.com/t/sort-array-of-strings-with-a-a-a/152770)

<div class="topic-metadata">

**Author:** [@sineserz](https://www.ruby-forum.com/u/sineserz)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 9:58am UTC](https://www.ruby-forum.com/t/sort-array-of-strings-with-a-a-a/152770 "2008-11-07T09:58:14Z")

</div>

hi, I have problems with sorting array of strings with special characters (Ä Å¡ Å¾), %w"abcÄdesÅ¡uvzÅ¾".sort =\> “abcdesuvzÄÅ¡Å¾” the right order should be Ä after c, Å¡ after s and Å¾ after z. I write my own sor…

---

## [Text output in rxml (builder)](https://www.ruby-forum.com/t/text-output-in-rxml-builder/93121)

<div class="topic-metadata">

**Author:** [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Replies:** 4\
**Last updated:** [November 7, 2008, 9:55am UTC](https://www.ruby-forum.com/t/text-output-in-rxml-builder/93121 "2008-11-07T09:55:13Z")

</div>

Hi, I need to output the following in an rxml template: -122.3662784465226,37.81884427772081,30 -122.3652480684771,37.81926777010555,30 -122.365640222455,37.81986126286519,30 -122.36666937925,37.81942987753481,…

---

## [Why rails is internationalization framework?](https://www.ruby-forum.com/t/why-rails-is-internationalization-framework/152760)

<div class="topic-metadata">

**Author:** [@thaniyarasu](https://www.ruby-forum.com/u/thaniyarasu)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 9:27am UTC](https://www.ruby-forum.com/t/why-rails-is-internationalization-framework/152760 "2008-11-07T09:27:52Z")

</div>

what is internationalization framework ? why rails is internationalization framework ? what are the advance in rails 2.2.0 over rails (\< 2.1.1)

---

## [Ruby script/performance/profiler](https://www.ruby-forum.com/t/ruby-script-performance-profiler/152764)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 9:09am UTC](https://www.ruby-forum.com/t/ruby-script-performance-profiler/152764 "2008-11-07T09:09:55Z")

</div>

Hi I have seen this code And i would like to know what dies it mean ruby script/performance/profiler ‘Model.new’ 10 Could anybody please tell what this script is doing? Thanks in advance Sijo

---

## [SQLITE3 error](https://www.ruby-forum.com/t/sqlite3-error/152762)

<div class="topic-metadata">

**Author:** [@barrymackichan](https://www.ruby-forum.com/u/barrymackichan)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 8:14am UTC](https://www.ruby-forum.com/t/sqlite3-error/152762 "2008-11-07T08:14:13Z")

</div>

I keep getting the following error when trying to use sqlite3 with Ruby. “./sqlite3.dll: 127: The specified procedure could not be found. - Init\_sqlite3 (LoadError) ./sqlite3.dll from C:/Ruby/lib/ruby/site\_ruby/1…

---

## [Sending routing errors to the bitbucket](https://www.ruby-forum.com/t/sending-routing-errors-to-the-bitbucket/136850)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 2\
**Last updated:** [November 7, 2008, 8:05am UTC](https://www.ruby-forum.com/t/sending-routing-errors-to-the-bitbucket/136850 "2008-11-07T08:05:27Z")

</div>

Hi, Rails 1.2.6 on Linux, WEBrick. Most of my users run IE 6, and some of them have MS Office plugins that send bogus requests, causing routing errors like this: ActionController::RoutingError (no route found to matc…

---

## [Creating empty array of items - should be a quick simple one](https://www.ruby-forum.com/t/creating-empty-array-of-items-should-be-a-quick-simple-one/152754)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 4\
**Last updated:** [November 7, 2008, 5:27am UTC](https://www.ruby-forum.com/t/creating-empty-array-of-items-should-be-a-quick-simple-one/152754 "2008-11-07T05:27:13Z")

</div>

here is some of the code: @items\_all = Item.find(:all) for item in @items\_all do if not FileTest.exist?(item.image\_name) @items\_missing\_images += item end end You have a nil object when you didn’t expect it! …

---

## [Active record associations](https://www.ruby-forum.com/t/active-record-associations/152755)

<div class="topic-metadata">

**Author:** [@obenhauser](https://www.ruby-forum.com/u/obenhauser)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 5:18am UTC](https://www.ruby-forum.com/t/active-record-associations/152755 "2008-11-07T05:18:37Z")

</div>

What’s wrong with ruby associations? Somehow association fields don’t have any support for dirty objects nor optimistic locking. I would expect dirty objects to work like this: class Person has\_many :cars end pe…

---

## [Attachment\_Fu ImageScience and FreeImage problems](https://www.ruby-forum.com/t/attachment-fu-imagescience-and-freeimage-problems/152741)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 4:34am UTC](https://www.ruby-forum.com/t/attachment-fu-imagescience-and-freeimage-problems/152741 "2008-11-07T04:34:08Z")

</div>

I have been trying to run the UploadImages Recipe from Mike C.'s Advanced Rails Recipes book. I have installed both ImageScience and FreeImage on my Ubuntu 7.10 box. When I run the program and try to upload an image…

---

## [Active record associations](https://www.ruby-forum.com/t/active-record-associations/152664)

<div class="topic-metadata">

**Author:** [@obenhauser](https://www.ruby-forum.com/u/obenhauser)\
**Replies:** 2\
**Last updated:** [November 7, 2008, 4:18am UTC](https://www.ruby-forum.com/t/active-record-associations/152664 "2008-11-07T04:18:59Z")

</div>

I want to accomplish the following. I have an object that can be edited. However, it can occur that two people might edit the object at the same time. Instead of locking the object down, I prefer to tell the user ho…

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

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