# Rails

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

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

---

## [Error going through the "Getting Started" tutorial](https://www.ruby-forum.com/t/error-going-through-the-getting-started-tutorial/161199)

<div class="topic-metadata">

**Author:** [@Beren](https://www.ruby-forum.com/u/Beren)\
**Replies:** 2\
**Last updated:** [February 24, 2009, 4:54pm UTC](https://www.ruby-forum.com/t/error-going-through-the-getting-started-tutorial/161199 "2009-02-24T16:54:42Z")

</div>

Hi, I get this error on step 9 of the Getting Started tutorial: NoMethodError in PostsController#index undefined method \`accepts\_nested\_attributes\_for’ for #\<Class: 0x23fbc48\> Does someone know if it’s a bug? Cheer…

---

## [Rails Framework](https://www.ruby-forum.com/t/rails-framework/160517)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [February 24, 2009, 4:50pm UTC](https://www.ruby-forum.com/t/rails-framework/160517 "2009-02-24T16:50:35Z")

</div>

When I try to create new rails framework I’ getting the follow error. I’ve had to reinstall ruby and ruby gem. /Library/Ruby/Site/1.8/rubygems.rb:149:in activate': can't activate activesupport (= 2.1.0, runtime), alrea…

---

## [Dynamically changing a form from POST/CREATE to PUT/UPDATE](https://www.ruby-forum.com/t/dynamically-changing-a-form-from-post-create-to-put-update/161009)

<div class="topic-metadata">

**Author:** [@groovetrain](https://www.ruby-forum.com/u/groovetrain)\
**Replies:** 8\
**Last updated:** [February 24, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/dynamically-changing-a-form-from-post-create-to-put-update/161009 "2009-02-24T16:47:02Z")

</div>

For the life of me I can’t figure this one out, although I can’t find anyone else who’s attempted to do this, and probably with good reason. Context: blog using AJAX What I’m trying to do: when the user initially save…

---

## [How to...Have a proxy URL](https://www.ruby-forum.com/t/how-to-have-a-proxy-url/161229)

<div class="topic-metadata">

**Author:** [@zeba-momin](https://www.ruby-forum.com/u/zeba-momin)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 4:45pm UTC](https://www.ruby-forum.com/t/how-to-have-a-proxy-url/161229 "2009-02-24T16:45:51Z")

</div>

Hi… My application can be accessed at: http://localhost:3001/main/home?locale=en-US I’m running it on mongrel server… Also I need to pass the locale parameter…only the first time… But I want my URL to be more user f…

---

## [Consult BD oracle](https://www.ruby-forum.com/t/consult-bd-oracle/160655)

<div class="topic-metadata">

**Author:** [@enocmontero](https://www.ruby-forum.com/u/enocmontero)\
**Replies:** 3\
**Last updated:** [February 24, 2009, 4:37pm UTC](https://www.ruby-forum.com/t/consult-bd-oracle/160655 "2009-02-24T16:37:02Z")

</div>

hello everyone, the problem is the following application and made his and it works very well with mSQL, but I need to consult a table that is in oracle, then add to consult the same table in a field different and Ora…

---

## [Geokit - using :through to connect models](https://www.ruby-forum.com/t/geokit-using-through-to-connect-models/161076)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 2\
**Last updated:** [February 24, 2009, 4:34pm UTC](https://www.ruby-forum.com/t/geokit-using-through-to-connect-models/161076 "2009-02-24T16:34:29Z")

</div>

hello… i am currently trying to use :through to attach two of my models together using geokit. for some reason, i am running into a problem: ArgumentError: Unknown key(s): as i have two models, one that is geocoded, …

---

## [Mysql::Error: Duplicate entry '#' for key # - Error with the test framework or ActiveRecord?](https://www.ruby-forum.com/t/mysql-duplicate-entry-for-key-error-with-the-test-framework-or-activerecord/160678)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [February 24, 2009, 4:19pm UTC](https://www.ruby-forum.com/t/mysql-duplicate-entry-for-key-error-with-the-test-framework-or-activerecord/160678 "2009-02-24T16:19:19Z")

</div>

I am getting the following error during testing of my application (using the Rails testing framework): Mysql::Error: Duplicate entry ‘140-2’ for key 1: INSERT INTO accessibilities\_member\_entities (accessibility\_id, m…

---

## [Mysql.so errors with MySQL 5.0.77](https://www.ruby-forum.com/t/mysql-so-errors-with-mysql-5-0-77/161234)

<div class="topic-metadata">

**Author:** [@reggieb](https://www.ruby-forum.com/u/reggieb)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 3:31pm UTC](https://www.ruby-forum.com/t/mysql-so-errors-with-mysql-5-0-77/161234 "2009-02-24T15:31:11Z")

</div>

I have updated Rails to 2.2.2 and then found I had to update MySQL to work with the mysql gem. However, I’ve found that with MySQL 5.0.77, I get this error: LoadError (126: The specified module could not be found. - …

---

## [Cannot pass id field to ActiveRecord](https://www.ruby-forum.com/t/cannot-pass-id-field-to-activerecord/161231)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 4\
**Last updated:** [February 24, 2009, 3:26pm UTC](https://www.ruby-forum.com/t/cannot-pass-id-field-to-activerecord/161231 "2009-02-24T15:26:53Z")

</div>

Dear all I have a dummy question. The model code as follow: class User \< ActiveRecord::Base set\_primary\_key “username” end In script/console user = {:username =\> “123”, :display\_name =\> “345”} =\> {:username=\>“123”…

---

## [Using a controller method in model](https://www.ruby-forum.com/t/using-a-controller-method-in-model/159723)

<div class="topic-metadata">

**Author:** [@fmh](https://www.ruby-forum.com/u/fmh)\
**Replies:** 11\
**Last updated:** [February 24, 2009, 3:19pm UTC](https://www.ruby-forum.com/t/using-a-controller-method-in-model/159723 "2009-02-24T15:19:12Z")

</div>

hello, how to use a controller method in model? example ---- in -ApplicationController def is\_ok? return true unless … end ----- in model use is\_ok?

---

## [Add .html extension by default](https://www.ruby-forum.com/t/add-html-extension-by-default/161220)

<div class="topic-metadata">

**Author:** [@gerold](https://www.ruby-forum.com/u/gerold)\
**Replies:** 7\
**Last updated:** [February 24, 2009, 3:15pm UTC](https://www.ruby-forum.com/t/add-html-extension-by-default/161220 "2009-02-24T15:15:05Z")

</div>

Hi all, i would like to add the .html extension by default to all my resources. What is the best way to do that? The reason for this is that i need to download the generated sites via wget and i need the .html extens…

---

## [Cap deploy:restart error to do with 'no passwd entry for app](https://www.ruby-forum.com/t/cap-deploy-restart-error-to-do-with-no-passwd-entry-for-app/156301)

<div class="topic-metadata">

**Author:** [@mperham](https://www.ruby-forum.com/u/mperham)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/cap-deploy-restart-error-to-do-with-no-passwd-entry-for-app/156301 "2009-02-24T14:46:30Z")

</div>

After upgrading to capistrano 2.0 I get this error: executing \`deploy:restart’ executing “sudo -p 'sudo password: ’ -u app /var/apps/mobile/current/script/process/reaper” servers: \[“r1.h1.XXX.com”\] \[r1.h1.XXX.com\] …

---

## [Capturing an IP Address](https://www.ruby-forum.com/t/capturing-an-ip-address/117276)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [February 24, 2009, 12:24pm UTC](https://www.ruby-forum.com/t/capturing-an-ip-address/117276 "2009-02-24T12:24:44Z")

</div>

How do I capture an IP address and send it into a database field? There is no DRY convention for this like a password\_confirmation for example right?

---

## [Can't activate activerecord since already activated](https://www.ruby-forum.com/t/cant-activate-activerecord-since-already-activated/161213)

<div class="topic-metadata">

**Author:** [@pinky](https://www.ruby-forum.com/u/pinky)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 12:19pm UTC](https://www.ruby-forum.com/t/cant-activate-activerecord-since-already-activated/161213 "2009-02-24T12:19:28Z")

</div>

=\> Booting Mongrel (use ‘script/server webrick’ to force WEBrick) =\> Rails 2.1.2 application starting on http://0.0.0.0:3000 =\> Call with -d to detach =\> Ctrl-C to shutdown server \*\* Starting Mongrel listening at 0.0…

---

## [Riding Rails Weblog Feed Broken!](https://www.ruby-forum.com/t/riding-rails-weblog-feed-broken/161215)

<div class="topic-metadata">

**Author:** [@Aragorn450](https://www.ruby-forum.com/u/Aragorn450)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 12:07pm UTC](https://www.ruby-forum.com/t/riding-rails-weblog-feed-broken/161215 "2009-02-24T12:07:40Z")

</div>

So, I’m having a hard time trying to figure out where to mention this, but… Peak Obsession is giving me Error 500 messages and I get the same thing when trying to post comments on the blog too. Someone might want to …

---

## [2 levels or more nested :joins w/ AR search conditions](https://www.ruby-forum.com/t/2-levels-or-more-nested-joins-w-ar-search-conditions/161128)

<div class="topic-metadata">

**Author:** [@gte351s](https://www.ruby-forum.com/u/gte351s)\
**Replies:** 2\
**Last updated:** [February 24, 2009, 11:57am UTC](https://www.ruby-forum.com/t/2-levels-or-more-nested-joins-w-ar-search-conditions/161128 "2009-02-24T11:57:45Z")

</div>

Sorry for the ambiguous title, but here’s the problem: Say I have tables of cities, districts and countries such that: city belongs\_to district (district has\_many cities) district belongs\_to country (country has\_many …

---

## [Handling nested formular data](https://www.ruby-forum.com/t/handling-nested-formular-data/161209)

<div class="topic-metadata">

**Author:** [@msmsms](https://www.ruby-forum.com/u/msmsms)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 11:08am UTC](https://www.ruby-forum.com/t/handling-nested-formular-data/161209 "2009-02-24T11:08:16Z")

</div>

Hi, it’ll be my job to create formulars where the given information can be strutured. There’s not only value1=x, value2=y, value3=z, but also value1=x, value1\_a=y, value1\_b=z and so on. I’m asking myself whether it’s…

---

## [Error in "Getting Started" Tutorial](https://www.ruby-forum.com/t/error-in-getting-started-tutorial/161203)

<div class="topic-metadata">

**Author:** [@Beren](https://www.ruby-forum.com/u/Beren)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 9:47am UTC](https://www.ruby-forum.com/t/error-in-getting-started-tutorial/161203 "2009-02-24T09:47:51Z")

</div>

I get this error on step 9 of the Getting Started tutorial at NoMethodError in PostsController#index undefined method \`accepts\_nested\_attributes\_for’ for #\<Class: 0x23fbc48\> Does anyone know if it’s a bug?

---

## [Helper](https://www.ruby-forum.com/t/helper/160918)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 6\
**Last updated:** [February 24, 2009, 9:17am UTC](https://www.ruby-forum.com/t/helper/160918 "2009-02-24T09:17:16Z")

</div>

How make a helper: If value X is true: print else

---

## [Hash and Array](https://www.ruby-forum.com/t/hash-and-array/160953)

<div class="topic-metadata">

**Author:** [@cyrus](https://www.ruby-forum.com/u/cyrus)\
**Replies:** 10\
**Last updated:** [February 24, 2009, 9:14am UTC](https://www.ruby-forum.com/t/hash-and-array/160953 "2009-02-24T09:14:18Z")

</div>

Hello all I have problem regarding hash and array I am retriving records using find method and then doing some operations on it and finally i got results like following \[{“1”=\>“75225”, “2”=\>“Sat”},{“1”=\>“75225”, “2”…

---

## [Help redirecting to the same page](https://www.ruby-forum.com/t/help-redirecting-to-the-same-page/160888)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 4\
**Last updated:** [February 24, 2009, 9:08am UTC](https://www.ruby-forum.com/t/help-redirecting-to-the-same-page/160888 "2009-02-24T09:08:51Z")

</div>

I have a login controller and a link so I can login my app. I would like to have something to come back to the page where I clicked that link. So, when I click the link I go to the login page and after I would like to…

---

## [How do I clear values from text\_field\_tag after browser refresh?](https://www.ruby-forum.com/t/how-do-i-clear-values-from-text-field-tag-after-browser-refresh/161177)

<div class="topic-metadata">

**Author:** [@fakdora](https://www.ruby-forum.com/u/fakdora)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 9:01am UTC](https://www.ruby-forum.com/t/how-do-i-clear-values-from-text-field-tag-after-browser-refresh/161177 "2009-02-24T09:01:38Z")

</div>

Hi all, I’m having an issue with text\_field\_tag. I want to reset the value of the text\_field when I refresh my browser, seems like a very simple thing, however I’m having hard time finding the answer. After I input s…

---

## [The New Delhi Ruby February Meetup - Coming Saturday - 28 Feb](https://www.ruby-forum.com/t/the-new-delhi-ruby-february-meetup-coming-saturday-28-feb/161195)

<div class="topic-metadata">

**Author:** [@kapil](https://www.ruby-forum.com/u/kapil)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 8:49am UTC](https://www.ruby-forum.com/t/the-new-delhi-ruby-february-meetup-coming-saturday-28-feb/161195 "2009-02-24T08:49:35Z")

</div>

We’re a very open, fun and friendly ruby meetup group in New Delhi, India and we have something for everyone, from the curious who just appreciates the ruby, to the intermediate learner who wants to learn best practic…

---

## [Inserting string with special character in database](https://www.ruby-forum.com/t/inserting-string-with-special-character-in-database/161070)

<div class="topic-metadata">

**Author:** [@anubhaw](https://www.ruby-forum.com/u/anubhaw)\
**Replies:** 5\
**Last updated:** [February 24, 2009, 8:36am UTC](https://www.ruby-forum.com/t/inserting-string-with-special-character-in-database/161070 "2009-02-24T08:36:33Z")

</div>

Hi all. I am having trouble in reading string containing special characters from file and storing them in database. For example, for string like ‘\\x89\\xA5\\xCFI w…’ it throws error “Incorrect string value”. The string…

---

## [Jquery, ajax, and Internet Explorer](https://www.ruby-forum.com/t/jquery-ajax-and-internet-explorer/161134)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 3\
**Last updated:** [February 24, 2009, 8:09am UTC](https://www.ruby-forum.com/t/jquery-ajax-and-internet-explorer/161134 "2009-02-24T08:09:19Z")

</div>

I have a code like this that works in all browsers and not IE. That is they send the expected GET request while IE is sending a POST request. I have tested this using IE7 $.ajax({ url: this.href, type: ‘get’, dataTyp…

---

## [Updating database via cron?](https://www.ruby-forum.com/t/updating-database-via-cron/161063)

<div class="topic-metadata">

**Author:** [@bongoman](https://www.ruby-forum.com/u/bongoman)\
**Replies:** 3\
**Last updated:** [February 24, 2009, 7:52am UTC](https://www.ruby-forum.com/t/updating-database-via-cron/161063 "2009-02-24T07:52:42Z")

</div>

Hi there I have a Rails app running that needs to have it’s database periodically updated from an upload of a text file. The data file is in UIEE format and I’m working on a Ruby script that parses the file and inser…

---

## [Read data from Excel](https://www.ruby-forum.com/t/read-data-from-excel/52566)

<div class="topic-metadata">

**Author:** [@kousen](https://www.ruby-forum.com/u/kousen)\
**Replies:** 21\
**Last updated:** [February 24, 2009, 6:42am UTC](https://www.ruby-forum.com/t/read-data-from-excel/52566 "2009-02-24T06:42:04Z")

</div>

A client of mine has a ton of data stored in Excel spreadsheets. I’m building a web application for her (backed by a real db of course) and want to import all that data. Is there a library available to read data fro…

---

## [Select onchange question](https://www.ruby-forum.com/t/select-onchange-question/161165)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 6\
**Last updated:** [February 24, 2009, 4:33am UTC](https://www.ruby-forum.com/t/select-onchange-question/161165 "2009-02-24T04:33:47Z")

</div>

I have this select statement, trying to change to a page that is the value of the select: \<%= select(:node, :id, $shelves,{:prompt =\>‘Select Equipment’}, { :onchange =\> "document.location.href = ‘/buildshelf/’ + $F('n…

---

## [Looking for a good UI designer](https://www.ruby-forum.com/t/looking-for-a-good-ui-designer/161173)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 4:29am UTC](https://www.ruby-forum.com/t/looking-for-a-good-ui-designer/161173 "2009-02-24T04:29:40Z")

</div>

We are a stealth startup specializing in developing Web 3.0 business collaboration portals. We’ve are launching a unique business collaboration portal for high-income professionals worldwide this Q1’09. This will ver…

---

## [Hide password params in log file](https://www.ruby-forum.com/t/hide-password-params-in-log-file/161126)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 6\
**Last updated:** [February 24, 2009, 3:54am UTC](https://www.ruby-forum.com/t/hide-password-params-in-log-file/161126 "2009-02-24T03:54:00Z")

</div>

Hi, I just noticed that when users register or login to my website (I use restful\_auth), their password gets printed out in the production.log file. How can I prevent that? I consider this a major security issue. SSL…

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

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