# Rails

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

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

---

## [Action mailer noob](https://www.ruby-forum.com/t/action-mailer-noob/188986)

<div class="topic-metadata">

**Author:** [@radu\_puspana](https://www.ruby-forum.com/u/radu_puspana)\
**Replies:** 1\
**Last updated:** [May 21, 2010, 3:31pm UTC](https://www.ruby-forum.com/t/action-mailer-noob/188986 "2010-05-21T15:31:41Z")

</div>

Hi guys, a noob in rails here I did some searching on the net about how to send email to diffrent domain adresses like google, yahoo and stuff…and the guides that i found were a bit more confusing. for example at thi…

---

## [Easy custom validation messages on a per-attribute basis](https://www.ruby-forum.com/t/easy-custom-validation-messages-on-a-per-attribute-basis/188970)

<div class="topic-metadata">

**Author:** [@marcelo](https://www.ruby-forum.com/u/marcelo)\
**Replies:** 1\
**Last updated:** [May 21, 2010, 3:26pm UTC](https://www.ruby-forum.com/t/easy-custom-validation-messages-on-a-per-attribute-basis/188970 "2010-05-21T15:26:25Z")

</div>

When i do this: validates\_presence\_of :name, :email, :message =\> “Can’t be blank” and use the “error\_message\_on” method in my view, i get the same message for both “name” and “email” fields - Can’t be blank. How do i…

---

## [Survey on Open-Source Technologies: Questionnaire on RoR](https://www.ruby-forum.com/t/survey-on-open-source-technologies-questionnaire-on-ror/188993)

<div class="topic-metadata">

**Author:** [@andrea](https://www.ruby-forum.com/u/andrea)\
**Replies:** 0\
**Last updated:** [May 21, 2010, 3:23pm UTC](https://www.ruby-forum.com/t/survey-on-open-source-technologies-questionnaire-on-ror/188993 "2010-05-21T15:23:29Z")

</div>

\[Apologies for cross-posting\] Hi everybody, I am part of the Spatial Information Systems Group in University College Dublin. Our goal is to collect first-hand knowledge about a number of Open- Source projects active…

---

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

<div class="topic-metadata">

**Author:** [@drk](https://www.ruby-forum.com/u/drk)\
**Replies:** 3\
**Last updated:** [May 21, 2010, 3:10pm UTC](https://www.ruby-forum.com/t/undefined-method-each-for-4-fixnum/188954 "2010-05-21T15:10:37Z")

</div>

undefined method \`each’ for 4:Fixnum How can I solve this error. Thanks

---

## [Rendering a partial on a two column page](https://www.ruby-forum.com/t/rendering-a-partial-on-a-two-column-page/188941)

<div class="topic-metadata">

**Author:** [@hazmatt](https://www.ruby-forum.com/u/hazmatt)\
**Replies:** 5\
**Last updated:** [May 21, 2010, 2:41pm UTC](https://www.ruby-forum.com/t/rendering-a-partial-on-a-two-column-page/188941 "2010-05-21T14:41:06Z")

</div>

Hi, I attached a page for clarity of what I want. I have a two column page (index.html.erb). On the left hand side, I have the order ID and order NAME displayed. There is a SHOW link next to each entry. I want to be…

---

## [Downloading .pdf file](https://www.ruby-forum.com/t/downloading-pdf-file/188989)

<div class="topic-metadata">

**Author:** [@amalasingh](https://www.ruby-forum.com/u/amalasingh)\
**Replies:** 0\
**Last updated:** [May 21, 2010, 12:55pm UTC](https://www.ruby-forum.com/t/downloading-pdf-file/188989 "2010-05-21T12:55:59Z")

</div>

Hi, I know how to get a .html file and writing contents into a file in the server. eg. doc = Nokogiri::HTML(open(“http://projectmadurai.org”).read) my\_file = File.new(“pm.html”, “w”) my\_file.puts doc.inner\_html my…

---

## [Action mailer noob](https://www.ruby-forum.com/t/action-mailer-noob/197042)

<div class="topic-metadata">

**Author:** [@radu\_puspana](https://www.ruby-forum.com/u/radu_puspana)\
**Replies:** 0\
**Last updated:** [May 21, 2010, 12:45pm UTC](https://www.ruby-forum.com/t/action-mailer-noob/197042 "2010-05-21T12:45:27Z")

</div>

Hi guys, a noob in rails here I did some searching on the net about how to send email to diffrent domain adresses like google, yahoo and stuff…and the guides that i found were a bit more confusing. for example at thi…

---

## [Authlogic: Authenticate with login, password and type fields](https://www.ruby-forum.com/t/authlogic-authenticate-with-login-password-and-type-fields/188979)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 0\
**Last updated:** [May 21, 2010, 11:13am UTC](https://www.ruby-forum.com/t/authlogic-authenticate-with-login-password-and-type-fields/188979 "2010-05-21T11:13:19Z")

</div>

Hi guys, How can we check type field in addition of login and password fields, before saving a new UserSession with Authlogic? Thanks.

---

## [REXML, rake aborted! Text is not a module](https://www.ruby-forum.com/t/rexml-rake-aborted-text-is-not-a-module/188960)

<div class="topic-metadata">

**Author:** [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Replies:** 1\
**Last updated:** [May 21, 2010, 10:43am UTC](https://www.ruby-forum.com/t/rexml-rake-aborted-text-is-not-a-module/188960 "2010-05-21T10:43:19Z")

</div>

I am writing a rake task for my rails app to parse data from an XML and keep getting the error: rake aborted! Text is not a module here are the contents of my lib/tasks/xml\_parse.rake #------------------------------…

---

## [Mongrel having lot of sockets in close wait state](https://www.ruby-forum.com/t/mongrel-having-lot-of-sockets-in-close-wait-state/188972)

<div class="topic-metadata">

**Author:** [@g-sivakumar](https://www.ruby-forum.com/u/g-sivakumar)\
**Replies:** 0\
**Last updated:** [May 21, 2010, 9:48am UTC](https://www.ruby-forum.com/t/mongrel-having-lot-of-sockets-in-close-wait-state/188972 "2010-05-21T09:48:54Z")

</div>

Hi, I have a rails webapp and lately one of the mongrel process gets stuck in close\_wait state and my app stops responding and needs a restart. I have a apache in front of mongrel processes and the close wait state on …

---

## [Basic question on RoR, the Web, and Browsers](https://www.ruby-forum.com/t/basic-question-on-ror-the-web-and-browsers/188932)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 12\
**Last updated:** [May 21, 2010, 9:39am UTC](https://www.ruby-forum.com/t/basic-question-on-ror-the-web-and-browsers/188932 "2010-05-21T09:39:15Z")

</div>

Let’s say Firefox has opened two tabs each with Google’s home screen on it. Now the user enters some text into the form and clicks “Google Search”. If Google were implemented in Rails, some controller would see the r…

---

## [Paperclip Processor Not Working](https://www.ruby-forum.com/t/paperclip-processor-not-working/179010)

<div class="topic-metadata">

**Author:** [@sweb](https://www.ruby-forum.com/u/sweb)\
**Replies:** 1\
**Last updated:** [May 21, 2010, 9:33am UTC](https://www.ruby-forum.com/t/paperclip-processor-not-working/179010 "2010-05-21T09:33:26Z")

</div>

I cannot get the paperclip processor pasted below to work. I have many more that look almost identical. The ffmpeg command works on the command line. One thing unusual is that when it fails it reports that file nam…

---

## [Strange error in unit test =\> TypeError: wrong argument type Class (expected Module)](https://www.ruby-forum.com/t/strange-error-in-unit-test-typeerror-wrong-argument-type-class-expected-module/186982)

<div class="topic-metadata">

**Author:** [@vfr292](https://www.ruby-forum.com/u/vfr292)\
**Replies:** 4\
**Last updated:** [May 21, 2010, 9:18am UTC](https://www.ruby-forum.com/t/strange-error-in-unit-test-typeerror-wrong-argument-type-class-expected-module/186982 "2010-05-21T09:18:45Z")

</div>

I’m running a unit test in rails 2.3.5 Below is the error: Error: test1s(ActionView::TestCase): TypeError: wrong argument type Class (expected Module) Has anyone seen this before? Is there a solution/work around? …

---

## [Segmentation fault](https://www.ruby-forum.com/t/segmentation-fault/188971)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 21, 2010, 9:16am UTC](https://www.ruby-forum.com/t/segmentation-fault/188971 "2010-05-21T09:16:25Z")

</div>

Ruby 1.8.7 (2010-01-10 patch level 249) Rails 2.3.5 mySQl 5.1 I am trying to build a very simple application accessing a single table in mySQL. Have updated database.yml. The listing view is ok. But when I am tryin…

---

## [Nill object error](https://www.ruby-forum.com/t/nill-object-error/188903)

<div class="topic-metadata">

**Author:** [@drk](https://www.ruby-forum.com/u/drk)\
**Replies:** 8\
**Last updated:** [May 21, 2010, 8:57am UTC](https://www.ruby-forum.com/t/nill-object-error/188903 "2010-05-21T08:57:41Z")

</div>

def grouplist @currentgroupid=Group.find\_by\_group\_name(params\[:group\_name\]) @currentgroupfriends=GroupFriend.find\_all\_by\_user\_id\_and\_group\_id(current\_user.id,@currentgroupid) format.html {redirect\_to :back} end Plea…

---

## [Get data from has\_and\_belongs\_to\_many + has\_many](https://www.ruby-forum.com/t/get-data-from-has-and-belongs-to-many-has-many/188923)

<div class="topic-metadata">

**Author:** [@spitfire](https://www.ruby-forum.com/u/spitfire)\
**Replies:** 5\
**Last updated:** [May 21, 2010, 8:45am UTC](https://www.ruby-forum.com/t/get-data-from-has-and-belongs-to-many-has-many/188923 "2010-05-21T08:45:58Z")

</div>

I have 3 models, A, B and C and the classic 3 relations: A \<— has\_and\_belongs\_to\_many —\> B B has\_many C B -\> c1 -\> c2 -\> c3 … C belong\_to B C -\> a1 Question: How can I get C entries in relationship to a…

---

## [\[Help\] Rake test:functionals failed](https://www.ruby-forum.com/t/help-rake-test-functionals-failed/188728)

<div class="topic-metadata">

**Author:** [@neckie](https://www.ruby-forum.com/u/neckie)\
**Replies:** 2\
**Last updated:** [May 21, 2010, 7:59am UTC](https://www.ruby-forum.com/t/help-rake-test-functionals-failed/188728 "2010-05-21T07:59:45Z")

</div>

Hi all, Im a new user for using Rails, I got the 3 error msg as belows, /usr/bin/ruby1.8 -I"lib:test" “/home/mioinst/.gem/ruby/1.8/gems/ rake-0.8.7/lib/rake/rake\_test\_loader.rb” “test/functional/ way\_controller\_test…

---

## [Authlogic and Single table inheritance](https://www.ruby-forum.com/t/authlogic-and-single-table-inheritance/188968)

<div class="topic-metadata">

**Author:** [@judge](https://www.ruby-forum.com/u/judge)\
**Replies:** 0\
**Last updated:** [May 21, 2010, 7:45am UTC](https://www.ruby-forum.com/t/authlogic-and-single-table-inheritance/188968 "2010-05-21T07:45:53Z")

</div>

Hi, I have some models such as: class User \< ActiveRecord::Base acts\_as\_authentic end class Admin \< User end class Superadmin \< Admin end And some controllers such as: class UserSessionsController \< ApplicationCo…

---

## [Can authlogic be used for multiple models?](https://www.ruby-forum.com/t/can-authlogic-be-used-for-multiple-models/188964)

<div class="topic-metadata">

**Author:** [@swetha](https://www.ruby-forum.com/u/swetha)\
**Replies:** 0\
**Last updated:** [May 21, 2010, 7:45am UTC](https://www.ruby-forum.com/t/can-authlogic-be-used-for-multiple-models/188964 "2010-05-21T07:45:06Z")

</div>

I want to use authlogic plugin for multiple models in my project. In admin module of the project i am using administrator and administrator\_sessions and also on user module i am using user and user\_sessions models. S…

---

## [Agile Web Dev (book) question: errors](https://www.ruby-forum.com/t/agile-web-dev-book-question-errors/62843)

<div class="topic-metadata">

**Author:** [@Dark\_A](https://www.ruby-forum.com/u/Dark_A)\
**Replies:** 19\
**Last updated:** [May 21, 2010, 7:13am UTC](https://www.ruby-forum.com/t/agile-web-dev-book-question-errors/62843 "2010-05-21T07:13:00Z")

</div>

This is kind of frustrating (but no doubt helpful in the long run) that after following along and coding , and d/l the code the same error is appearing. For those who are familiar with the depot app, I’ve run into a p…

---

## [Plugin Architecture](https://www.ruby-forum.com/t/plugin-architecture/188869)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 1\
**Last updated:** [May 21, 2010, 5:00am UTC](https://www.ruby-forum.com/t/plugin-architecture/188869 "2010-05-21T05:00:37Z")

</div>

Does anyone have any suggestions about building a plugin architecture for a Rails application? This would be different from the Rails plugin architecture; this would be plugins for my Rails application in particular…

---

## [Parse HTML to text](https://www.ruby-forum.com/t/parse-html-to-text/188913)

<div class="topic-metadata">

**Author:** [@cpx](https://www.ruby-forum.com/u/cpx)\
**Replies:** 3\
**Last updated:** [May 21, 2010, 4:26am UTC](https://www.ruby-forum.com/t/parse-html-to-text/188913 "2010-05-21T04:26:05Z")

</div>

Hi Im trying to parse a HTML to raw text, is there any plugin or gem for this ? exactly im trying to parse an email response whether it’s HTML or Text or both of them. Thank you

---

## [ActionController::UrlWriter bug -- need help URGENTLY, thanks!](https://www.ruby-forum.com/t/actioncontroller-urlwriter-bug-need-help-urgently-thanks/173814)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [May 21, 2010, 2:30am UTC](https://www.ruby-forum.com/t/actioncontroller-urlwriter-bug-need-help-urgently-thanks/173814 "2010-05-21T02:30:51Z")

</div>

So i’ve been banging my head against this for the better part of the last 5 hours and I have concluded that in my sleep deprived state I’m missing something really obvious and should just ask for help. I need to be ab…

---

## [Postgres + Rail 3.0](https://www.ruby-forum.com/t/postgres-rail-3-0/188886)

<div class="topic-metadata">

**Author:** [@sivakumar](https://www.ruby-forum.com/u/sivakumar)\
**Replies:** 4\
**Last updated:** [May 21, 2010, 2:22am UTC](https://www.ruby-forum.com/t/postgres-rail-3-0/188886 "2010-05-21T02:22:34Z")

</div>

Hi guys, I am really new to these things like ROR and Postgres. When I was installing ROR 3.0 it says Successfully installed rails 3.0.0 beta 1 gem installed Installing ri document for rails 3.0.0 beta File not Fou…

---

## [Printed/PDF Reports (Text/Tabular/Summary) in Rails](https://www.ruby-forum.com/t/printed-pdf-reports-text-tabular-summary-in-rails/99293)

<div class="topic-metadata">

**Author:** [@jcanady](https://www.ruby-forum.com/u/jcanady)\
**Replies:** 4\
**Last updated:** [May 21, 2010, 12:54am UTC](https://www.ruby-forum.com/t/printed-pdf-reports-text-tabular-summary-in-rails/99293 "2010-05-21T00:54:54Z")

</div>

The recent discussion about different graphing solutions made me think. What is everyone using for general reports? Currently I have a web based application at work that has roughly 20 different reports ranging from s…

---

## [Rails, Thrift, and Phusion Passenger](https://www.ruby-forum.com/t/rails-thrift-and-phusion-passenger/188951)

<div class="topic-metadata">

**Author:** [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Replies:** 0\
**Last updated:** [May 21, 2010, 12:29am UTC](https://www.ruby-forum.com/t/rails-thrift-and-phusion-passenger/188951 "2010-05-21T00:29:30Z")

</div>

I’m about to start a project that uses Rails, Thrift, and Phusion Passenger. The Rails instances will be Thrift clients. If anyone has any pointers to tips or tricks for maximizing Thrift performance I’d be grateful. …

---

## [Check URL](https://www.ruby-forum.com/t/check-url/188947)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 2\
**Last updated:** [May 21, 2010, 12:17am UTC](https://www.ruby-forum.com/t/check-url/188947 "2010-05-21T00:17:16Z")

</div>

Is there a way to do an if/else case to check the URL? for example- \<% if URL = “http://www.google.com” %\> Hi, your URL’s GOOGLE \<% else %\> You URL isn’t GOOGLE \<% end %\> Of course that method is just a mockup, doe…

---

## [Activerecord association design advice](https://www.ruby-forum.com/t/activerecord-association-design-advice/188853)

<div class="topic-metadata">

**Author:** [@ali](https://www.ruby-forum.com/u/ali)\
**Replies:** 4\
**Last updated:** [May 20, 2010, 11:59pm UTC](https://www.ruby-forum.com/t/activerecord-association-design-advice/188853 "2010-05-20T23:59:41Z")

</div>

Hi guys. So I have a few models: Concept, Entity, Dimension, Rating, User and Fact Concepts can have many dimensions and many entities and many facts. Concepts may share dimensions, but not entities or facts (so the …

---

## [Using searchlogic to retrieve ids, then rebuild object?](https://www.ruby-forum.com/t/using-searchlogic-to-retrieve-ids-then-rebuild-object/188939)

<div class="topic-metadata">

**Author:** [@dkam](https://www.ruby-forum.com/u/dkam)\
**Replies:** 3\
**Last updated:** [May 20, 2010, 11:38pm UTC](https://www.ruby-forum.com/t/using-searchlogic-to-retrieve-ids-then-rebuild-object/188939 "2010-05-20T23:38:01Z")

</div>

im giving searchlogic a try to combine named scopes easily only issue i have is it doesnt return distinct results ive worked around this with a named scope of grouped which selects only the id and groups by the id on…

---

## [Attachment\_fu slows down update](https://www.ruby-forum.com/t/attachment-fu-slows-down-update/188946)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 0\
**Last updated:** [May 20, 2010, 11:26pm UTC](https://www.ruby-forum.com/t/attachment-fu-slows-down-update/188946 "2010-05-20T23:26:27Z")

</div>

Hi, I use attachment\_fu and it slows down update. \[Models\] product has many pictures. \[Update\] product.update\_attributes(“pictures\_attributes”=\>{ “6”=\>{"\_delete"=\>“0”, “color\_id”=\>“3”, “id”=\>“2953”}, “11”=\>{"\_dele…

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

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