# Rails

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

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

---

## [Show/hide some few fields according to a value selected](https://www.ruby-forum.com/t/show-hide-some-few-fields-according-to-a-value-selected/183206)

<div class="topic-metadata">

**Author:** [@salma](https://www.ruby-forum.com/u/salma)\
**Replies:** 3\
**Last updated:** [February 12, 2010, 12:05pm UTC](https://www.ruby-forum.com/t/show-hide-some-few-fields-according-to-a-value-selected/183206 "2010-02-12T12:05:01Z")

</div>

Hola a todos, Soy nueva en rails. Lo que quiero es dentro de un form\_for segun lo que se seleciona de una lista se muestra una parte del formulario o otra. He esta buscando y rebuscando y he entendido que se puede ha…

---

## [Migrating merb to rails3?](https://www.ruby-forum.com/t/migrating-merb-to-rails3/183340)

<div class="topic-metadata">

**Author:** [@gyngve](https://www.ruby-forum.com/u/gyngve)\
**Replies:** 1\
**Last updated:** [February 12, 2010, 11:15am UTC](https://www.ruby-forum.com/t/migrating-merb-to-rails3/183340 "2010-02-12T11:15:33Z")

</div>

Is there a document anywhere on how to migrate merb w/ datamapper and haml to rails3? Any known gotchas? Thanks, Gary

---

## [No such file to load -- mysql](https://www.ruby-forum.com/t/no-such-file-to-load-mysql/159729)

<div class="topic-metadata">

**Author:** [@subbu](https://www.ruby-forum.com/u/subbu)\
**Replies:** 11\
**Last updated:** [February 12, 2010, 11:15am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-mysql/159729 "2010-02-12T11:15:33Z")

</div>

Hello all, This seems to be a regular problem. But I couldn’t find a solution that worked for me. I am getting the following error when I do rake db:create: !!! The bundled mysql.rb driver has been removed from Rail…

---

## [Help with a collection](https://www.ruby-forum.com/t/help-with-a-collection/183357)

<div class="topic-metadata">

**Author:** [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Replies:** 2\
**Last updated:** [February 12, 2010, 11:01am UTC](https://www.ruby-forum.com/t/help-with-a-collection/183357 "2010-02-12T11:01:50Z")

</div>

I’m using the following code as a filter for a comprehensive list of sales per month and year: Month: \<%= select\_tag (:month, options\_for\_select(\[\[“January”, 1\], \[“February”, 2\], \[“March”, 3\], \[“April”, 4\], \[“May”, 5\]…

---

## [Valantine images](https://www.ruby-forum.com/t/valantine-images/183354)

<div class="topic-metadata">

**Author:** [@riya](https://www.ruby-forum.com/u/riya)\
**Replies:** 0\
**Last updated:** [February 12, 2010, 9:54am UTC](https://www.ruby-forum.com/t/valantine-images/183354 "2010-02-12T09:54:47Z")

</div>

Feel free to download any of the images. Just right click and Save As… VALENTINE’S DAY. IMAGES, BACKGROUND, BORDERS … You can select among 200+ images. … http://www.adbrite.com/mb/commerce/purchase\_form.php?opid=1003…

---

## [Different Load Mechanism for I18n](https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980)

<div class="topic-metadata">

**Author:** [@menostos](https://www.ruby-forum.com/u/menostos)\
**Replies:** 5\
**Last updated:** [February 12, 2010, 8:25am UTC](https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980 "2010-02-12T08:25:50Z")

</div>

I’ve spent some time developing a plugin for i18n. What it actually does, is to extend the i18n to support different load mechanisms. First of all there is the simple everyone knows. Then i created a new Loader which…

---

## [How to get associated fields](https://www.ruby-forum.com/t/how-to-get-associated-fields/183345)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [February 12, 2010, 8:08am UTC](https://www.ruby-forum.com/t/how-to-get-associated-fields/183345 "2010-02-12T08:08:51Z")

</div>

Dear all, Model.column\_names gives all the fields in the table. But it doesnot show the associated fields value. my model is associated with has\_and\_belongs\_to\_many :groups how can i get the associated fields also… …

---

## [Country and state select](https://www.ruby-forum.com/t/country-and-state-select/183344)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 1\
**Last updated:** [February 12, 2010, 6:53am UTC](https://www.ruby-forum.com/t/country-and-state-select/183344 "2010-02-12T06:53:57Z")

</div>

Hi In my application I have to implement a country select box as well as state select box. Is there any rails helpers available for this or I have to create these from my own tables ? Please share your thoughts which…

---

## [What is the appserver for production that works best with Rails3?](https://www.ruby-forum.com/t/what-is-the-appserver-for-production-that-works-best-with-rails3/183334)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 3\
**Last updated:** [February 12, 2010, 4:06am UTC](https://www.ruby-forum.com/t/what-is-the-appserver-for-production-that-works-best-with-rails3/183334 "2010-02-12T04:06:34Z")

</div>

Hi all, In development I used webrick, but I suppose I don’t want to use that in production. With rails2 I would use mongrel or thin. But as far as I know, mongrel is no longer developed? So are we left to thin these …

---

## [Twitter - oauth gem - not getting callback](https://www.ruby-forum.com/t/twitter-oauth-gem-not-getting-callback/183341)

<div class="topic-metadata">

**Author:** [@haries](https://www.ruby-forum.com/u/haries)\
**Replies:** 0\
**Last updated:** [February 12, 2010, 2:59am UTC](https://www.ruby-forum.com/t/twitter-oauth-gem-not-getting-callback/183341 "2010-02-12T02:59:52Z")

</div>

I redirect the user of my application to Twitter for oauth style authentication using my app’s request\_token. The user is able to enter username and password on Twitter’s page BUT then, instead of calling back my appl…

---

## [Can't pass parameters in routes on Rails 3](https://www.ruby-forum.com/t/cant-pass-parameters-in-routes-on-rails-3/183242)

<div class="topic-metadata">

**Author:** [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Replies:** 4\
**Last updated:** [February 12, 2010, 2:33am UTC](https://www.ruby-forum.com/t/cant-pass-parameters-in-routes-on-rails-3/183242 "2010-02-12T02:33:40Z")

</div>

Hi all! In Rails 2.3, I could do the following: map.connect “/posts/favorites”, :controller =\> :posts, :action =\> “:index”, :filter =\> “favorites” But it seems that the “match” command in Rails 3 doesn’t accept para…

---

## [Migration commits when run by itself (db:migrate:up), but not with other migrations (db:migrate)](https://www.ruby-forum.com/t/migration-commits-when-run-by-itself-dbup-but-not-with-other-migrations-db-migrate/183327)

<div class="topic-metadata">

**Author:** [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Replies:** 7\
**Last updated:** [February 12, 2010, 12:57am UTC](https://www.ruby-forum.com/t/migration-commits-when-run-by-itself-dbup-but-not-with-other-migrations-db-migrate/183327 "2010-02-12T00:57:58Z")

</div>

I have a migration that saves correctly to the database when it’s run by itself through db:migrate:up, but not when it’s run with other migrations through db:migrate. class SetActiveOnExistingItems \< ActiveRecord::Mig…

---

## [Params\[:id\] not working](https://www.ruby-forum.com/t/params-id-not-working/183336)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 0\
**Last updated:** [February 12, 2010, 12:48am UTC](https://www.ruby-forum.com/t/params-id-not-working/183336 "2010-02-12T00:48:43Z")

</div>

Hey all, I have two problems with this code. First, regardless of what option I select from the dropdown menu, it only updates the record with id 1, and second even if I just refresh the page, it still updates the rec…

---

## [Trying to update to rails 3.0 beta on ubuntu. For some reason none of the commands work & ubuntu do](https://www.ruby-forum.com/t/trying-to-update-to-rails-3-0-beta-on-ubuntu-for-some-reason-none-of-the-commands-work-ubuntu-do/183294)

<div class="topic-metadata">

**Author:** [@princezuda](https://www.ruby-forum.com/u/princezuda)\
**Replies:** 3\
**Last updated:** [February 11, 2010, 11:47pm UTC](https://www.ruby-forum.com/t/trying-to-update-to-rails-3-0-beta-on-ubuntu-for-some-reason-none-of-the-commands-work-ubuntu-do/183294 "2010-02-11T23:47:50Z")

</div>

Hi, I’m about to go out of my mind. I’ve been literally working all day on installing rails 3.0 beta. I have followed the steps in the ruby on rails release notes to a T. I’ve installed all of it’s neccesary gems and…

---

## [Validation problems](https://www.ruby-forum.com/t/validation-problems/183213)

<div class="topic-metadata">

**Author:** [@bluegreen](https://www.ruby-forum.com/u/bluegreen)\
**Replies:** 6\
**Last updated:** [February 11, 2010, 10:44pm UTC](https://www.ruby-forum.com/t/validation-problems/183213 "2010-02-11T22:44:48Z")

</div>

Hi, there. I have two validations in the model: validates\_numericality\_of :value, :only\_integer=\>true, :allow\_blank=\>true validates\_size\_of :value, :is=\>9, :message=\>“must be 5-digit number”, :if=\>Proc.new{|u| u.val…

---

## [Recursive expansition of \<% ... %\>](https://www.ruby-forum.com/t/recursive-expansition-of/183325)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 4\
**Last updated:** [February 11, 2010, 10:42pm UTC](https://www.ruby-forum.com/t/recursive-expansition-of/183325 "2010-02-11T22:42:45Z")

</div>

In a controller I have @message = “The size is \<% @a.size %\>.” In the view I have \<%= @message %\> which, sadly, produces The size is \<% @a.size %\>. rather than, say, The size is 4. If I try \<%= \<%= @ message %\> …

---

## [We are looking for a ruby programmer](https://www.ruby-forum.com/t/we-are-looking-for-a-ruby-programmer/183330)

<div class="topic-metadata">

**Author:** [@BCK](https://www.ruby-forum.com/u/BCK)\
**Replies:** 1\
**Last updated:** [February 11, 2010, 10:41pm UTC](https://www.ruby-forum.com/t/we-are-looking-for-a-ruby-programmer/183330 "2010-02-11T22:41:06Z")

</div>

I realize this is mostly a technical group, but I need to find a contract programmer and there aren’t that many sources I know about or feel I can trust. I have about a dozen enhancements ranging from simple to interm…

---

## [Making REE default ruby interpreter?](https://www.ruby-forum.com/t/making-ree-default-ruby-interpreter/183329)

<div class="topic-metadata">

**Author:** [@drsharp](https://www.ruby-forum.com/u/drsharp)\
**Replies:** 4\
**Last updated:** [February 11, 2010, 9:23pm UTC](https://www.ruby-forum.com/t/making-ree-default-ruby-interpreter/183329 "2010-02-11T21:23:51Z")

</div>

Hi, I just installed Ruby Enterprise Edition/Passenger on my new VPS but I can’t run any rake tasks (I get -bash rake: command not found). /opt/ruby-enterprise-1.8.7-2010.01/bin/gem list Successfully lists the instal…

---

## [Act\_as\_Solr](https://www.ruby-forum.com/t/act-as-solr/183278)

<div class="topic-metadata">

**Author:** [@mahesh\_s](https://www.ruby-forum.com/u/mahesh_s)\
**Replies:** 1\
**Last updated:** [February 11, 2010, 9:12pm UTC](https://www.ruby-forum.com/t/act-as-solr/183278 "2010-02-11T21:12:08Z")

</div>

Hi friends Im newbie “act as solr”, give me some ideas how to use the plugin act as solr and give some example also

---

## [How to catch Oracle errors in a rake task](https://www.ruby-forum.com/t/how-to-catch-oracle-errors-in-a-rake-task/183326)

<div class="topic-metadata">

**Author:** [@sultan](https://www.ruby-forum.com/u/sultan)\
**Replies:** 5\
**Last updated:** [February 11, 2010, 9:12pm UTC](https://www.ruby-forum.com/t/how-to-catch-oracle-errors-in-a-rake-task/183326 "2010-02-11T21:12:07Z")

</div>

How can I trap the following Oracle error in a rake task? I can trap most Oracle errors in the website with “@phone.errors.count \> 0”, but in the rake task the task stops before a check can be done. The rake task used…

---

## [.find() with simple :join](https://www.ruby-forum.com/t/find-with-simple-join/183315)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 6\
**Last updated:** [February 11, 2010, 8:35pm UTC](https://www.ruby-forum.com/t/find-with-simple-join/183315 "2010-02-11T20:35:14Z")

</div>

Hello all, I about to pull my hair out. I have two models “Activities” and “Activity\_types” Activities id name activity\_type\_id Activity\_types id name Associations - class Activity \< ActiveRecord::Base has\_man…

---

## [Undefined method join](https://www.ruby-forum.com/t/undefined-method-join/183254)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 7\
**Last updated:** [February 11, 2010, 8:32pm UTC](https://www.ruby-forum.com/t/undefined-method-join/183254 "2010-02-11T20:32:18Z")

</div>

Hey all, I get an undefined method \`join’ for #\<String NoMethodError. student.rb has\_one :student\_fail attr\_accessor :student\_fail\_attribute #controller def student\_fail @student = @student.find params\[:id\] def …

---

## [Plural table names?](https://www.ruby-forum.com/t/plural-table-names/183308)

<div class="topic-metadata">

**Author:** [@hkhkhk](https://www.ruby-forum.com/u/hkhkhk)\
**Replies:** 5\
**Last updated:** [February 11, 2010, 7:51pm UTC](https://www.ruby-forum.com/t/plural-table-names/183308 "2010-02-11T19:51:58Z")

</div>

should we follow the convention? or use singular?

---

## [Lost User session when back from REST web service](https://www.ruby-forum.com/t/lost-user-session-when-back-from-rest-web-service/183322)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [February 11, 2010, 7:34pm UTC](https://www.ruby-forum.com/t/lost-user-session-when-back-from-rest-web-service/183322 "2010-02-11T19:34:20Z")

</div>

Once logged in and authenticated (using Authlogic), a user in my app can upload a media file into a Remote Media Server , using a form. In the form there is an url back upon success. Fine, the file uploads correctly,…

---

## [Net::IMAP problem](https://www.ruby-forum.com/t/net-imap-problem/183311)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 1\
**Last updated:** [February 11, 2010, 6:50pm UTC](https://www.ruby-forum.com/t/net-imap-problem/183311 "2010-02-11T18:50:22Z")

</div>

Hello all, My Ruby script: require “net/imap” imap = Net::IMAP.new(‘my server’) imap.authenticate(‘LOGIN’,‘myuser’,‘mypassword’) On the 3rd line I get a “NO response” exception raised (indicating that the IMAP serv…

---

## [\[ANN\] released Property gem](https://www.ruby-forum.com/t/ann-released-property-gem/183319)

<div class="topic-metadata">

**Author:** [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Replies:** 0\
**Last updated:** [February 11, 2010, 6:45pm UTC](https://www.ruby-forum.com/t/ann-released-property-gem/183319 "2010-02-11T18:45:05Z")

</div>

Hi there ! Just a quick note to let you know that zena has produced a new funky gem: It’s called “Property” and lets you wrap rails model attributes into a single database column and declare properties from within th…

---

## [Validates\_uniqueness\_of problem](https://www.ruby-forum.com/t/validates-uniqueness-of-problem/183298)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 5\
**Last updated:** [February 11, 2010, 6:03pm UTC](https://www.ruby-forum.com/t/validates-uniqueness-of-problem/183298 "2010-02-11T18:03:35Z")

</div>

Hi guys, I have given a validation function (validates\_uniqueness\_of :email) in my model because i want email to be unique. So the problem is that whenever i want to update a record then also it validates. I mean i d…

---

## [Rails 3 (beta) - Where are 'bundle' gems installed?](https://www.ruby-forum.com/t/rails-3-beta-where-are-bundle-gems-installed/183316)

<div class="topic-metadata">

**Author:** [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Replies:** 1\
**Last updated:** [February 11, 2010, 5:31pm UTC](https://www.ruby-forum.com/t/rails-3-beta-where-are-bundle-gems-installed/183316 "2010-02-11T17:31:59Z")

</div>

In testing out Rails 3 (beta) and following the blog posts to get sample apps created, and updating old apps, I used the new ‘bundle’ command to get all the required gems installed. But - I’m wondering where it is ins…

---

## [The state of Rails 2.3 / Engines migrations](https://www.ruby-forum.com/t/the-state-of-rails-2-3-engines-migrations/183200)

<div class="topic-metadata">

**Author:** [@subimage](https://www.ruby-forum.com/u/subimage)\
**Replies:** 4\
**Last updated:** [February 11, 2010, 4:55pm UTC](https://www.ruby-forum.com/t/the-state-of-rails-2-3-engines-migrations/183200 "2010-02-11T16:55:42Z")

</div>

Hey everyone, I’ve been out of the loop for a minute regarding engines, but I’m looking to update Substruct to Engines 2.3/Rails 2.3 if possible. My last investigation stopped when running into the migrations issue. …

---

## [Inconsistent Hash#to\_xml Method](https://www.ruby-forum.com/t/inconsistent-hash-to-xml-method/183312)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [February 11, 2010, 4:27pm UTC](https://www.ruby-forum.com/t/inconsistent-hash-to-xml-method/183312 "2010-02-11T16:27:35Z")

</div>

I have a unit test that demonstrates some inconsistent behavior with a Hash being converted to XML with the :root option. Sometimes it works fine: Hash.new.to\_xml(:root =\> ‘test’) “\<?xml version=\\"1.0\\" encoding=\\"U…

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

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