# Rails

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

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

---

## [Echoe requires RubyGems version \>= 1.2](https://www.ruby-forum.com/t/echoe-requires-rubygems-version-1-2/153690)

<div class="topic-metadata">

**Author:** [@rubyfreak](https://www.ruby-forum.com/u/rubyfreak)\
**Replies:** 2\
**Last updated:** [November 20, 2008, 7:43am UTC](https://www.ruby-forum.com/t/echoe-requires-rubygems-version-1-2/153690 "2008-11-20T07:43:47Z")

</div>

I keep getting this error when attempting to install just about anything. I can’t find anything about it via google. Thanks in advance.

---

## [CRUD Conventions for Many to Many Relations](https://www.ruby-forum.com/t/crud-conventions-for-many-to-many-relations/153682)

<div class="topic-metadata">

**Author:** [@Eli\_Gibson](https://www.ruby-forum.com/u/Eli_Gibson)\
**Replies:** 2\
**Last updated:** [November 20, 2008, 7:35am UTC](https://www.ruby-forum.com/t/crud-conventions-for-many-to-many-relations/153682 "2008-11-20T07:35:01Z")

</div>

I am curious is there is a convention for the the following in CRUD: I have users and groups. Each group can have many users, and each user can have many groups. These are related through a has\_many :through pattern, …

---

## [Adding smileys to posts](https://www.ruby-forum.com/t/adding-smileys-to-posts/153693)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 7:07am UTC](https://www.ruby-forum.com/t/adding-smileys-to-posts/153693 "2008-11-20T07:07:01Z")

</div>

i want to add a little side box next to the posts where users can click smiley icons to insert them into the post. i’m guessing that i’m probably going to use ajax/javascript but was wondering if there are some easier…

---

## [Overriding layout causes empty response with content\_for](https://www.ruby-forum.com/t/overriding-layout-causes-empty-response-with-content-for/153686)

<div class="topic-metadata">

**Author:** [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Replies:** 4\
**Last updated:** [November 20, 2008, 6:58am UTC](https://www.ruby-forum.com/t/overriding-layout-causes-empty-response-with-content-for/153686 "2008-11-20T06:58:46Z")

</div>

Hi, I’m trying to pinpoint what the issue might be here. In a controller that has the appropriate layout (layouts/controller.html.erb), if I try to override the layout to the ‘application’ layout only for certain act…

---

## [Sharding](https://www.ruby-forum.com/t/sharding/153692)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 6:57am UTC](https://www.ruby-forum.com/t/sharding/153692 "2008-11-20T06:57:22Z")

</div>

Does anyone have any experience they’d like to share on data sharding? In particular working with a gem like this: http://blog.fiveruns.com/2008/7/9/introducing-data\_fabric My concerns are: This doesn’t appear to u…

---

## [File Upload fails for large files](https://www.ruby-forum.com/t/file-upload-fails-for-large-files/153689)

<div class="topic-metadata">

**Author:** [@chirantan](https://www.ruby-forum.com/u/chirantan)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 6:00am UTC](https://www.ruby-forum.com/t/file-upload-fails-for-large-files/153689 "2008-11-20T06:00:17Z")

</div>

Hi, I am using mongrel with nginx and I am facing problem when I try to upload a large file. After googling about this, I came to know that I need to configure nginx.conf file by setting ‘client\_max\_body\_size’ to a v…

---

## [Logging on Rails 2.2 different than 2.0.2?](https://www.ruby-forum.com/t/logging-on-rails-2-2-different-than-2-0-2/153388)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 5\
**Last updated:** [November 20, 2008, 4:09am UTC](https://www.ruby-forum.com/t/logging-on-rails-2-2-different-than-2-0-2/153388 "2008-11-20T04:09:12Z")

</div>

Hi, On my beginng app under 2.0.2 (ovre WinXP/SP3), all I wrote was logger.info “xxxx” and xxxx was displayed in the Command Window running Mongrel. Now I’ve upgraded to 2.2.0 and log.info “xxxx” seems to do nothing…

---

## [Difference between include and joins in find?](https://www.ruby-forum.com/t/difference-between-include-and-joins-in-find/153508)

<div class="topic-metadata">

**Author:** [@boblu](https://www.ruby-forum.com/u/boblu)\
**Replies:** 7\
**Last updated:** [November 20, 2008, 2:45am UTC](https://www.ruby-forum.com/t/difference-between-include-and-joins-in-find/153508 "2008-11-20T02:45:31Z")

</div>

I had real weird problem here. If I use “joins” in find, both development and production environment give right answers. But, when I use “include” in find, the development environment goes all right. However, the fi…

---

## [First time stepping out of bounds, where does my code go?](https://www.ruby-forum.com/t/first-time-stepping-out-of-bounds-where-does-my-code-go/153676)

<div class="topic-metadata">

**Author:** [@markbates](https://www.ruby-forum.com/u/markbates)\
**Replies:** 1\
**Last updated:** [November 20, 2008, 1:37am UTC](https://www.ruby-forum.com/t/first-time-stepping-out-of-bounds-where-does-my-code-go/153676 "2008-11-20T01:37:40Z")

</div>

Hey all! I am about to start drawing outside the lines for the first time, and I had a strange question. I have been following the rails conventions outlined in my readings and tutorials. I am now working on creating …

---

## [Generator with prompted user input?](https://www.ruby-forum.com/t/generator-with-prompted-user-input/153677)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 1:29am UTC](https://www.ruby-forum.com/t/generator-with-prompted-user-input/153677 "2008-11-20T01:29:13Z")

</div>

Is there any good way to have a generator prompt for user input (with a default) as part of it’s processing? Sort of like when there’s a conflict, and you haven’t set an argument other than ‘ask’, it asks you whether…

---

## [Validation of co-dependent fields](https://www.ruby-forum.com/t/validation-of-co-dependent-fields/153669)

<div class="topic-metadata">

**Author:** [@dhmspector](https://www.ruby-forum.com/u/dhmspector)\
**Replies:** 0\
**Last updated:** [November 19, 2008, 11:56pm UTC](https://www.ruby-forum.com/t/validation-of-co-dependent-fields/153669 "2008-11-19T23:56:21Z")

</div>

Is it possible to do validation on two fields that are co-dependent inside a single validates\_numericality\_of statement? Say for example I have two fields: sales\_headcount and sales\_compensation, in which both fields…

---

## [How to change default error message](https://www.ruby-forum.com/t/how-to-change-default-error-message/153662)

<div class="topic-metadata">

**Author:** [@petan](https://www.ruby-forum.com/u/petan)\
**Replies:** 1\
**Last updated:** [November 19, 2008, 10:30pm UTC](https://www.ruby-forum.com/t/how-to-change-default-error-message/153662 "2008-11-19T22:30:09Z")

</div>

Hi all, is there a way how to change this default message “9 errors prohibited this user from being saved, There were problems with the following fields:” I’d like to be in Czech. Is it possible? Thx. P.

---

## [Is an Association?](https://www.ruby-forum.com/t/is-an-association/153652)

<div class="topic-metadata">

**Author:** [@nicpon](https://www.ruby-forum.com/u/nicpon)\
**Replies:** 3\
**Last updated:** [November 19, 2008, 10:19pm UTC](https://www.ruby-forum.com/t/is-an-association/153652 "2008-11-19T22:19:36Z")

</div>

Is there a method to find out whether given column is an association or not? For example, I would like iterate through all columns in a given record and do something for each column that is an association.

---

## [Mock today](https://www.ruby-forum.com/t/mock-today/153654)

<div class="topic-metadata">

**Author:** [@Eric\_LIn](https://www.ruby-forum.com/u/Eric_LIn)\
**Replies:** 3\
**Last updated:** [November 19, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/mock-today/153654 "2008-11-19T22:00:10Z")

</div>

In some of my unit tests, I find the need to set today to a different value than the actual today. For example, to test the model method “balance\_of\_today”, which takes no argument, I want to have Date.today be a spe…

---

## [How to use form\_for inside form\_for](https://www.ruby-forum.com/t/how-to-use-form-for-inside-form-for/153650)

<div class="topic-metadata">

**Author:** [@srijith](https://www.ruby-forum.com/u/srijith)\
**Replies:** 2\
**Last updated:** [November 19, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/how-to-use-form-for-inside-form-for/153650 "2008-11-19T21:39:20Z")

</div>

Hi friends I am having one doubt.i am using form\_for inside form\_for and if i clicked the child form\_for submit button its going to parent form\_for snd the code is written bellow. \<% form\_for(:tender,:url=\>{:action=\>‘…

---

## [Defining has\_many without a foreign key](https://www.ruby-forum.com/t/defining-has-many-without-a-foreign-key/153655)

<div class="topic-metadata">

**Author:** [@normelton](https://www.ruby-forum.com/u/normelton)\
**Replies:** 0\
**Last updated:** [November 19, 2008, 9:31pm UTC](https://www.ruby-forum.com/t/defining-has-many-without-a-foreign-key/153655 "2008-11-19T21:31:03Z")

</div>

Is it possible to have a has\_many relationship without a foreign key? I’d like to eager-load associations based on some arbitrary SQL. For instance, I would like to do something like: :has\_many :neighbors, :class\_name…

---

## [Newb confusion: instance variable accessible from outside class, but nil from inside instance metho](https://www.ruby-forum.com/t/newb-confusion-instance-variable-accessible-from-outside-class-but-nil-from-inside-instance-metho/153640)

<div class="topic-metadata">

**Author:** [@brian](https://www.ruby-forum.com/u/brian)\
**Replies:** 5\
**Last updated:** [November 19, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/newb-confusion-instance-variable-accessible-from-outside-class-but-nil-from-inside-instance-metho/153640 "2008-11-19T21:06:23Z")

</div>

I’ve got a simple class, defined by the following table in a migration: create\_table :buzzusers do |t| t.integer :user\_id t.string :name t.integer :level, :default =\> 0 t.timestamps end I usually create it with …

---

## [STI updating the :type attribute of an STI instance](https://www.ruby-forum.com/t/sti-updating-the-type-attribute-of-an-sti-instance/153551)

<div class="topic-metadata">

**Author:** [@itkin](https://www.ruby-forum.com/u/itkin)\
**Replies:** 5\
**Last updated:** [November 19, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/sti-updating-the-type-attribute-of-an-sti-instance/153551 "2008-11-19T20:16:25Z")

</div>

Hi ! i’ve different users subclasses organised thanks to STI under a user mother class, problem is that i can’t find a way to exchange a user form a certain type to an other , any light ??? class User \< ActiveRecord:…

---

## [Connecting to MS SQL server from OSX](https://www.ruby-forum.com/t/connecting-to-ms-sql-server-from-osx/143804)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [November 19, 2008, 7:35pm UTC](https://www.ruby-forum.com/t/connecting-to-ms-sql-server-from-osx/143804 "2008-11-19T19:35:09Z")

</div>

This has been a long painful day and I am hoping someone can help. I am trying to get my Rails application running on Mac/Leopard to connect to a Microsoft SQL server. I have followed the instructions at http://wik…

---

## [Has\_many through select box in form](https://www.ruby-forum.com/t/has-many-through-select-box-in-form/153646)

<div class="topic-metadata">

**Author:** [@cjharrelson](https://www.ruby-forum.com/u/cjharrelson)\
**Replies:** 0\
**Last updated:** [November 19, 2008, 7:15pm UTC](https://www.ruby-forum.com/t/has-many-through-select-box-in-form/153646 "2008-11-19T19:15:00Z")

</div>

Gentlemen, I have searched the group and have not found any post that clarifies thsi s=issue to me. Please forgive me in advance if I missed something. I have 3 models: Ticket has\_many :citations, :dependent =\> :n…

---

## [Controllername\_url vs controllername\_path](https://www.ruby-forum.com/t/controllername-url-vs-controllername-path/153644)

<div class="topic-metadata">

**Author:** [@Ashit\_V](https://www.ruby-forum.com/u/Ashit_V)\
**Replies:** 1\
**Last updated:** [November 19, 2008, 7:06pm UTC](https://www.ruby-forum.com/t/controllername-url-vs-controllername-path/153644 "2008-11-19T19:06:47Z")

</div>

Hi, 'm new RoR. I was just going thru one book. I was confused between Controllername\_Path() and Controllername\_Url() in RESTful Rails apps. Can anyone tell me the clear difference? Thanks

---

## [Link\_to\_remote :confirm =\> as JavaScript function (dynamic)](https://www.ruby-forum.com/t/link-to-remote-confirm-as-javascript-function-dynamic/151548)

<div class="topic-metadata">

**Author:** [@inari](https://www.ruby-forum.com/u/inari)\
**Replies:** 1\
**Last updated:** [November 19, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/link-to-remote-confirm-as-javascript-function-dynamic/151548 "2008-11-19T18:33:53Z")

</div>

Hey all, Normally you can use the :confirm functionality of link\_to\_remote to specify the text of a confirmation dialogue. For example, :confirm =\> “hello” generate: \<a href="#" onclick="if (confirm(‘hello’)) { new A…

---

## [Backgroundjob (bj) stopped working](https://www.ruby-forum.com/t/backgroundjob-bj-stopped-working/153619)

<div class="topic-metadata">

**Author:** [@apie](https://www.ruby-forum.com/u/apie)\
**Replies:** 4\
**Last updated:** [November 19, 2008, 5:12pm UTC](https://www.ruby-forum.com/t/backgroundjob-bj-stopped-working/153619 "2008-11-19T17:12:50Z")

</div>

Hi We have been using bj for a while now to upload images to S3 for storage. Everything was running fine, but recently bj has completely stopped working. In the past Bj would just start working when I started mongre…

---

## [What is the preferred "lightbox" plugin?](https://www.ruby-forum.com/t/what-is-the-preferred-lightbox-plugin/153572)

<div class="topic-metadata">

**Author:** [@phallstrom](https://www.ruby-forum.com/u/phallstrom)\
**Replies:** 5\
**Last updated:** [November 19, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/what-is-the-preferred-lightbox-plugin/153572 "2008-11-19T16:16:50Z")

</div>

Hi all - I need to do an overlay with something that supports ajax/remote html. There’s lots of options and quite a few rails plugins. Some seem out of date however. Any suggestions on which one is “best” where “be…

---

## [Speed up counting?](https://www.ruby-forum.com/t/speed-up-counting/153606)

<div class="topic-metadata">

**Author:** [@lackyg](https://www.ruby-forum.com/u/lackyg)\
**Replies:** 5\
**Last updated:** [November 19, 2008, 3:53pm UTC](https://www.ruby-forum.com/t/speed-up-counting/153606 "2008-11-19T15:53:16Z")

</div>

Hello! I need to speed up a count of apearances of a distinct category of entities in a table. I get the categories with the following command: @asset\_classes = ActiveRecord::Base.connection.select\_values “SELECT DIS…

---

## [Extending ActiveRecord::Base broken during 2.2.0 RC update](https://www.ruby-forum.com/t/extending-activerecord-base-broken-during-2-2-0-rc-update/153611)

<div class="topic-metadata">

**Author:** [@Wincent\_C](https://www.ruby-forum.com/u/Wincent_C)\
**Replies:** 3\
**Last updated:** [November 19, 2008, 3:42pm UTC](https://www.ruby-forum.com/t/extending-activerecord-base-broken-during-2-2-0-rc-update/153611 "2008-11-19T15:42:44Z")

</div>

I’m trying to diagnose some breakage that occurred in the update from 2.1.2 to 2.2.0. The short version: an “acts\_as\_searchable” method added to ActiveRecord::Base doesn’t work anymore (raises NoMethodError). The lon…

---

## [Pass text\_field\_with\_auto\_complete value into link\_to\_remote](https://www.ruby-forum.com/t/pass-text-field-with-auto-complete-value-into-link-to-remote/153624)

<div class="topic-metadata">

**Author:** [@palani](https://www.ruby-forum.com/u/palani)\
**Replies:** 1\
**Last updated:** [November 19, 2008, 3:05pm UTC](https://www.ruby-forum.com/t/pass-text-field-with-auto-complete-value-into-link-to-remote/153624 "2008-11-19T15:05:43Z")

</div>

Hi, please any one tell me how can i pass the text\_field\_with\_auto\_complete value into link\_to\_remote in view. Here are the coding in view . \<%= text\_field\_with\_auto\_complete :game, :title%\> link\_to\_remote(“Find”, :…

---

## [Validates\_uniqueness\_of only if present](https://www.ruby-forum.com/t/validates-uniqueness-of-only-if-present/153615)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 2\
**Last updated:** [November 19, 2008, 1:09pm UTC](https://www.ruby-forum.com/t/validates-uniqueness-of-only-if-present/153615 "2008-11-19T13:09:34Z")

</div>

Hi - I want to allow duplicate fields values if the field is blank, but disallow duplicates if it’s not. Is there a validates\_uniqueness\_of\_if\_present equivalent? Thanks, Dino

---

## [Updating the mysql record without id feild](https://www.ruby-forum.com/t/updating-the-mysql-record-without-id-feild/153617)

<div class="topic-metadata">

**Author:** [@hema\_mca](https://www.ruby-forum.com/u/hema_mca)\
**Replies:** 3\
**Last updated:** [November 19, 2008, 1:00pm UTC](https://www.ruby-forum.com/t/updating-the-mysql-record-without-id-feild/153617 "2008-11-19T13:00:41Z")

</div>

Hi All, I need to update the records in the mysql with the data fields from the xml where the id field not presented in the database, instead we took the number as primary key but not auto\_incremented. I treid with …

---

## [Ordering with eager loading](https://www.ruby-forum.com/t/ordering-with-eager-loading/153597)

<div class="topic-metadata">

**Author:** [@felipegiotto](https://www.ruby-forum.com/u/felipegiotto)\
**Replies:** 3\
**Last updated:** [November 19, 2008, 12:58pm UTC](https://www.ruby-forum.com/t/ordering-with-eager-loading/153597 "2008-11-19T12:58:19Z")

</div>

I’m trying to order my results by what I got with eager loading. there is a bit of code about what i want @study\_class = StudyClass.find(:all, :include =\> :teacher) it is associated with an id, and i want to order my …

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

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