# Rails

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

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

---

## [Action mailer on my local computer](https://www.ruby-forum.com/t/action-mailer-on-my-local-computer/168167)

<div class="topic-metadata">

**Author:** [@firelinemx](https://www.ruby-forum.com/u/firelinemx)\
**Replies:** 1\
**Last updated:** [May 17, 2009, 5:36pm UTC](https://www.ruby-forum.com/t/action-mailer-on-my-local-computer/168167 "2009-05-17T17:36:32Z")

</div>

hi guys i am newbie in ror. i wanna test my simple ror application on windows xp. i use Webrick as my web server. i don’t know how to configure my action mailer for sending email to another addresses? config.action\_…

---

## [Using standard validation methods in custom validation metho](https://www.ruby-forum.com/t/using-standard-validation-methods-in-custom-validation-metho/168050)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 8\
**Last updated:** [May 17, 2009, 5:07pm UTC](https://www.ruby-forum.com/t/using-standard-validation-methods-in-custom-validation-metho/168050 "2009-05-17T17:07:34Z")

</div>

Hi, Is it possible to use standard validation methods in custom validation methods? eg: def check\_children if children != “” validates\_numericality\_of :children end end When I run this code I get a no method err…

---

## [Mysql to postgres rake task](https://www.ruby-forum.com/t/mysql-to-postgres-rake-task/168138)

<div class="topic-metadata">

**Author:** [@magic\_hat](https://www.ruby-forum.com/u/magic_hat)\
**Replies:** 8\
**Last updated:** [May 17, 2009, 4:40pm UTC](https://www.ruby-forum.com/t/mysql-to-postgres-rake-task/168138 "2009-05-17T16:40:18Z")

</div>

Hey all. I’m trying to export my app’s data from mysql to postgres in advance of a database switch. I’ve tried this: task(:export =\> :environment) do @users=User.find(:all) ActiveRecord::Base.establish\_connection(:p…

---

## [Saving the selected item](https://www.ruby-forum.com/t/saving-the-selected-item/168128)

<div class="topic-metadata">

**Author:** [@ghazaleh](https://www.ruby-forum.com/u/ghazaleh)\
**Replies:** 1\
**Last updated:** [May 17, 2009, 4:33pm UTC](https://www.ruby-forum.com/t/saving-the-selected-item/168128 "2009-05-17T16:33:15Z")

</div>

hello i made a select list like this Married Single Divorced how can i save the selected item into a field “stat” of the table “user”?

---

## [Using Value Length in Validation Message](https://www.ruby-forum.com/t/using-value-length-in-validation-message/168163)

<div class="topic-metadata">

**Author:** [@phil7085](https://www.ruby-forum.com/u/phil7085)\
**Replies:** 5\
**Last updated:** [May 17, 2009, 3:10pm UTC](https://www.ruby-forum.com/t/using-value-length-in-validation-message/168163 "2009-05-17T15:10:06Z")

</div>

I am learning to use Validations and am using validates\_length\_of to check a field value is no longer than 240 characters. I want to be able to produce a message back to the user telling them that the value they enter…

---

## [Trouble linking models](https://www.ruby-forum.com/t/trouble-linking-models/167681)

<div class="topic-metadata">

**Author:** [@df-sean](https://www.ruby-forum.com/u/df-sean)\
**Replies:** 4\
**Last updated:** [May 17, 2009, 2:50pm UTC](https://www.ruby-forum.com/t/trouble-linking-models/167681 "2009-05-17T14:50:45Z")

</div>

Class User \< ActiveRecord::Base has\_many :articles class Article \< ActiveRecord::Base belongs\_to :user After a user posts an article, I want to include their username. I presume I should just be able to use \<%= art…

---

## [Has\_many :though and nested attributes](https://www.ruby-forum.com/t/has-many-though-and-nested-attributes/168076)

<div class="topic-metadata">

**Author:** [@Branko\_V](https://www.ruby-forum.com/u/Branko_V)\
**Replies:** 19\
**Last updated:** [May 16, 2009, 10:50pm UTC](https://www.ruby-forum.com/t/has-many-though-and-nested-attributes/168076 "2009-05-16T22:50:28Z")

</div>

Hi all, I have a rather weird problem. Three models in has\_many :through relationship: Nutrient \<-- IngredientsNutrient --\> Ingredient Nutrient has\_many :ingredient\_nutrients Nutrient has\_many Ingredients, :through =\>…

---

## [Form\_tag](https://www.ruby-forum.com/t/form-tag/168126)

<div class="topic-metadata">

**Author:** [@cloudedstrife](https://www.ruby-forum.com/u/cloudedstrife)\
**Replies:** 2\
**Last updated:** [May 16, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/form-tag/168126 "2009-05-16T21:44:47Z")

</div>

Hi all, I am very new to ruby…could someone help me with the method form\_ tag? I think I got my syntax wrong… Post new classified \<% form\_tag( :action =\> 'create ) do %\> \<p\>\<label for="classified\_title"\>Title\</la…

---

## [Has\_and\_belongs\_to\_many :self](https://www.ruby-forum.com/t/has-and-belongs-to-many-self/51971)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 6\
**Last updated:** [May 16, 2009, 8:02pm UTC](https://www.ruby-forum.com/t/has-and-belongs-to-many-self/51971 "2009-05-16T20:02:07Z")

</div>

Hi all I got the following class: class Member \< ActiveRecord::Base has\_and\_belongs\_to\_many :buddies, :class\_name =\> ‘Member’, :join\_table =\> ‘members\_have\_buddies’, :foreign\_key =\> ‘member\_id’, :association\_forei…

---

## [Why isn't script/plugin install not working from rubyforge?](https://www.ruby-forum.com/t/why-isnt-script-plugin-install-not-working-from-rubyforge/65736)

<div class="topic-metadata">

**Author:** [@mike343](https://www.ruby-forum.com/u/mike343)\
**Replies:** 2\
**Last updated:** [May 16, 2009, 7:06pm UTC](https://www.ruby-forum.com/t/why-isnt-script-plugin-install-not-working-from-rubyforge/65736 "2009-05-16T19:06:34Z")

</div>

All, I’m trying to download the ym4r plugin (or the cartographer plugin) from ruby-forge and it isn’t working. No error message displays - but no files are created either. The script/plugin command does work if I d…

---

## [Installing sqlite3-ruby on windows not working](https://www.ruby-forum.com/t/installing-sqlite3-ruby-on-windows-not-working/123764)

<div class="topic-metadata">

**Author:** [@thefatpenguin](https://www.ruby-forum.com/u/thefatpenguin)\
**Replies:** 5\
**Last updated:** [May 16, 2009, 6:47pm UTC](https://www.ruby-forum.com/t/installing-sqlite3-ruby-on-windows-not-working/123764 "2009-05-16T18:47:16Z")

</div>

Have just reinstalled ruby 1.8.6-26 on windows. Trying to install sqlite3-ruby it seems to be trying to compile the gem rather than offering to install the windows binaries from a list of options. Seems like ruby/g…

---

## [Map.connect with pattern match](https://www.ruby-forum.com/t/map-connect-with-pattern-match/167929)

<div class="topic-metadata">

**Author:** [@drsharp](https://www.ruby-forum.com/u/drsharp)\
**Replies:** 4\
**Last updated:** [May 16, 2009, 5:12pm UTC](https://www.ruby-forum.com/t/map-connect-with-pattern-match/167929 "2009-05-16T17:12:09Z")

</div>

I have a site that includes a Flash navigator banner. Rather than have the designer go in and change the links ($$), I would like to redirect his links to mine. His links are in the form “pagename.html”. I need each …

---

## [Custom JS breaking in IE6,7 - Tips on debugging?](https://www.ruby-forum.com/t/custom-js-breaking-in-ie6-7-tips-on-debugging/168066)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 2\
**Last updated:** [May 16, 2009, 5:08pm UTC](https://www.ruby-forum.com/t/custom-js-breaking-in-ie6-7-tips-on-debugging/168066 "2009-05-16T17:08:03Z")

</div>

Hi all, I just got around to testing my application in IE6 and 7 and I discovered that my custom Javascripts dont work and seem to break the HTML and CSS in the page too. Any tips or resources that I can read up to m…

---

## [Rake db:create fails](https://www.ruby-forum.com/t/rake-db-create-fails/168130)

<div class="topic-metadata">

**Author:** [@nanouk](https://www.ruby-forum.com/u/nanouk)\
**Replies:** 3\
**Last updated:** [May 16, 2009, 3:33pm UTC](https://www.ruby-forum.com/t/rake-db-create-fails/168130 "2009-05-16T15:33:29Z")

</div>

Hi I’m currently deploying a rails app when I issue “RAILS\_ENV=production rake db:create” I get the following error: “rake aborted! Unknown database ‘wiggle\_production’” when I issue “RAILS\_ENV=production rake db:c…

---

## [Having an integer matrix inside model](https://www.ruby-forum.com/t/having-an-integer-matrix-inside-model/168059)

<div class="topic-metadata">

**Author:** [@p-b](https://www.ruby-forum.com/u/p-b)\
**Replies:** 6\
**Last updated:** [May 16, 2009, 3:07pm UTC](https://www.ruby-forum.com/t/having-an-integer-matrix-inside-model/168059 "2009-05-16T15:07:27Z")

</div>

Hey, Is there any way I can have a model to store an N by N integer matrix? Something that would be able to keep record of rows and seats. n\[i\]\[j\] = 1 if the seat is empty n\[i\]\[j\] = 2 if the seat is reserved

---

## [\[ANN\] Vim Ruby Debugger](https://www.ruby-forum.com/t/ann-vim-ruby-debugger/168129)

<div class="topic-metadata">

**Author:** [@Yojik](https://www.ruby-forum.com/u/Yojik)\
**Replies:** 0\
**Last updated:** [May 16, 2009, 2:54pm UTC](https://www.ruby-forum.com/t/ann-vim-ruby-debugger/168129 "2009-05-16T14:54:22Z")

</div>

Hi! If you are using Vim and Ruby debugger, maybe you will be interested to look at my new Vim plugin: It implements interactive Ruby debugger in Vim.

---

## [Managing relationships in the form](https://www.ruby-forum.com/t/managing-relationships-in-the-form/168127)

<div class="topic-metadata">

**Author:** [@prabesh](https://www.ruby-forum.com/u/prabesh)\
**Replies:** 0\
**Last updated:** [May 16, 2009, 12:25pm UTC](https://www.ruby-forum.com/t/managing-relationships-in-the-form/168127 "2009-05-16T12:25:35Z")

</div>

project has\_and\_belongs\_to\_many :users user has\_and\_belongs\_to\_many :projectss Project Managers: \<%= collection\_select(‘project’, ‘user\_ids’,@resources, :id, :username,{}) %\> Users: \<%= collection\_select(‘project’, …

---

## [Action to Render Image for Download](https://www.ruby-forum.com/t/action-to-render-image-for-download/168114)

<div class="topic-metadata">

**Author:** [@mgiorno](https://www.ruby-forum.com/u/mgiorno)\
**Replies:** 1\
**Last updated:** [May 16, 2009, 8:50am UTC](https://www.ruby-forum.com/t/action-to-render-image-for-download/168114 "2009-05-16T08:50:43Z")

</div>

Hi, I’m trying to set up an action that will send an image to the browser as an attachment for download using paperclip. Sadly, I keep getting stuck. Insead, I keep sending an empty image to the browser. Anyone ha…

---

## [Mysql query is not working](https://www.ruby-forum.com/t/mysql-query-is-not-working/167950)

<div class="topic-metadata">

**Author:** [@venkat\_ruby](https://www.ruby-forum.com/u/venkat_ruby)\
**Replies:** 3\
**Last updated:** [May 16, 2009, 8:16am UTC](https://www.ruby-forum.com/t/mysql-query-is-not-working/167950 "2009-05-16T08:16:58Z")

</div>

Please, Can anyone help me to execute this query? SELECT \* FROM table WHERE customer\_id IN (SELECT IF(1 \<\> 2,‘SELECT customer\_id FROM customers’,‘SELECT customer\_id FROM company’)) Regards…

---

## [Save only working on New objects](https://www.ruby-forum.com/t/save-only-working-on-new-objects/168115)

<div class="topic-metadata">

**Author:** [@bobm](https://www.ruby-forum.com/u/bobm)\
**Replies:** 0\
**Last updated:** [May 16, 2009, 6:34am UTC](https://www.ruby-forum.com/t/save-only-working-on-new-objects/168115 "2009-05-16T06:34:59Z")

</div>

I’m using a habtm self referential (below). When I work with it in the console, if I do this: memberA.friends\[0\] = memberB memberA.save Nothing actually gets saved to the join table. (memberA and memberB are previou…

---

## [HABTM Self referential - only saves one way to join table](https://www.ruby-forum.com/t/habtm-self-referential-only-saves-one-way-to-join-table/168106)

<div class="topic-metadata">

**Author:** [@bobm](https://www.ruby-forum.com/u/bobm)\
**Replies:** 2\
**Last updated:** [May 16, 2009, 4:13am UTC](https://www.ruby-forum.com/t/habtm-self-referential-only-saves-one-way-to-join-table/168106 "2009-05-16T04:13:40Z")

</div>

I’m completely stumped by this. Basically, I’ve got an HABTM self referential model set up and for some reason the join table is only saving relationships one way. To illustrate this: member1 = Member.new member2 = M…

---

## [Caching question](https://www.ruby-forum.com/t/caching-question/168111)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 0\
**Last updated:** [May 16, 2009, 1:22am UTC](https://www.ruby-forum.com/t/caching-question/168111 "2009-05-16T01:22:01Z")

</div>

I have a strange set up where my Rails app is essentially a front end for a legacy system. When I request comes in, the Rails application asks the legacy system “is the data I have cached up to date?” If it is not, …

---

## [Help with Jasper reports(Jasper Server) integration](https://www.ruby-forum.com/t/help-with-jasper-reports-jasper-server-integration/168110)

<div class="topic-metadata">

**Author:** [@LaughingNinja](https://www.ruby-forum.com/u/LaughingNinja)\
**Replies:** 0\
**Last updated:** [May 16, 2009, 1:00am UTC](https://www.ruby-forum.com/t/help-with-jasper-reports-jasper-server-integration/168110 "2009-05-16T01:00:04Z")

</div>

Hi, I’ve installed the soap4r & jasperserver-client gems and setup a Jasper Server. I’ve also added a sample working report to the repository that I’m trying to run from Rails. I’m getting the following error when tr…

---

## [Rails 2.3.2.1 ActiveResource objects are frozen?](https://www.ruby-forum.com/t/rails-2-3-2-1-activeresource-objects-are-frozen/168103)

<div class="topic-metadata">

**Author:** [@matthewmurcia](https://www.ruby-forum.com/u/matthewmurcia)\
**Replies:** 3\
**Last updated:** [May 16, 2009, 12:38am UTC](https://www.ruby-forum.com/t/rails-2-3-2-1-activeresource-objects-are-frozen/168103 "2009-05-16T00:38:59Z")

</div>

Hey all, I’ve dug through the code and bit and cannot figure out how or why this is, but between Rails 2.1 and 2.3.2.1 production ActiveResource objects became frozen upon retrieval. so: class Resource \< ActiveReco…

---

## [Observe\_field - returning weird key/value pair](https://www.ruby-forum.com/t/observe-field-returning-weird-key-value-pair/168082)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 3\
**Last updated:** [May 16, 2009, 12:28am UTC](https://www.ruby-forum.com/t/observe-field-returning-weird-key-value-pair/168082 "2009-05-16T00:28:26Z")

</div>

i am currently having a very strange problem with observe\_field. i have a select box that looks like this: \<%= select “product\_section”, “section”, ProductSection.find(:all, :order =\> “title ASC”).collect { |p| \[p.tit…

---

## [Gem Trouble](https://www.ruby-forum.com/t/gem-trouble/167954)

<div class="topic-metadata">

**Author:** [@mikej](https://www.ruby-forum.com/u/mikej)\
**Replies:** 2\
**Last updated:** [May 16, 2009, 12:17am UTC](https://www.ruby-forum.com/t/gem-trouble/167954 "2009-05-16T00:17:18Z")

</div>

No idea what I’ve done, I have not upgraded anything or installed new gems but if I issue a command such as gem list, rake features, rake routes or try and create a new rails project, I get the error messages: /Syste…

---

## [Appending conditions in a model](https://www.ruby-forum.com/t/appending-conditions-in-a-model/168007)

<div class="topic-metadata">

**Author:** [@mikec](https://www.ruby-forum.com/u/mikec)\
**Replies:** 4\
**Last updated:** [May 15, 2009, 9:51pm UTC](https://www.ruby-forum.com/t/appending-conditions-in-a-model/168007 "2009-05-15T21:51:54Z")

</div>

I have a Search Model which contains search data. It looks like this: keywords:string by\_user:boolean by\_title:boolean … So basically what I want is, if one of the booleans is true it will search that particular in…

---

## [Query question](https://www.ruby-forum.com/t/query-question/167702)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 6\
**Last updated:** [May 15, 2009, 9:25pm UTC](https://www.ruby-forum.com/t/query-question/167702 "2009-05-15T21:25:46Z")

</div>

Hi there, Why does the following query… ser = ‘ser’ @user = (‘U’+ser).find(:first) …not equal this one: @user = User.find(:first) ? What needs to be done so it will work? Thanks for your help! Tom

---

## [Engines 2.3 compatibility](https://www.ruby-forum.com/t/engines-2-3-compatibility/165964)

<div class="topic-metadata">

**Author:** [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Replies:** 1\
**Last updated:** [May 15, 2009, 8:19pm UTC](https://www.ruby-forum.com/t/engines-2-3-compatibility/165964 "2009-05-15T20:19:16Z")

</div>

Hi all, I’ve just made the appropriate changes to bring the engines plugin into compatibility with Rails 2.3, and the engine features it implements. You can find these changes in the ‘edge’ branch of the git reposito…

---

## [Modeling an internal messaging system, how would you do?](https://www.ruby-forum.com/t/modeling-an-internal-messaging-system-how-would-you-do/167982)

<div class="topic-metadata">

**Author:** [@msmsms](https://www.ruby-forum.com/u/msmsms)\
**Replies:** 2\
**Last updated:** [May 15, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/modeling-an-internal-messaging-system-how-would-you-do/167982 "2009-05-15T19:17:39Z")

</div>

Hey, on my site, I’ve got an internal messaging system. A message can be saved, sender and recipient are saved as properties. Then, also one status number is saved, which indicates whether the message is sent/ read/d…

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

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