# Rails

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

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

---

## [With\_indifferent\_access question Rails 2.2](https://www.ruby-forum.com/t/with-indifferent-access-question-rails-2-2/176852)

<div class="topic-metadata">

**Author:** [@erik](https://www.ruby-forum.com/u/erik)\
**Replies:** 2\
**Last updated:** [October 7, 2009, 4:00am UTC](https://www.ruby-forum.com/t/with-indifferent-access-question-rails-2-2/176852 "2009-10-07T04:00:30Z")

</div>

We had something very odd happen today after installing the twitter gem. We had a ton of our tests fail. When we removed the gem they would pass. What it ended up being was during the building of attributes using n…

---

## [How do I access a child table/model from the parent in sql s](https://www.ruby-forum.com/t/how-do-i-access-a-child-table-model-from-the-parent-in-sql-s/176809)

<div class="topic-metadata">

**Author:** [@mitch\_newbie](https://www.ruby-forum.com/u/mitch_newbie)\
**Replies:** 8\
**Last updated:** [October 7, 2009, 2:41am UTC](https://www.ruby-forum.com/t/how-do-i-access-a-child-table-model-from-the-parent-in-sql-s/176809 "2009-10-07T02:41:32Z")

</div>

I am trying to use the fourth normal form for my applications so that i can get the information in the appropriate language. I have a table called manufacturers. I have another called descriptions. The descriptions a…

---

## [Nested models when id is unavailable](https://www.ruby-forum.com/t/nested-models-when-id-is-unavailable/176571)

<div class="topic-metadata">

**Author:** [@scottj97](https://www.ruby-forum.com/u/scottj97)\
**Replies:** 1\
**Last updated:** [October 7, 2009, 12:59am UTC](https://www.ruby-forum.com/t/nested-models-when-id-is-unavailable/176571 "2009-10-07T00:59:03Z")

</div>

I have a controller that’s creating model objects from XML input. Something like: true Scott I have two models, StatusReport and Person. I want to create a new Person iff there is not already one with th…

---

## [Do AR callbacks know why they were called?](https://www.ruby-forum.com/t/do-ar-callbacks-know-why-they-were-called/176847)

<div class="topic-metadata">

**Author:** [@phallstrom](https://www.ruby-forum.com/u/phallstrom)\
**Replies:** 0\
**Last updated:** [October 7, 2009, 12:57am UTC](https://www.ruby-forum.com/t/do-ar-callbacks-know-why-they-were-called/176847 "2009-10-07T00:57:52Z")

</div>

Hi all - I was thinking today (dangerous) and got to wondering if AR callbacks know why there were called. That is, do they know what triggered them. Say I have… class Foo \<\< AR::Base before\_destroy :bar before\_cr…

---

## [Unable to install plugins from github](https://www.ruby-forum.com/t/unable-to-install-plugins-from-github/176703)

<div class="topic-metadata">

**Author:** [@C\_K\_Kashyap](https://www.ruby-forum.com/u/C_K_Kashyap)\
**Replies:** 11\
**Last updated:** [October 6, 2009, 9:32pm UTC](https://www.ruby-forum.com/t/unable-to-install-plugins-from-github/176703 "2009-10-06T21:32:57Z")

</div>

Hi All, My operating system is FC11…I tried to install will\_paginate from github directly like this - script/plugin install git://github.com/mislav/will\_paginate.git But I get an error saying \[ckkashyap@KingCobra te…

---

## [Form\_for with namespace](https://www.ruby-forum.com/t/form-for-with-namespace/176792)

<div class="topic-metadata">

**Author:** [@Bryan\_L](https://www.ruby-forum.com/u/Bryan_L)\
**Replies:** 9\
**Last updated:** [October 6, 2009, 8:12pm UTC](https://www.ruby-forum.com/t/form-for-with-namespace/176792 "2009-10-06T20:12:10Z")

</div>

Hi, I’m new to RoR (came over from PHP). I am working on the backend of my project now, and I’m basically trying to output a form that lets me create a new ‘design’. This is what I have in my routes.rb: map.with\_opt…

---

## [Undefined local variable or method \`new\_new\_path' in an scaffold](https://www.ruby-forum.com/t/undefined-local-variable-or-method-new-new-path-in-an-scaffold/176554)

<div class="topic-metadata">

**Author:** [@tyoc](https://www.ruby-forum.com/u/tyoc)\
**Replies:** 2\
**Last updated:** [October 6, 2009, 8:01pm UTC](https://www.ruby-forum.com/t/undefined-local-variable-or-method-new-new-path-in-an-scaffold/176554 "2009-10-06T20:01:03Z")

</div>

Hi there people. My problem come after creating an scaffold like $ script/generate scaffold New title:string content:text I dont know what is the possible cause for this, so when I go to http://127.0.0.1:3000/news I …

---

## [DRY model validation question](https://www.ruby-forum.com/t/dry-model-validation-question/176766)

<div class="topic-metadata">

**Author:** [@Dudebot](https://www.ruby-forum.com/u/Dudebot)\
**Replies:** 4\
**Last updated:** [October 6, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/dry-model-validation-question/176766 "2009-10-06T19:36:06Z")

</div>

Here’s a question: I have the exact same validation code in 2 different models. OK, you’re thinking, combine the models. Not in this case. So, in Rails, is there a way to reference the same validation for 2 differen…

---

## [No such file to load -- restClient (MissingSourceFile) HELP](https://www.ruby-forum.com/t/no-such-file-to-load-restclient-missingsourcefile-help/176680)

<div class="topic-metadata">

**Author:** [@morgan](https://www.ruby-forum.com/u/morgan)\
**Replies:** 2\
**Last updated:** [October 6, 2009, 7:03pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-restclient-missingsourcefile-help/176680 "2009-10-06T19:03:57Z")

</div>

i don’t get what is going on here. if i run the restclient command that starts an irb with restclient it works fine but when i try to load it from environment.rb with require ‘rest\_client’ this is what i get… it’s …

---

## [Named routes and a Railscast](https://www.ruby-forum.com/t/named-routes-and-a-railscast/176826)

<div class="topic-metadata">

**Author:** [@RVince](https://www.ruby-forum.com/u/RVince)\
**Replies:** 0\
**Last updated:** [October 6, 2009, 7:01pm UTC](https://www.ruby-forum.com/t/named-routes-and-a-railscast/176826 "2009-10-06T19:01:20Z")

</div>

I’m looking at railscast#102 ( ) and when I implement it, a certain named ( “formatted\_channelnotes\_path(:js)” ) route is used in: \<%= text\_field\_with\_auto\_complete :channel, :channelnote\_name, { :size =\> 15 }, { :u…

---

## [Connecting to MS SQL from Snow Leopard](https://www.ruby-forum.com/t/connecting-to-ms-sql-from-snow-leopard/176028)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 9\
**Last updated:** [October 6, 2009, 6:53pm UTC](https://www.ruby-forum.com/t/connecting-to-ms-sql-from-snow-leopard/176028 "2009-10-06T18:53:44Z")

</div>

Has anyone been able to get Rails talking to Microsoft SQL Server from OSX Snow Leopard? In the past with Leopard, I used the instructions found here: http://wiki.rubyonrails.org/database-support/ms-sql. But with Sn…

---

## [Schema\_migrations table not created](https://www.ruby-forum.com/t/schema-migrations-table-not-created/176824)

<div class="topic-metadata">

**Author:** [@terrii](https://www.ruby-forum.com/u/terrii)\
**Replies:** 0\
**Last updated:** [October 6, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/schema-migrations-table-not-created/176824 "2009-10-06T18:31:59Z")

</div>

Hi - We’ve got a Rails application/Oracle database that we just upgraded from Rails 1.2 to 2.3.2 We did not have any database structural modifications, and thus did not need to run any migrations. However, the deplo…

---

## [Models vs constant arrays (Rails way)](https://www.ruby-forum.com/t/models-vs-constant-arrays-rails-way/176634)

<div class="topic-metadata">

**Author:** [@jonas\_s](https://www.ruby-forum.com/u/jonas_s)\
**Replies:** 5\
**Last updated:** [October 6, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/models-vs-constant-arrays-rails-way/176634 "2009-10-06T18:28:06Z")

</div>

Hey guys, here is something I encounter very often in my project, and I still don’t know what the real “right” way to solve it: I have a set of custom values. May it be the countries for a country select box, a set o…

---

## [Schema\_migrations table not created](https://www.ruby-forum.com/t/schema-migrations-table-not-created/176823)

<div class="topic-metadata">

**Author:** [@terrii](https://www.ruby-forum.com/u/terrii)\
**Replies:** 0\
**Last updated:** [October 6, 2009, 6:16pm UTC](https://www.ruby-forum.com/t/schema-migrations-table-not-created/176823 "2009-10-06T18:16:09Z")

</div>

Hi - We’ve got a Rails application/Oracle database that we just upgraded from Rails 1.2 to 2.3.2 We did not have any database structural modifications, and thus did not need to run any migrations. However, the deplo…

---

## [Integrationtest with Subdomain](https://www.ruby-forum.com/t/integrationtest-with-subdomain/176822)

<div class="topic-metadata">

**Author:** [@borisu](https://www.ruby-forum.com/u/borisu)\
**Replies:** 0\
**Last updated:** [October 6, 2009, 6:10pm UTC](https://www.ruby-forum.com/t/integrationtest-with-subdomain/176822 "2009-10-06T18:10:27Z")

</div>

Hello, I have a app which uses Subdomains for User-Account “username.my.app” How can I build an integration test for this app with webrat. i donÂ´t know how can I use my subdomain logic in the test. thanks

---

## [Uploading multiple files with will\_paginate](https://www.ruby-forum.com/t/uploading-multiple-files-with-will-paginate/176821)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [October 6, 2009, 6:06pm UTC](https://www.ruby-forum.com/t/uploading-multiple-files-with-will-paginate/176821 "2009-10-06T18:06:28Z")

</div>

hey all i’m using attachment\_fu to add ‘documents’ (the attached class) to a forum post (in our app). It’s all working fine for a single document - on the new post page i just have a file\_field which sets “post\[docu…

---

## [Canadian Ruby on Rails Hosting](https://www.ruby-forum.com/t/canadian-ruby-on-rails-hosting/176816)

<div class="topic-metadata">

**Author:** [@nicholas-henry](https://www.ruby-forum.com/u/nicholas-henry)\
**Replies:** 0\
**Last updated:** [October 6, 2009, 5:11pm UTC](https://www.ruby-forum.com/t/canadian-ruby-on-rails-hosting/176816 "2009-10-06T17:11:15Z")

</div>

I have a client that requires a Canadian host for their Ruby on Rails application due to privacy laws etc. Maybe my Google-Fu is lacking, but there seems to a lack of significant players in Canada. I have found a coup…

---

## [Model without database table?](https://www.ruby-forum.com/t/model-without-database-table/130073)

<div class="topic-metadata">

**Author:** [@kenle545](https://www.ruby-forum.com/u/kenle545)\
**Replies:** 3\
**Last updated:** [October 6, 2009, 4:43pm UTC](https://www.ruby-forum.com/t/model-without-database-table/130073 "2009-10-06T16:43:51Z")

</div>

Is it possible to make a model that does not map to a database table? If so how?

---

## [Browser can't display the ruby part in rhtml](https://www.ruby-forum.com/t/browser-cant-display-the-ruby-part-in-rhtml/176748)

<div class="topic-metadata">

**Author:** [@browny](https://www.ruby-forum.com/u/browny)\
**Replies:** 9\
**Last updated:** [October 6, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/browser-cant-display-the-ruby-part-in-rhtml/176748 "2009-10-06T15:23:48Z")

</div>

I create a simple .rhtml file “hello.rhtml” in the “view” folder of the rails app. Hello World Hello World! \<%= 'Hello Dynamic World' %\> The problem is when I run the web server and l…

---

## [Custom class](https://www.ruby-forum.com/t/custom-class/176790)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 14\
**Last updated:** [October 6, 2009, 1:02pm UTC](https://www.ruby-forum.com/t/custom-class/176790 "2009-10-06T13:02:19Z")

</div>

Where do I put a custom class? How do I use it?

---

## [Errno::EADDRINUSE](https://www.ruby-forum.com/t/errno-eaddrinuse/176780)

<div class="topic-metadata">

**Author:** [@ralu](https://www.ruby-forum.com/u/ralu)\
**Replies:** 3\
**Last updated:** [October 6, 2009, 12:44pm UTC](https://www.ruby-forum.com/t/errno-eaddrinuse/176780 "2009-10-06T12:44:49Z")

</div>

=\> Booting WEBrick =\> Rails 2.3.4 application starting on http://0.0.0.0:3000 =\> Call with -d to detach =\> Ctrl-C to shutdown server \[2009-10-06 09:50:03\] INFO WEBrick 1.3.1 \[2009-10-06 09:50:03\] INFO ruby 1.8.6 (…

---

## [Using RestClient for communication between server and client](https://www.ruby-forum.com/t/using-restclient-for-communication-between-server-and-client/176803)

<div class="topic-metadata">

**Author:** [@focusmh](https://www.ruby-forum.com/u/focusmh)\
**Replies:** 0\
**Last updated:** [October 6, 2009, 12:31pm UTC](https://www.ruby-forum.com/t/using-restclient-for-communication-between-server-and-client/176803 "2009-10-06T12:31:05Z")

</div>

Hello, I’m using class RestClient for communication between server and client. One example is: params = {:status =\> “finished”} resource = RestClient::Resource.new “http://localhost:3000/BuildJob/220376999” begin …

---

## [Help needed about using httperf in linux](https://www.ruby-forum.com/t/help-needed-about-using-httperf-in-linux/176801)

<div class="topic-metadata">

**Author:** [@samiron](https://www.ruby-forum.com/u/samiron)\
**Replies:** 0\
**Last updated:** [October 6, 2009, 12:30pm UTC](https://www.ruby-forum.com/t/help-needed-about-using-httperf-in-linux/176801 "2009-10-06T12:30:46Z")

</div>

Could anyone give me a full guideline on using httperf in linux. I need a guideline from installing httperf to sending test report to developers. I watched two videos from bestechvideos.com http://www.bestechvideos.co…

---

## [Relating to image](https://www.ruby-forum.com/t/relating-to-image/176799)

<div class="topic-metadata">

**Author:** [@hunt](https://www.ruby-forum.com/u/hunt)\
**Replies:** 1\
**Last updated:** [October 6, 2009, 12:21pm UTC](https://www.ruby-forum.com/t/relating-to-image/176799 "2009-10-06T12:21:59Z")

</div>

Hi Friends, I have been interacting with rails for 2 months by practising with social networking site. For profile in Sites, I want to upload the image in the database when the profile is asked to view, the image sho…

---

## [Handling validation errors](https://www.ruby-forum.com/t/handling-validation-errors/176787)

<div class="topic-metadata">

**Author:** [@sharankruthi](https://www.ruby-forum.com/u/sharankruthi)\
**Replies:** 3\
**Last updated:** [October 6, 2009, 11:40am UTC](https://www.ruby-forum.com/t/handling-validation-errors/176787 "2009-10-06T11:40:50Z")

</div>

Hi, I have edit page for a model, where edit button is given as submit\_to\_remote, where i specify in which div the content should be updated, but if validation fails, like if while editing, mandatory field is left em…

---

## [Youtube pagination](https://www.ruby-forum.com/t/youtube-pagination/176798)

<div class="topic-metadata">

**Author:** [@ravi](https://www.ruby-forum.com/u/ravi)\
**Replies:** 0\
**Last updated:** [October 6, 2009, 11:25am UTC](https://www.ruby-forum.com/t/youtube-pagination/176798 "2009-10-06T11:25:47Z")

</div>

Hi I m able to get the videos from youtube using youtube-g ,now doing an pagination for youtube videos for 4 pages my controller code is class VideosController \< ApplicationController def index client = YouTubeG:…

---

## [Complex form validation problem](https://www.ruby-forum.com/t/complex-form-validation-problem/176768)

<div class="topic-metadata">

**Author:** [@fahrio](https://www.ruby-forum.com/u/fahrio)\
**Replies:** 1\
**Last updated:** [October 6, 2009, 10:23am UTC](https://www.ruby-forum.com/t/complex-form-validation-problem/176768 "2009-10-06T10:23:08Z")

</div>

I have a complex form for my Work model. It accepts nested attributes for Credits, Images and Videos. (it is a modified version of Eloy Duran’s complex form example) I want to validate presence of at least one Credit …

---

## [Problems Processing multiple form elements generated by javascript actions](https://www.ruby-forum.com/t/problems-processing-multiple-form-elements-generated-by-javascript-actions/176794)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 1\
**Last updated:** [October 6, 2009, 10:16am UTC](https://www.ruby-forum.com/t/problems-processing-multiple-form-elements-generated-by-javascript-actions/176794 "2009-10-06T10:16:41Z")

</div>

Hi all, After many days of struggling, I have a multi-model form with ajax elements more or less working, but I’m hitting a wall with a few bugs that I can’t figure out. Guidance would be very much appreciated. I’m …

---

## [Strange to\_formatted\_s problem](https://www.ruby-forum.com/t/strange-to-formatted-s-problem/176784)

<div class="topic-metadata">

**Author:** [@boblu](https://www.ruby-forum.com/u/boblu)\
**Replies:** 2\
**Last updated:** [October 6, 2009, 10:02am UTC](https://www.ruby-forum.com/t/strange-to-formatted-s-problem/176784 "2009-10-06T10:02:02Z")

</div>

my time zone is set like this config.time\_zone = ‘Tokyo’ I got this from console temp1.updated\_at =\> Tue, 06 Oct 2009 13:26:57 JST +09:00 temp1.updated\_at.to\_formatted\_s(:db) =\> “2009-10-06 04:26:57” temp1.u…

---

## [AssociationTypeMismatch expected Project got Project](https://www.ruby-forum.com/t/associationtypemismatch-expected-project-got-project/176718)

<div class="topic-metadata">

**Author:** [@eyp](https://www.ruby-forum.com/u/eyp)\
**Replies:** 3\
**Last updated:** [October 6, 2009, 10:01am UTC](https://www.ruby-forum.com/t/associationtypemismatch-expected-project-got-project/176718 "2009-10-06T10:01:27Z")

</div>

Using RAILS\_GEM\_VERSION = ‘2.1.2’ Hello, I’m developing a plugin for another rails app. When I try to show the new form view I got this error: ActiveRecord::AssociationTypeMismatch in Audit testsController#new Projec…

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

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