# Rails

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

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

---

## [Phone number not coming through: noob](https://www.ruby-forum.com/t/phone-number-not-coming-through-noob/151784)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 1\
**Last updated:** [October 25, 2008, 5:38pm UTC](https://www.ruby-forum.com/t/phone-number-not-coming-through-noob/151784 "2008-10-25T17:38:52Z")

</div>

Hi: used scaffold to create a phone number table. But when phone number saves it’s not coming through as the number entered in the text field: RESULT FROM DB WHEN I ENTER PHONE NUMBER OF 215 555 1212 INTO WEB FORM: …

---

## [What is "!map:HashWithIndifferentAccess "?](https://www.ruby-forum.com/t/what-is-map-hashwithindifferentaccess/151781)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 2\
**Last updated:** [October 25, 2008, 4:26pm UTC](https://www.ruby-forum.com/t/what-is-map-hashwithindifferentaccess/151781 "2008-10-25T16:26:50Z")

</div>

I read the typo migration code file 004\_add\_sidebars\_.rb and found these: Bare4Sidebar.create(:active\_position=\>0, :controller=\>'page', :active\_config=\>’— !map:HashWithIndifferentAccess maximum\_pages: “10”’) I’m c…

---

## [Thank you Master Cheung for helping me graduate!](https://www.ruby-forum.com/t/thank-you-master-cheung-for-helping-me-graduate/151782)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [October 25, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/thank-you-master-cheung-for-helping-me-graduate/151782 "2008-10-25T16:25:39Z")

</div>

Fred, Thank you for running such a fine forum. It is very evident to anyone who follows your forum that you spend a good amount of time helping your your students. I’ve finished my applications and deployed them ( pl…

---

## [AR object return nil on save](https://www.ruby-forum.com/t/ar-object-return-nil-on-save/151776)

<div class="topic-metadata">

**Author:** [@viciu](https://www.ruby-forum.com/u/viciu)\
**Replies:** 4\
**Last updated:** [October 25, 2008, 3:52pm UTC](https://www.ruby-forum.com/t/ar-object-return-nil-on-save/151776 "2008-10-25T15:52:53Z")

</div>

Hi! I’m upgrading existing app from Rails 1.2.6 to 2.1.2. I have encountered following problem with AR objects. Model definition did not change and with 1.2.6: params={} params\[:flight\] = “1111” params\[:airline\] = …

---

## [\[mysql gem\] Failed to lookup Init function](https://www.ruby-forum.com/t/mysql-gem-failed-to-lookup-init-function/151733)

<div class="topic-metadata">

**Author:** [@tejo](https://www.ruby-forum.com/u/tejo)\
**Replies:** 1\
**Last updated:** [October 25, 2008, 3:37pm UTC](https://www.ruby-forum.com/t/mysql-gem-failed-to-lookup-init-function/151733 "2008-10-25T15:37:04Z")

</div>

Hi, with mysql.rb removed from rails 2.2 I need to install the mysql gem I have mac osx 10.5.5 I have mysql installed in /usr/local/mysql, so, after a bunch of try, I’ve installed the gem with: env ARCHFLAGS="-arch…

---

## [Session Variable in Application.rb](https://www.ruby-forum.com/t/session-variable-in-application-rb/151774)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [October 25, 2008, 2:27pm UTC](https://www.ruby-forum.com/t/session-variable-in-application-rb/151774 "2008-10-25T14:27:52Z")

</div>

I’m having a problem referencing the session variable from a class within the application.rb file. undefined local variable or method \`session’ for #\<Turnrun: 0x2abc20195440 @runreport=\[\], @turnstotake=“5”\> I’m not s…

---

## [Generators not working under Rails 2.1.2?](https://www.ruby-forum.com/t/generators-not-working-under-rails-2-1-2/151655)

<div class="topic-metadata">

**Author:** [@inari](https://www.ruby-forum.com/u/inari)\
**Replies:** 6\
**Last updated:** [October 25, 2008, 12:55pm UTC](https://www.ruby-forum.com/t/generators-not-working-under-rails-2-1-2/151655 "2008-10-25T12:55:23Z")

</div>

Hello, On all of my Rails 2.1.2 projects (released today), whenever I try to generate anything, I get the result “undefined method \`empty?’ for /\_generator$/:Regexp”. Example: mbp15:~\> rails -v Rails 2.1.2 mbp15:~\>…

---

## [Script/Server working but Script/Console not working](https://www.ruby-forum.com/t/script-server-working-but-script-console-not-working/151759)

<div class="topic-metadata">

**Author:** [@vinay](https://www.ruby-forum.com/u/vinay)\
**Replies:** 2\
**Last updated:** [October 25, 2008, 12:33pm UTC](https://www.ruby-forum.com/t/script-server-working-but-script-console-not-working/151759 "2008-10-25T12:33:45Z")

</div>

Hi all, I have been having a very weird problem for a few weeks. I am able to start up the server using “script/server” for my application and run it successfully but “script/console” is not working. I have been mana…

---

## [User editable webpages](https://www.ruby-forum.com/t/user-editable-webpages/151719)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [October 25, 2008, 11:49am UTC](https://www.ruby-forum.com/t/user-editable-webpages/151719 "2008-10-25T11:49:17Z")

</div>

I have to build this webpage where the user can select the color, add a picture, overall make the layout the way that they want. Can anyone point me to a tutorial and give me some suggestions on how to get started on …

---

## [Error while starting webrick server](https://www.ruby-forum.com/t/error-while-starting-webrick-server/151706)

<div class="topic-metadata">

**Author:** [@sachinjoshi](https://www.ruby-forum.com/u/sachinjoshi)\
**Replies:** 5\
**Last updated:** [October 25, 2008, 9:27am UTC](https://www.ruby-forum.com/t/error-while-starting-webrick-server/151706 "2008-10-25T09:27:54Z")

</div>

I am getting the following error while booting webrick, I am a newbie not getting what needs to be done. Can any Expert help on this? Sachin F:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:328:in send'…

---

## [Rails 2.2: ActiveRecord in thread doesn't run if action has completed](https://www.ruby-forum.com/t/rails-2-2-activerecord-in-thread-doesnt-run-if-action-has-completed/151746)

<div class="topic-metadata">

**Author:** [@malesca](https://www.ruby-forum.com/u/malesca)\
**Replies:** 2\
**Last updated:** [October 25, 2008, 9:20am UTC](https://www.ruby-forum.com/t/rails-2-2-activerecord-in-thread-doesnt-run-if-action-has-completed/151746 "2008-10-25T09:20:04Z")

</div>

I have some callback code that submits data over the net, gets an id back and should write it to DB. This takes a few seconds. I want to run it asynchronously, without slowing down the request/response cycle. I would …

---

## [Rails 2.2.0 and i18n issue / caching problem](https://www.ruby-forum.com/t/rails-2-2-0-and-i18n-issue-caching-problem/151763)

<div class="topic-metadata">

**Author:** [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Replies:** 0\
**Last updated:** [October 25, 2008, 7:12am UTC](https://www.ruby-forum.com/t/rails-2-2-0-and-i18n-issue-caching-problem/151763 "2008-10-25T07:12:04Z")

</div>

I have some issues with the new great i18n features Everytime I make some chages in my .yml file I need to restart script/ server to see the changes. It seems to be not a browser caching issue. /lib/local/de.yml “de”…

---

## [Weird named routes&pluralization problem](https://www.ruby-forum.com/t/weird-named-routes-pluralization-problem/151760)

<div class="topic-metadata">

**Author:** [@vinay](https://www.ruby-forum.com/u/vinay)\
**Replies:** 0\
**Last updated:** [October 25, 2008, 7:09am UTC](https://www.ruby-forum.com/t/weird-named-routes-pluralization-problem/151760 "2008-10-25T07:09:09Z")

</div>

Hi all, I have these models Account has\_many :taxes Tax belongs\_to :account And the tax resource is nested inside the account resource like so map.resources :accounts do |account| account.resources :taxes…

---

## ['each' loop 2 times trough all records](https://www.ruby-forum.com/t/each-loop-2-times-trough-all-records/151739)

<div class="topic-metadata">

**Author:** [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Replies:** 4\
**Last updated:** [October 25, 2008, 3:35am UTC](https://www.ruby-forum.com/t/each-loop-2-times-trough-all-records/151739 "2008-10-25T03:35:35Z")

</div>

Hello, I’m having some troubles today with Ruby… I do @league = League.find(params\[:id\], :include =\> \[ :teams, :games \]) then @league.teams.each do |t| and it goes 2 times through the teams list ??? even if @leagu…

---

## [Observe\_field producing nothing on view](https://www.ruby-forum.com/t/observe-field-producing-nothing-on-view/151749)

<div class="topic-metadata">

**Author:** [@hangingclowns](https://www.ruby-forum.com/u/hangingclowns)\
**Replies:** 0\
**Last updated:** [October 25, 2008, 2:05am UTC](https://www.ruby-forum.com/t/observe-field-producing-nothing-on-view/151749 "2008-10-25T02:05:04Z")

</div>

I had this working fine before, but now for some reason \<%= observe\_field( :sale\_sku\_id, :url =\> {:action =\> “update\_sales\_form”}, :update =\> :unit\_price, :with =\> :sku\_id) %\> Produces nothing on the view side. I hav…

---

## [Rspec fails when assigning to an ActiveRecord field](https://www.ruby-forum.com/t/rspec-fails-when-assigning-to-an-activerecord-field/151035)

<div class="topic-metadata">

**Author:** [@leogodin217](https://www.ruby-forum.com/u/leogodin217)\
**Replies:** 3\
**Last updated:** [October 25, 2008, 1:48am UTC](https://www.ruby-forum.com/t/rspec-fails-when-assigning-to-an-activerecord-field/151035 "2008-10-25T01:48:47Z")

</div>

HI, I have a controller action that assigns a user\_id to an event record. The app works fine from the browser. However, rspec fails and I cannot figure out why. I have several tests failing but I’ll give an example…

---

## [HTML Forms](https://www.ruby-forum.com/t/html-forms/151732)

<div class="topic-metadata">

**Author:** [@Jaikishan\_J](https://www.ruby-forum.com/u/Jaikishan_J)\
**Replies:** 2\
**Last updated:** [October 24, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/html-forms/151732 "2008-10-24T23:19:37Z")

</div>

Hello, I have a form with two buttons - \[1\] Create \[2\] Cancel. By default if a user clicks on any of them, the form gets submitted. However, I dont want to do that. I want to call a javascript function on cancel and…

---

## [Rails problem](https://www.ruby-forum.com/t/rails-problem/151711)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 2\
**Last updated:** [October 24, 2008, 11:18pm UTC](https://www.ruby-forum.com/t/rails-problem/151711 "2008-10-24T23:18:23Z")

</div>

What wrong? gem install rails -s http://gems.rubyonrails.org -v 2.2.0 Successfully installed activesupport-2.2.0 Successfully installed activerecord-2.2.0 Successfully installed actionpack-2.2.0 Successfully install…

---

## [\[JOB\] - Milwaukee/Chicago Area Short 2 day contract](https://www.ruby-forum.com/t/job-milwaukee-chicago-area-short-2-day-contract/151738)

<div class="topic-metadata">

**Author:** [@mrkohrea](https://www.ruby-forum.com/u/mrkohrea)\
**Replies:** 1\
**Last updated:** [October 24, 2008, 11:17pm UTC](https://www.ruby-forum.com/t/job-milwaukee-chicago-area-short-2-day-contract/151738 "2008-10-24T23:17:50Z")

</div>

Hello. I am working, unsuccessfully, to complete a small and simple Warranty registration and warranty claims database application for our product line. I have clearance from my superior to hire for ~ 20 hours of wor…

---

## [Looking for doc on Find method](https://www.ruby-forum.com/t/looking-for-doc-on-find-method/151729)

<div class="topic-metadata">

**Author:** [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Replies:** 3\
**Last updated:** [October 24, 2008, 10:36pm UTC](https://www.ruby-forum.com/t/looking-for-doc-on-find-method/151729 "2008-10-24T22:36:14Z")

</div>

Hi, I’m looking for doc to help me on the syntax for requesting the database (find) using group, count, limit, join, … Anyone has that? Thank you! Thierry

---

## [Migration error](https://www.ruby-forum.com/t/migration-error/151649)

<div class="topic-metadata">

**Author:** [@kobrakai](https://www.ruby-forum.com/u/kobrakai)\
**Replies:** 2\
**Last updated:** [October 24, 2008, 10:32pm UTC](https://www.ruby-forum.com/t/migration-error/151649 "2008-10-24T22:32:07Z")

</div>

Hi all I’m getting an error when running rake db:migrate :- rake aborted! uninitialized constant PKG\_NAME I’m not sure what PKG\_NAME is refering to, has anyone else had this same issue or does anyone have an idea wh…

---

## [Troubleshooting Long Requests](https://www.ruby-forum.com/t/troubleshooting-long-requests/151728)

<div class="topic-metadata">

**Author:** [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Replies:** 1\
**Last updated:** [October 24, 2008, 10:06pm UTC](https://www.ruby-forum.com/t/troubleshooting-long-requests/151728 "2008-10-24T22:06:56Z")

</div>

Hello- I’m using Scout to monitor a Rails app of mine. What I’m noticing is that all of the pages in the site take a fraction of a second to complete. This is totally acceptable. However, occasionally I’ll have a req…

---

## [DRYing/shortening form processing](https://www.ruby-forum.com/t/drying-shortening-form-processing/151708)

<div class="topic-metadata">

**Author:** [@nick](https://www.ruby-forum.com/u/nick)\
**Replies:** 5\
**Last updated:** [October 24, 2008, 9:54pm UTC](https://www.ruby-forum.com/t/drying-shortening-form-processing/151708 "2008-10-24T21:54:03Z")

</div>

So I have this form with \>10 fields on it. When the form is submitted, the corresponding controller action calls the class method #filtered\_properties to process the data. I’ve created separate class methods for proce…

---

## [Newbie question: Transferring values to a text field](https://www.ruby-forum.com/t/newbie-question-transferring-values-to-a-text-field/151727)

<div class="topic-metadata">

**Author:** [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Replies:** 0\
**Last updated:** [October 24, 2008, 9:18pm UTC](https://www.ruby-forum.com/t/newbie-question-transferring-values-to-a-text-field/151727 "2008-10-24T21:18:17Z")

</div>

Hi. I have a simple question. Looks like it’s something basic. I have 2 elements: a form with a textfield and a link (father), and a panel with a link that includes a value inside (child). Here’s how my analogy works…

---

## [Newbie question](https://www.ruby-forum.com/t/newbie-question/151725)

<div class="topic-metadata">

**Author:** [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Replies:** 0\
**Last updated:** [October 24, 2008, 9:04pm UTC](https://www.ruby-forum.com/t/newbie-question/151725 "2008-10-24T21:04:11Z")

</div>

Hi. I have a simple question. Looks like it’s something basic. I have 2 elements: a form with a textfield and a link (father), and a panel with a link that includes a value inside (child). Here’s how my analogy works…

---

## [Page.select when element has multiple classes](https://www.ruby-forum.com/t/page-select-when-element-has-multiple-classes/151642)

<div class="topic-metadata">

**Author:** [@Garrett\_B](https://www.ruby-forum.com/u/Garrett_B)\
**Replies:** 12\
**Last updated:** [October 24, 2008, 8:46pm UTC](https://www.ruby-forum.com/t/page-select-when-element-has-multiple-classes/151642 "2008-10-24T20:46:01Z")

</div>

I am trying to create an expanding/collapsing table to navigate nested resources. To do this I have opted to use set of nested lists and I am formatting them to look like a table using CSS. A row looks like this… …

---

## [Problem running back-to-back migrations](https://www.ruby-forum.com/t/problem-running-back-to-back-migrations/151581)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 9\
**Last updated:** [October 24, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/problem-running-back-to-back-migrations/151581 "2008-10-24T19:51:58Z")

</div>

Hi All, I running Ruby/Rails versions: ruby 1.8.6 (2007-09-24 patchlevel 111) \[i386-mswin32\] Rails 2.0.2 I ran: ruby script/generate scaffold Payroll string:Client\_Code and got 001\_create\_payrolls.rb: class Create…

---

## [Wrong number of arguments (2 of 0)](https://www.ruby-forum.com/t/wrong-number-of-arguments-2-of-0/151712)

<div class="topic-metadata">

**Author:** [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Replies:** 2\
**Last updated:** [October 24, 2008, 7:30pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-2-of-0/151712 "2008-10-24T19:30:16Z")

</div>

I’m new with RoR. I have a simple migration file: class CreateClubs \< ActiveRecord::Migration def self.up create\_table :clubs do |t| t.columns :name, :string t.columns :ref, :string t.columns :description, :string …

---

## [RoR on Vista 64bit](https://www.ruby-forum.com/t/ror-on-vista-64bit/151518)

<div class="topic-metadata">

**Author:** [@sigma](https://www.ruby-forum.com/u/sigma)\
**Replies:** 3\
**Last updated:** [October 24, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/ror-on-vista-64bit/151518 "2008-10-24T19:00:25Z")

</div>

Hi all I’ve got my development-environment on a vista Notebook. Now I’d like to switch to 64bit Vista because of the bad RAM-Support of the 32bit Vista. My question: Is RoR running on vista 64bit? Thanks for your a…

---

## [Third-level domain](https://www.ruby-forum.com/t/third-level-domain/151700)

<div class="topic-metadata">

**Author:** [@golf](https://www.ruby-forum.com/u/golf)\
**Replies:** 4\
**Last updated:** [October 24, 2008, 6:42pm UTC](https://www.ruby-forum.com/t/third-level-domain/151700 "2008-10-24T18:42:14Z")

</div>

Hi, I am wondering if there is chance to automatically create third-level domain. For example: new user registration, with rockguru nickname, and I would like to create a third-level domain for this user: rockguru.my…

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

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