# Rails

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

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

---

## [NoMethodError](https://www.ruby-forum.com/t/nomethoderror/130748)

<div class="topic-metadata">

**Author:** [@dave](https://www.ruby-forum.com/u/dave)\
**Replies:** 6\
**Last updated:** [March 3, 2008, 10:59am UTC](https://www.ruby-forum.com/t/nomethoderror/130748 "2008-03-03T10:59:00Z")

</div>

Hi I’m having a NoMethodError NoMethodError in Admin/updateController#index undefined method \`find’ for #\<Tag id: nil, name: “”, rank: nil, parent\_id: 0\> in the model I have def find\_subcategory(subcategory) subca…

---

## [Custom gem directory: monit doesn't start backgroundrb](https://www.ruby-forum.com/t/custom-gem-directory-monit-doesnt-start-backgroundrb/130780)

<div class="topic-metadata">

**Author:** [@hawe](https://www.ruby-forum.com/u/hawe)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 10:17am UTC](https://www.ruby-forum.com/t/custom-gem-directory-monit-doesnt-start-backgroundrb/130780 "2008-03-03T10:17:28Z")

</div>

Hi! Backgroundrb works fine until I tried to monitor it with monit! Here is a part from the .monitrc file: check process backgroundrb with pidfile /home/user/domain/log/backgroundrb.pid start program = “/home/user/.…

---

## [Crystal Reports](https://www.ruby-forum.com/t/crystal-reports/130779)

<div class="topic-metadata">

**Author:** [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 10:06am UTC](https://www.ruby-forum.com/t/crystal-reports/130779 "2008-03-03T10:06:50Z")

</div>

We need to generate the crystal reports dynamically from ROR application. I believe we need to pass the xml to the crystal report file. Any one knows how to call the crystal report template file dynamically from rai…

---

## [To\_i](https://www.ruby-forum.com/t/to-i/130770)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 5\
**Last updated:** [March 3, 2008, 9:46am UTC](https://www.ruby-forum.com/t/to-i/130770 "2008-03-03T09:46:57Z")

</div>

Hi I have string say str1 when i use res=str1.to\_i puts res.class The result i get is Fixnum. Actually does to\_i convert str1 to Integer or Fixnum?So why i did not get result as Integer? Sijo

---

## [Moving pagination to the Model](https://www.ruby-forum.com/t/moving-pagination-to-the-model/130599)

<div class="topic-metadata">

**Author:** [@neil](https://www.ruby-forum.com/u/neil)\
**Replies:** 7\
**Last updated:** [March 3, 2008, 9:16am UTC](https://www.ruby-forum.com/t/moving-pagination-to-the-model/130599 "2008-03-03T09:16:47Z")

</div>

I’m using will\_paginate in a Post class method; def self.list(page) paginate :per\_page =\> 10, :page =\> page, :include =\> :user end I can happily use the method on my posts controller index actio…

---

## [Newbie needs help setting up PostgreQL and RoR on Leopard; will pay](https://www.ruby-forum.com/t/newbie-needs-help-setting-up-postgreql-and-ror-on-leopard-will-pay/130774)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 9:05am UTC](https://www.ruby-forum.com/t/newbie-needs-help-setting-up-postgreql-and-ror-on-leopard-will-pay/130774 "2008-03-03T09:05:16Z")

</div>

Hi– I’m a newbie trying to configure PostgreQL and RoR on OS X (Leopard) and have had trouble getting things to work. I have had trouble getting TextMate to see some commands from the Terminal, and the default path i…

---

## [Newbea Selection question](https://www.ruby-forum.com/t/newbea-selection-question/130764)

<div class="topic-metadata">

**Author:** [@casid](https://www.ruby-forum.com/u/casid)\
**Replies:** 2\
**Last updated:** [March 3, 2008, 8:20am UTC](https://www.ruby-forum.com/t/newbea-selection-question/130764 "2008-03-03T08:20:41Z")

</div>

Hello RoR Developers, I got question about selection again. I got template.yml file id1051256120: template\_of\_roste1: Name1 template\_of\_roster2: Name2 I get my selections options from this yml file like, controller …

---

## [Post method to custom action](https://www.ruby-forum.com/t/post-method-to-custom-action/130727)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 3\
**Last updated:** [March 3, 2008, 7:57am UTC](https://www.ruby-forum.com/t/post-method-to-custom-action/130727 "2008-03-03T07:57:52Z")

</div>

I posted this question last night but it doesn’t seem to have made it to the group. I’m wondering why I can’t get a post method to work for a custom action I’ve tried map.resources :foo, :collection =\> { :sort =\> :po…

---

## [Overriding ActionController method in an app](https://www.ruby-forum.com/t/overriding-actioncontroller-method-in-an-app/130768)

<div class="topic-metadata">

**Author:** [@garrettmurray](https://www.ruby-forum.com/u/garrettmurray)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 6:45am UTC](https://www.ruby-forum.com/t/overriding-actioncontroller-method-in-an-app/130768 "2008-03-03T06:45:38Z")

</div>

i can’t seem to get this working… basically, i want to use a patch that was added to rails: http://dev.rubyonrails.org/changeset/8785 but i don’t want to have to upgrade past 2.0.2, and i don’t want to have to freeze…

---

## [Including another form in a form\_remote\_tag?](https://www.ruby-forum.com/t/including-another-form-in-a-form-remote-tag/129407)

<div class="topic-metadata">

**Author:** [@rodk](https://www.ruby-forum.com/u/rodk)\
**Replies:** 6\
**Last updated:** [March 3, 2008, 5:31am UTC](https://www.ruby-forum.com/t/including-another-form-in-a-form-remote-tag/129407 "2008-03-03T05:31:46Z")

</div>

I have a form which is just populated by a select\_date, and I have another form in a form\_remote\_tag, and when submitting this latter form, I need to also include the select\_date inputs in the former form. I see that…

---

## [Performing a mail merge using rails and ? any ideas?](https://www.ruby-forum.com/t/performing-a-mail-merge-using-rails-and-any-ideas/130731)

<div class="topic-metadata">

**Author:** [@crenner](https://www.ruby-forum.com/u/crenner)\
**Replies:** 3\
**Last updated:** [March 3, 2008, 4:38am UTC](https://www.ruby-forum.com/t/performing-a-mail-merge-using-rails-and-any-ideas/130731 "2008-03-03T04:38:58Z")

</div>

When the user clicks a link, i want to merge the current customers details into a word document (\*.doc) and return it to the user as a download. Does anybody have any ideas on what the best way to do it is? I’m racki…

---

## [On Update, how can I validate that an attribute has not being already set?](https://www.ruby-forum.com/t/on-update-how-can-i-validate-that-an-attribute-has-not-being-already-set/130746)

<div class="topic-metadata">

**Author:** [@shane](https://www.ruby-forum.com/u/shane)\
**Replies:** 2\
**Last updated:** [March 3, 2008, 4:38am UTC](https://www.ruby-forum.com/t/on-update-how-can-i-validate-that-an-attribute-has-not-being-already-set/130746 "2008-03-03T04:38:58Z")

</div>

Hi I have a boolean attribute on a model … user\_approved … that I wish to apply some validation to upon update … The business rule is “You cannot update this model to user\_approved if it already has been” … but I am …

---

## [DB query time always 0 in production](https://www.ruby-forum.com/t/db-query-time-always-0-in-production/130683)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [March 3, 2008, 1:08am UTC](https://www.ruby-forum.com/t/db-query-time-always-0-in-production/130683 "2008-03-03T01:08:53Z")

</div>

Hello, My DB time always shows 0.00000 in production, using thin, mongrel, rails 1.2.6, 2.0.2, it doesn’t matter. In development, the DB time is correctly non-zero. I don’t do any caching. Is this a known problem? …

---

## [Rails 2.0.2 upgrade, activerecord problems](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938)

<div class="topic-metadata">

**Author:** [@azgar](https://www.ruby-forum.com/u/azgar)\
**Replies:** 14\
**Last updated:** [March 3, 2008, 12:30am UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938 "2008-03-03T00:30:16Z")

</div>

I’ve updated to rails 2.0.2 and received the following error when I try to start webrick: C:/ruby/lib/ruby/site\_ruby/1.8/rubygems.rb:319:in \`activate’: can’t activate activerecord (= 1.15.6), already activated activer…

---

## [Encode a string into UTF-8, ready for XML](https://www.ruby-forum.com/t/encode-a-string-into-utf-8-ready-for-xml/130744)

<div class="topic-metadata">

**Author:** [@crenner](https://www.ruby-forum.com/u/crenner)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/encode-a-string-into-utf-8-ready-for-xml/130744 "2008-03-02T23:33:01Z")

</div>

Hi i need to encode a string,ready for insertion into an xml document. I think it needs to be in UTF-8 Is there a simple ruby method for doing this? Thanks Chris

---

## [Recommended # of mongrels for a default EC2 node](https://www.ruby-forum.com/t/recommended-of-mongrels-for-a-default-ec2-node/130729)

<div class="topic-metadata">

**Author:** [@revo](https://www.ruby-forum.com/u/revo)\
**Replies:** 1\
**Last updated:** [March 2, 2008, 9:57pm UTC](https://www.ruby-forum.com/t/recommended-of-mongrels-for-a-default-ec2-node/130729 "2008-03-02T21:57:36Z")

</div>

Hi - I was wondering if anyone had any experience with mongrels on EC2. If so, how many mongrels are recommended for the default ($0.10/hour) EC2 node? Thanks!

---

## [Super squirrel](https://www.ruby-forum.com/t/super-squirrel/130734)

<div class="topic-metadata">

**Author:** [@deia](https://www.ruby-forum.com/u/deia)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 9:25pm UTC](https://www.ruby-forum.com/t/super-squirrel/130734 "2008-03-02T21:25:05Z")

</div>

Super squirrel Here is a nice ad with “the squirrel” http://www.mediaportal.ro/play.php?pid=13539&Super%20Squirrel%20Scream

---

## [How to write a test for Ultrasphinx](https://www.ruby-forum.com/t/how-to-write-a-test-for-ultrasphinx/130733)

<div class="topic-metadata">

**Author:** [@dkanders](https://www.ruby-forum.com/u/dkanders)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 9:07pm UTC](https://www.ruby-forum.com/t/how-to-write-a-test-for-ultrasphinx/130733 "2008-03-02T21:07:57Z")

</div>

Hi All, I have the ultrasphinx plugin installed and it is working fine, but I’d like to write some tests for it. I have tried putting this test in one of my unit tests: def test\_should\_run\_ultrasphinx\_query @results …

---

## [Basic misunderstanding of syntax i think](https://www.ruby-forum.com/t/basic-misunderstanding-of-syntax-i-think/130723)

<div class="topic-metadata">

**Author:** [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Replies:** 10\
**Last updated:** [March 2, 2008, 7:03pm UTC](https://www.ruby-forum.com/t/basic-misunderstanding-of-syntax-i-think/130723 "2008-03-02T19:03:32Z")

</div>

First of thank you for your patience. This is my first ruby project and i am slightly confused. The index page works fine. Index Welcome \<%= h(session\[:user\_name\]) %\> \<%= error\_messages\_for 'user' %\> \<%…

---

## [No route matches with {:method=\>:get} Error in AWDWR Book](https://www.ruby-forum.com/t/no-route-matches-with-method-get-error-in-awdwr-book/130696)

<div class="topic-metadata">

**Author:** [@gr0k](https://www.ruby-forum.com/u/gr0k)\
**Replies:** 2\
**Last updated:** [March 2, 2008, 6:54pm UTC](https://www.ruby-forum.com/t/no-route-matches-with-method-get-error-in-awdwr-book/130696 "2008-03-02T18:54:15Z")

</div>

Hi I’m working on the AWDWR book and I’m on the admin section of the book. I have rails 2 installed on my machine and I have ran into an error when I created my controller login but when I go to http://localhost:3000/…

---

## [Fields in the wrong order when saving to sqllite3](https://www.ruby-forum.com/t/fields-in-the-wrong-order-when-saving-to-sqllite3/130690)

<div class="topic-metadata">

**Author:** [@Fredrik\_K](https://www.ruby-forum.com/u/Fredrik_K)\
**Replies:** 2\
**Last updated:** [March 2, 2008, 3:31pm UTC](https://www.ruby-forum.com/t/fields-in-the-wrong-order-when-saving-to-sqllite3/130690 "2008-03-02T15:31:25Z")

</div>

Hi, New to rails, and trying to make my first project work. When I try to save a new record to the sqllite database, I see that the SQL tries to insert the fields in the wrong order: ActiveRecord::StatementInvalid in…

---

## [Modifying Radiant?](https://www.ruby-forum.com/t/modifying-radiant/130385)

<div class="topic-metadata">

**Author:** [@agilehack](https://www.ruby-forum.com/u/agilehack)\
**Replies:** 2\
**Last updated:** [March 2, 2008, 3:17pm UTC](https://www.ruby-forum.com/t/modifying-radiant/130385 "2008-03-02T15:17:23Z")

</div>

I have a local copy of Radiant CMS and would like to try extending/ changing it in two ways - need a little help, or at least pointed in the right direction in the code. I would like to modify things such that the e…

---

## [How to cache data in a plugin](https://www.ruby-forum.com/t/how-to-cache-data-in-a-plugin/130662)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 2\
**Last updated:** [March 2, 2008, 2:21pm UTC](https://www.ruby-forum.com/t/how-to-cache-data-in-a-plugin/130662 "2008-03-02T14:21:17Z")

</div>

Hi, I’m using CountryCodes to get countries list for select box. It provides self.countries\_for\_select(\*args) method exactly for this purpose. I’m using it in only one place in my view. So I was thinking about cachin…

---

## [Before\_filter strange behaviour on update and create](https://www.ruby-forum.com/t/before-filter-strange-behaviour-on-update-and-create/130691)

<div class="topic-metadata">

**Author:** [@msojka](https://www.ruby-forum.com/u/msojka)\
**Replies:** 15\
**Last updated:** [March 2, 2008, 1:25pm UTC](https://www.ruby-forum.com/t/before-filter-strange-behaviour-on-update-and-create/130691 "2008-03-02T13:25:49Z")

</div>

Hi, I wrote a authentication script and I’m calling it like this in every class: class Blah \< ApplicationController before\_filter :auth def auth req\_perm = Permission.find\_by\_name(“Permission Blah”) access = Acces…

---

## [Caching implementations - Status?](https://www.ruby-forum.com/t/caching-implementations-status/130716)

<div class="topic-metadata">

**Author:** [@jetienne](https://www.ruby-forum.com/u/jetienne)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 12:05pm UTC](https://www.ruby-forum.com/t/caching-implementations-status/130716 "2008-03-02T12:05:11Z")

</div>

Hi, I would like to know what are the current methods about caching ? The one bundles with Rails ? cache\_fu ? Interlock ? Caches.rb ? It seems there are many implementations, but which one(s) should we go with ? We u…

---

## [Ensure a REST redirection is not relative](https://www.ruby-forum.com/t/ensure-a-rest-redirection-is-not-relative/130709)

<div class="topic-metadata">

**Author:** [@tatyree](https://www.ruby-forum.com/u/tatyree)\
**Replies:** 1\
**Last updated:** [March 2, 2008, 11:59am UTC](https://www.ruby-forum.com/t/ensure-a-rest-redirection-is-not-relative/130709 "2008-03-02T11:59:51Z")

</div>

Hi, I’ve got a problem with a RESTful redirect causing Nokia series 40 phones to go in to spasms. When a user logs in to our service (using restful\_authentication), they are redirected to their homepage via a redire…

---

## [Best way to handle three way join](https://www.ruby-forum.com/t/best-way-to-handle-three-way-join/130717)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 11:37am UTC](https://www.ruby-forum.com/t/best-way-to-handle-three-way-join/130717 "2008-03-02T11:37:30Z")

</div>

Hi - I have 3 tables, A, B and C where A habtm C through B and vice versa (C habtm A). I also have a Users table which habtm B In other words, B can be filtered by the current user, and requires a userId to be valid…

---

## [Whiny\_finder in Rails 2.0](https://www.ruby-forum.com/t/whiny-finder-in-rails-2-0/130713)

<div class="topic-metadata">

**Author:** [@vincent](https://www.ruby-forum.com/u/vincent)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 11:08am UTC](https://www.ruby-forum.com/t/whiny-finder-in-rails-2-0/130713 "2008-03-02T11:08:31Z")

</div>

Hello - I have upgraded to Rails 2.0. I am still fixing from plugins related issues…the latest one I have is with whiny\_finder I have the following error: undefined method \`find\_by\_url!’ for #Class:0x2443aac It can’…

---

## [MissingSourceFile in Rails/infoController#properties](https://www.ruby-forum.com/t/missingsourcefile-in-rails-infocontroller-properties/129711)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 1\
**Last updated:** [March 2, 2008, 10:52am UTC](https://www.ruby-forum.com/t/missingsourcefile-in-rails-infocontroller-properties/129711 "2008-03-02T10:52:00Z")

</div>

I am having a very similar problem to a post I read and replied to. I am reading ‘Build your own Ruby on Rails web applications’ by Patrick Lenz and when accessing http://localhost:3000/ I can connect to the applicat…

---

## [Right way to do rjs off a method with its own view?](https://www.ruby-forum.com/t/right-way-to-do-rjs-off-a-method-with-its-own-view/130673)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 2\
**Last updated:** [March 2, 2008, 10:40am UTC](https://www.ruby-forum.com/t/right-way-to-do-rjs-off-a-method-with-its-own-view/130673 "2008-03-02T10:40:15Z")

</div>

Hi, just looking for “best practice” guidance… I have a controller method that renders its output with an rhtml view file. The output can also be updated via an rjs update via an rjs view file. I can’t work out if it…

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

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