# Rails

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

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

---

## [Recipients did not receive the mail in Rails 2.0.2](https://www.ruby-forum.com/t/recipients-did-not-receive-the-mail-in-rails-2-0-2/153704)

<div class="topic-metadata">

**Author:** [@devirv](https://www.ruby-forum.com/u/devirv)\
**Replies:** 1\
**Last updated:** [November 21, 2008, 4:00am UTC](https://www.ruby-forum.com/t/recipients-did-not-receive-the-mail-in-rails-2-0-2/153704 "2008-11-21T04:00:28Z")

</div>

Hi, I am new to ROR and i trying to send emails using rails version 2.0.2. But the recipients did not receive the mail i check the log file also parameters: {“commit”=\>“Send Email”, “authenticity\_token”=\>“184d6f1d909…

---

## [Will\_paginate question](https://www.ruby-forum.com/t/will-paginate-question/153781)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [November 21, 2008, 1:34am UTC](https://www.ruby-forum.com/t/will-paginate-question/153781 "2008-11-21T01:34:44Z")

</div>

I’m using will\_paginate and in my views I have two images, a left arrow and a right arrow, that act as my pagination links. Is there a method built in to generate the URL’s for those images?

---

## [Pass json data into javascript](https://www.ruby-forum.com/t/pass-json-data-into-javascript/153780)

<div class="topic-metadata">

**Author:** [@wintersleep](https://www.ruby-forum.com/u/wintersleep)\
**Replies:** 0\
**Last updated:** [November 21, 2008, 12:47am UTC](https://www.ruby-forum.com/t/pass-json-data-into-javascript/153780 "2008-11-21T00:47:39Z")

</div>

Hello from a Ruby on Rails beginner! I’ve been trying to pass some data to a variable in Javascript by using json. Seems like the Javascript variable doesn’t receive the data correctly. This is the code in controller…

---

## [Update collection passed to form\_tag](https://www.ruby-forum.com/t/update-collection-passed-to-form-tag/153638)

<div class="topic-metadata">

**Author:** [@Supraja](https://www.ruby-forum.com/u/Supraja)\
**Replies:** 3\
**Last updated:** [November 21, 2008, 12:32am UTC](https://www.ruby-forum.com/t/update-collection-passed-to-form-tag/153638 "2008-11-21T00:32:08Z")

</div>

Hi everyone, I’m trying to update attributes in a collection passed to form\_tag. However my syntax for extracting values from the params hash results in this exception: undefined method \`keys’ for \[“Vanilla”, “Rose”,…

---

## [Full-text search engine for associations w/ values](https://www.ruby-forum.com/t/full-text-search-engine-for-associations-w-values/153775)

<div class="topic-metadata">

**Author:** [@Jeffrey\_LSTaylor](https://www.ruby-forum.com/u/Jeffrey_LSTaylor)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/full-text-search-engine-for-associations-w-values/153775 "2008-11-20T23:33:01Z")

</div>

I am looking for a full-text search engine compatible with Rails that can handle associations with a value in the join table with equality and inequalities. For example, database of items with searchable titles and …

---

## [Update\_attributes unsets my object](https://www.ruby-forum.com/t/update-attributes-unsets-my-object/153741)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 2\
**Last updated:** [November 20, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/update-attributes-unsets-my-object/153741 "2008-11-20T21:24:43Z")

</div>

I just run in a very strange behavior. In one of my actions, I trigger: @object.update\_attributes(:attr1 =\> …) Now in the corresponding view, @object is nil. Is that a normal behavior from Rails? Why would it unset t…

---

## [Out of memory, malloc failed](https://www.ruby-forum.com/t/out-of-memory-malloc-failed/153745)

<div class="topic-metadata">

**Author:** [@justus](https://www.ruby-forum.com/u/justus)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 6:57pm UTC](https://www.ruby-forum.com/t/out-of-memory-malloc-failed/153745 "2008-11-20T18:57:50Z")

</div>

Hello, After having done hundreds of successfull deployments of updates to my aplication, suddenly I have run into the following error message: ‘fatal: Out of memory, malloc failed fatal: unpack-objects failed’ This…

---

## [How to override enumerable compare for attributes?](https://www.ruby-forum.com/t/how-to-override-enumerable-compare-for-attributes/153744)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 6:56pm UTC](https://www.ruby-forum.com/t/how-to-override-enumerable-compare-for-attributes/153744 "2008-11-20T18:56:31Z")

</div>

How would I override \<=\> for certain attributes of a class? Say I have the following: class Workout \< ActiveRecord::Base columns in db: time, weight, reps, distance end I want to be able to sort by results, to list …

---

## [Odd nuance on getting erb or js files](https://www.ruby-forum.com/t/odd-nuance-on-getting-erb-or-js-files/153742)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 6:34pm UTC](https://www.ruby-forum.com/t/odd-nuance-on-getting-erb-or-js-files/153742 "2008-11-20T18:34:47Z")

</div>

I’ve got a partial rendered in a something.js.rjs file. This works just fine when I call the method on the controller using xhr(etc etc) in my functional tests. So from the point of view of the tests an Ajax request i…

---

## [Random method](https://www.ruby-forum.com/t/random-method/153633)

<div class="topic-metadata">

**Author:** [@amarime](https://www.ruby-forum.com/u/amarime)\
**Replies:** 4\
**Last updated:** [November 20, 2008, 6:11pm UTC](https://www.ruby-forum.com/t/random-method/153633 "2008-11-20T18:11:12Z")

</div>

hi group I’m new in RubyonRails world i need to define a method that will generate random CPU utilization (0-100%)

---

## [Gettext error - MAC OS X](https://www.ruby-forum.com/t/gettext-error-mac-os-x/153735)

<div class="topic-metadata">

**Author:** [@Victor\_Bueno](https://www.ruby-forum.com/u/Victor_Bueno)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 5:48pm UTC](https://www.ruby-forum.com/t/gettext-error-mac-os-x/153735 "2008-11-20T17:48:09Z")

</div>

Gettext version: 1.93.0 When running the famous “update\_po” rake task, an error occurs telling me that gettext can’t find msgmerge. Did anybody have this same problem?

---

## [Rails.cache and problem with model id?](https://www.ruby-forum.com/t/rails-cache-and-problem-with-model-id/153664)

<div class="topic-metadata">

**Author:** [@johnk](https://www.ruby-forum.com/u/johnk)\
**Replies:** 3\
**Last updated:** [November 20, 2008, 4:38pm UTC](https://www.ruby-forum.com/t/rails-cache-and-problem-with-model-id/153664 "2008-11-20T16:38:43Z")

</div>

I have the following: MODEL: def self.get\_tag\_cloud Rails.cache.fetch(‘fetish\_tag\_cloud’, :expires\_in =\> 1.hour) do find(:all, :conditions =\> \[ “approved\_for\_tag\_cloud = true”\], :order =\> “LTRIM(name)”) end end C…

---

## [Redirect app to 2 URLs](https://www.ruby-forum.com/t/redirect-app-to-2-urls/153726)

<div class="topic-metadata">

**Author:** [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/redirect-app-to-2-urls/153726 "2008-11-20T16:25:32Z")

</div>

Hi, I was wondering how to redirect my app to two different URLs, i am using apache over mongrel and running under production env. i have 2 domains located say www.domain1.com and www.domain2.com. when i hit www.doma…

---

## [Running tests for acts\_as\_tree plugin](https://www.ruby-forum.com/t/running-tests-for-acts-as-tree-plugin/153727)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/running-tests-for-acts-as-tree-plugin/153727 "2008-11-20T16:23:47Z")

</div>

If I checkout the acts\_as\_tree plugin from git://github.com/rails/acts\_as\_tree.git and try to run its unit tests, I get a failure: $ rake (in /u/home/brian/git/acts\_as\_tree) /usr/local/bin/ruby -Ilib:lib “/usr/loca…

---

## [Rails 2.1.2, complex find involving complex include, bug?](https://www.ruby-forum.com/t/rails-2-1-2-complex-find-involving-complex-include-bug/152618)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 3\
**Last updated:** [November 20, 2008, 4:09pm UTC](https://www.ruby-forum.com/t/rails-2-1-2-complex-find-involving-complex-include-bug/152618 "2008-11-20T16:09:51Z")

</div>

So I’m upgrading my app from Rails 1.2.6 to Rails 2.1.2. I have a complex find statement that worked in 1.2.6 and isn’t working in 2.1.2. I think maybe this is a bug, although maybe there’s something else I could be d…

---

## [Beyond the simple select](https://www.ruby-forum.com/t/beyond-the-simple-select/153699)

<div class="topic-metadata">

**Author:** [@tlianza](https://www.ruby-forum.com/u/tlianza)\
**Replies:** 4\
**Last updated:** [November 20, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/beyond-the-simple-select/153699 "2008-11-20T16:05:09Z")

</div>

I have 3 tables: pupils: id, name, born\_date, sex courses: id, course\_name, description pupilXcourse: pupil\_id, course\_id Today I run a Pupil.find(:all) and send a json response to the browser, who …

---

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

<div class="topic-metadata">

**Author:** [@chirantan](https://www.ruby-forum.com/u/chirantan)\
**Replies:** 3\
**Last updated:** [November 20, 2008, 3:59pm UTC](https://www.ruby-forum.com/t/file-upload-fails-for-large-files/153691 "2008-11-20T15:59:52Z")

</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 …

---

## [Only one error message for a field](https://www.ruby-forum.com/t/only-one-error-message-for-a-field/153721)

<div class="topic-metadata">

**Author:** [@thaniyarasu](https://www.ruby-forum.com/u/thaniyarasu)\
**Replies:** 1\
**Last updated:** [November 20, 2008, 3:53pm UTC](https://www.ruby-forum.com/t/only-one-error-message-for-a-field/153721 "2008-11-20T15:53:23Z")

</div>

in my User model i am using validations like this class User \< ActiveRecord::Base validates\_presence\_of :email validates\_format\_of :email ,:with=\>/something/ end if my email field is blank then i am getting 2 erro…

---

## [Overwriting / Decorating ActiveRecord association accessor](https://www.ruby-forum.com/t/overwriting-decorating-activerecord-association-accessor/153647)

<div class="topic-metadata">

**Author:** [@Marcel\_H](https://www.ruby-forum.com/u/Marcel_H)\
**Replies:** 3\
**Last updated:** [November 20, 2008, 1:38pm UTC](https://www.ruby-forum.com/t/overwriting-decorating-activerecord-association-accessor/153647 "2008-11-20T13:38:39Z")

</div>

Hi, I am trying to overwrite the accessor of a has\_many association. Basically my class looks like this: class Person has\_many :emails has\_one :link, :class\_name =\> ‘PersonProxy’ def emails\_with\_link link.emails +…

---

## [Using javascript to accomplish the ajax for will\_paginate](https://www.ruby-forum.com/t/using-javascript-to-accomplish-the-ajax-for-will-paginate/153720)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 1:26pm UTC](https://www.ruby-forum.com/t/using-javascript-to-accomplish-the-ajax-for-will-paginate/153720 "2008-11-20T13:26:50Z")

</div>

To use the ajax replacing some html element’s content for my pagination,I user some js codes like following ,but pagination still work like a normal call,not ajax. How do i manage?

---

## [To use multiple databases, sets of tables or rails applications](https://www.ruby-forum.com/t/to-use-multiple-databases-sets-of-tables-or-rails-applications/153632)

<div class="topic-metadata">

**Author:** [@anthony](https://www.ruby-forum.com/u/anthony)\
**Replies:** 3\
**Last updated:** [November 20, 2008, 1:21pm UTC](https://www.ruby-forum.com/t/to-use-multiple-databases-sets-of-tables-or-rails-applications/153632 "2008-11-20T13:21:33Z")

</div>

This is not a request about how to accomplish connections to multiple databases, etc… But, I am looking for advise on the best way to start a new project. I will have multiple clients, each will want their data protec…

---

## [Nginx timeout](https://www.ruby-forum.com/t/nginx-timeout/93180)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 2\
**Last updated:** [November 20, 2008, 12:53pm UTC](https://www.ruby-forum.com/t/nginx-timeout/93180 "2008-11-20T12:53:05Z")

</div>

I just deployed a rails app using nginx/mongrel. The app takes a file and then parses it, and does a bunch of stuff. It worked fine with straight mongrel and with straight lighttpd, but on nginx/mongrel I get a 504 …

---

## [How to enable memcached along with nginx server](https://www.ruby-forum.com/t/how-to-enable-memcached-along-with-nginx-server/153714)

<div class="topic-metadata">

**Author:** [@ankitparekh](https://www.ruby-forum.com/u/ankitparekh)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 12:33pm UTC](https://www.ruby-forum.com/t/how-to-enable-memcached-along-with-nginx-server/153714 "2008-11-20T12:33:06Z")

</div>

hi, I have configured nginx server and enabled header expiry + gzip component now i want to enable memcached along with it but as soon as I enable memcached header expiry stops working can any one tell me the reason…

---

## [What do most use for Date selection in views & Date validation in models?](https://www.ruby-forum.com/t/what-do-most-use-for-date-selection-in-views-date-validation-in-models/153713)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 12:26pm UTC](https://www.ruby-forum.com/t/what-do-most-use-for-date-selection-in-views-date-validation-in-models/153713 "2008-11-20T12:26:18Z")

</div>

what do most use for Date selection in views & the complimentary Date validation in models? I’m just finding that the answer to this doesn’t seem obvious no?..

---

## [Sending a fire&forget http request in a model class](https://www.ruby-forum.com/t/sending-a-fire-forget-http-request-in-a-model-class/153626)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 5\
**Last updated:** [November 20, 2008, 11:57am UTC](https://www.ruby-forum.com/t/sending-a-fire-forget-http-request-in-a-model-class/153626 "2008-11-20T11:57:36Z")

</div>

I know this is bad mvc, but i have a model class that needs to send a request off to a web service. At the moment i’m building a request string with url and params, and then doing a ‘system’ call to call curl with th…

---

## [Couldn't find without an ID](https://www.ruby-forum.com/t/couldnt-find-without-an-id/153706)

<div class="topic-metadata">

**Author:** [@smartee](https://www.ruby-forum.com/u/smartee)\
**Replies:** 5\
**Last updated:** [November 20, 2008, 11:22am UTC](https://www.ruby-forum.com/t/couldnt-find-without-an-id/153706 "2008-11-20T11:22:20Z")

</div>

hi friends… my rhtml is for\_for\_test.rhtml Form\_For Tester \<% form\_for :blog, :url =\> { :action =\> 'save', :id =\> @blog } do |f| %\> Name: \<%= f.text\_field :blog %\> \<%= submit\_tag 'Save' %\> …

---

## [Code changes are ignored due to code minor ver. were cached](https://www.ruby-forum.com/t/code-changes-are-ignored-due-to-code-minor-ver-were-cached/153543)

<div class="topic-metadata">

**Author:** [@zloy](https://www.ruby-forum.com/u/zloy)\
**Replies:** 3\
**Last updated:** [November 20, 2008, 11:14am UTC](https://www.ruby-forum.com/t/code-changes-are-ignored-due-to-code-minor-ver-were-cached/153543 "2008-11-20T11:14:44Z")

</div>

Hi there! I study Ruby on Rails and met a problem. I placed a class definition code for class which is NOT a Model into separate file, assume MyToolClass.rb Then I started working on controller code and required ‘MyT…

---

## [Question about observe\_form](https://www.ruby-forum.com/t/question-about-observe-form/153702)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 4\
**Last updated:** [November 20, 2008, 11:05am UTC](https://www.ruby-forum.com/t/question-about-observe-form/153702 "2008-11-20T11:05:40Z")

</div>

Dear all I am writing a program that use observe\_field to listen 1 field. The code is as follow: Filter on Application Code : \<%= text\_field\_tag('appcode', params\['appcode'\], :size =\> 10 ) %\> \<%= observe\_f…

---

## [Locale, routes, tests and default locale](https://www.ruby-forum.com/t/locale-routes-tests-and-default-locale/153701)

<div class="topic-metadata">

**Author:** [@bobm](https://www.ruby-forum.com/u/bobm)\
**Replies:** 0\
**Last updated:** [November 20, 2008, 9:29am UTC](https://www.ruby-forum.com/t/locale-routes-tests-and-default-locale/153701 "2008-11-20T09:29:39Z")

</div>

Hi, I’m stuck in a maze : routes.rb defines resources like this one map.namespace(:admin) do |admin| admin.resources :sections, :path\_prefix =\> ‘/:locale/admin’ end Then, in functionnal test I have to (for example) …

---

## [Is it real in RoR?](https://www.ruby-forum.com/t/is-it-real-in-ror/153548)

<div class="topic-metadata">

**Author:** [@alexey](https://www.ruby-forum.com/u/alexey)\
**Replies:** 2\
**Last updated:** [November 20, 2008, 8:59am UTC](https://www.ruby-forum.com/t/is-it-real-in-ror/153548 "2008-11-20T08:59:52Z")

</div>

I’ve a table dic: id, type\_id, info I’d like to store any information inside, it can be, for instance, categories with type\_id = 1 and classifications with type\_id = 2 I’d like to make 2 different models such as clas…

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

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