# Rails

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

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

---

## [Finding a nested resource's 'parent' object?](https://www.ruby-forum.com/t/finding-a-nested-resources-parent-object/156825)

<div class="topic-metadata">

**Author:** [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Replies:** 1\
**Last updated:** [January 3, 2009, 10:42pm UTC](https://www.ruby-forum.com/t/finding-a-nested-resources-parent-object/156825 "2009-01-03T22:42:49Z")

</div>

Say I have this setup: class Ticket \< ActiveRecord::Base belongs\_to :project end map.resources :projects do |p| p.resources :tickets end How would I go about programatically figuring out that Ticket is nested und…

---

## ["Missing template homepage/index.erb"](https://www.ruby-forum.com/t/missing-template-homepage-index-erb/156836)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 0\
**Last updated:** [January 3, 2009, 10:35pm UTC](https://www.ruby-forum.com/t/missing-template-homepage-index-erb/156836 "2009-01-03T22:35:09Z")

</div>

I’m getting a missing template error, saying that my application doesn’t have the “homepage/index.erb” file. Missing template homepage/index.erb in view path /home/adistar/adistar\_topics/releases/20081231112517/app/vi…

---

## [Date select not working in Rails 2.2.2](https://www.ruby-forum.com/t/date-select-not-working-in-rails-2-2-2/156833)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 1\
**Last updated:** [January 3, 2009, 10:20pm UTC](https://www.ruby-forum.com/t/date-select-not-working-in-rails-2-2-2/156833 "2009-01-03T22:20:29Z")

</div>

Hello, I have a date\_select inside a form\_for which was working in Rails 2.1 but once I migrated to 2.2.2 I get the following error: undefined method \`each’ for false:FalseClass \<%= f.date\_select(:birthday, :order =\> …

---

## [Rspec rdoc available?](https://www.ruby-forum.com/t/rspec-rdoc-available/130496)

<div class="topic-metadata">

**Author:** [@namealreadytaken](https://www.ruby-forum.com/u/namealreadytaken)\
**Replies:** 2\
**Last updated:** [January 3, 2009, 9:59pm UTC](https://www.ruby-forum.com/t/rspec-rdoc-available/130496 "2009-01-03T21:59:55Z")

</div>

I tried to generate the docs for rspec + rails and got a bizarre error report: rake aborted! You have a nil object when you didn’t expect it! The error occurred while evaluating nil.exitstatus Is there a copy of the…

---

## [\[ANN\] Consent: a firewall DSL for ActionController](https://www.ruby-forum.com/t/ann-consent-a-firewall-dsl-for-actioncontroller/156835)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 3, 2009, 9:36pm UTC](https://www.ruby-forum.com/t/ann-consent-a-firewall-dsl-for-actioncontroller/156835 "2009-01-03T21:36:25Z")

</div>

Hey all, In response to some ideas from a friend, I’ve hacked up Consent, a plugin that provides pre-filtering of incoming requests using a concise DSL: It lets you specify rules that tell your app whether to accep…

---

## [Problem with RubyGems installation](https://www.ruby-forum.com/t/problem-with-rubygems-installation/153963)

<div class="topic-metadata">

**Author:** [@mrmaster](https://www.ruby-forum.com/u/mrmaster)\
**Replies:** 14\
**Last updated:** [January 3, 2009, 8:24pm UTC](https://www.ruby-forum.com/t/problem-with-rubygems-installation/153963 "2009-01-03T20:24:37Z")

</div>

Hello, I am trying to install RubyGems on Ubuntu and i’m having trouble. I’ve downloaded rubygems 1.3.1 and when i run the sudo ruby setup.rb command I get the problem mentioned below. I’d really appreciate if someone…

---

## [Windows-pr requires win32-api (\>= 1.2.1, runtime)](https://www.ruby-forum.com/t/windows-pr-requires-win32-api-1-2-1-runtime/153497)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 1\
**Last updated:** [January 3, 2009, 7:41pm UTC](https://www.ruby-forum.com/t/windows-pr-requires-win32-api-1-2-1-runtime/153497 "2009-01-03T19:41:14Z")

</div>

The problem is that gem can only find win32-api v 1.2.0 $ gem install win32-api Building native extensions. This could take a while… Successfully installed win32-api-1.2.0 1 gem installed Installing ri documentatio…

---

## [Mongrel and thin Server only in Development envirement](https://www.ruby-forum.com/t/mongrel-and-thin-server-only-in-development-envirement/156822)

<div class="topic-metadata">

**Author:** [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Replies:** 2\
**Last updated:** [January 3, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/mongrel-and-thin-server-only-in-development-envirement/156822 "2009-01-03T19:36:49Z")

</div>

Hi what could be the reasen, that I only can start the mongrel or the thin server if i set the envirement on development? On development -\> everything works fine. On production: andreasP:/var/www/web1/aekschen# mong…

---

## [How to get which field changed in observe\_form helper](https://www.ruby-forum.com/t/how-to-get-which-field-changed-in-observe-form-helper/156740)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 1\
**Last updated:** [January 3, 2009, 7:03pm UTC](https://www.ruby-forum.com/t/how-to-get-which-field-changed-in-observe-form-helper/156740 "2009-01-03T19:03:43Z")

</div>

I use observe\_form to monitor all the fields in a form. But how can I get which field changed?

---

## [Gem\_original\_require no such file to load -- /var/www/vhosts/gophotoswap.com/httpdocs/current/config](https://www.ruby-forum.com/t/gem-original-require-no-such-file-to-load-var-www-vhosts-gophotoswap-com-httpdocs-current-config/156716)

<div class="topic-metadata">

**Author:** [@Matt\_McF](https://www.ruby-forum.com/u/Matt_McF)\
**Replies:** 1\
**Last updated:** [January 3, 2009, 6:46pm UTC](https://www.ruby-forum.com/t/gem-original-require-no-such-file-to-load-var-www-vhosts-gophotoswap-com-httpdocs-current-config/156716 "2009-01-03T18:46:05Z")

</div>

\*\* Daemonized, any open files are closed. Look at /var/www/vhosts/ gophotoswap.com/httpdocs/shared/pids/mongrel.8000.pid and /var/www/ vhosts/gophotoswap.com/httpdocs/shared/log/mongrel.8000.log for info. \*\* Starting…

---

## [Cannot get tlsmail working; Want Gmail as SMTP](https://www.ruby-forum.com/t/cannot-get-tlsmail-working-want-gmail-as-smtp/155083)

<div class="topic-metadata">

**Author:** [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Replies:** 3\
**Last updated:** [January 3, 2009, 6:04pm UTC](https://www.ruby-forum.com/t/cannot-get-tlsmail-working-want-gmail-as-smtp/155083 "2009-01-03T18:04:57Z")

</div>

This is killing me, folks. I have reviewed numerous examples and tried two different approaches to try and use Gmail (Google Apps account) as my application’s SMTP. Every time, both on my slicehost server and local de…

---

## [How can I use the same model/pojo as both type ActiveRecord and non-ActiveRecord. Doesn't seem dry t](https://www.ruby-forum.com/t/how-can-i-use-the-same-model-pojo-as-both-type-activerecord-and-non-activerecord-doesnt-seem-dry-t/156781)

<div class="topic-metadata">

**Author:** [@rick](https://www.ruby-forum.com/u/rick)\
**Replies:** 2\
**Last updated:** [January 3, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/how-can-i-use-the-same-model-pojo-as-both-type-activerecord-and-non-activerecord-doesnt-seem-dry-t/156781 "2009-01-03T18:03:50Z")

</div>

I understand I can just define a class without extending ActiveReord::Base, but what if I want to use the model object sometimes without having the data persist. For example… Let’s say I have an “AutoManufacturer” obj…

---

## [Passenger and multi-site application](https://www.ruby-forum.com/t/passenger-and-multi-site-application/156769)

<div class="topic-metadata">

**Author:** [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Replies:** 1\
**Last updated:** [January 3, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/passenger-and-multi-site-application/156769 "2009-01-03T15:23:47Z")

</div>

Hi list ! I am trying to test zena (http://zenadmin.org) with passenger (http://www.modrails.com/). The basic setting is "point apache to the ‘/zena/public’ directory. This is fine for a single site application but z…

---

## [Script to extract text from application](https://www.ruby-forum.com/t/script-to-extract-text-from-application/156820)

<div class="topic-metadata">

**Author:** [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Replies:** 0\
**Last updated:** [January 3, 2009, 2:52pm UTC](https://www.ruby-forum.com/t/script-to-extract-text-from-application/156820 "2009-01-03T14:52:33Z")

</div>

I have a Rails application, that has grown quite large. At the moment all texts are placed inside the template files like this: This is a header And inside the ruby code (like flash messages, model error messages, etc…

---

## [Lazy evaluation and scoping](https://www.ruby-forum.com/t/lazy-evaluation-and-scoping/156768)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 3\
**Last updated:** [January 3, 2009, 12:43pm UTC](https://www.ruby-forum.com/t/lazy-evaluation-and-scoping/156768 "2009-01-03T12:43:29Z")

</div>

Take a look at the #should\_require\_login\_for inside this pastie (it’s a Shoulda macro): http://pastie.org/350658 #should\_require\_login\_for takes an action name and a Proc. The method is meant to be used like this in m…

---

## [Not working country\_select in Rails 2.2.2](https://www.ruby-forum.com/t/not-working-country-select-in-rails-2-2-2/156800)

<div class="topic-metadata">

**Author:** [@nuugii](https://www.ruby-forum.com/u/nuugii)\
**Replies:** 1\
**Last updated:** [January 3, 2009, 12:15pm UTC](https://www.ruby-forum.com/t/not-working-country-select-in-rails-2-2-2/156800 "2009-01-03T12:15:39Z")

</div>

country\_select not working in Rails 2.2.2 How to fix it’ \<%= country\_select(:employee, :national, \[“United States”, “Russian Federation”\], {}) %\>

---

## [Migration for beginner](https://www.ruby-forum.com/t/migration-for-beginner/156794)

<div class="topic-metadata">

**Author:** [@anita](https://www.ruby-forum.com/u/anita)\
**Replies:** 2\
**Last updated:** [January 3, 2009, 11:20am UTC](https://www.ruby-forum.com/t/migration-for-beginner/156794 "2009-01-03T11:20:38Z")

</div>

I haven’t used migration for quite a while and I forgot how to do it. I need to add a column to a certain table. I want to use: ruby script/generate migration inactivated\_at but if I don’t write the name of the table …

---

## [Understanding rails internal architecture](https://www.ruby-forum.com/t/understanding-rails-internal-architecture/156810)

<div class="topic-metadata">

**Author:** [@jzimmek](https://www.ruby-forum.com/u/jzimmek)\
**Replies:** 0\
**Last updated:** [January 3, 2009, 10:51am UTC](https://www.ruby-forum.com/t/understanding-rails-internal-architecture/156810 "2009-01-03T10:51:20Z")

</div>

i am currently digging into the rails 2.2.2 source to get a deeper understanding of some features (in particular model-validation) and a better overall insight. most of rails features are encapsulated in a separate mo…

---

## [Uploading csv](https://www.ruby-forum.com/t/uploading-csv/156587)

<div class="topic-metadata">

**Author:** [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Replies:** 3\
**Last updated:** [January 3, 2009, 8:38am UTC](https://www.ruby-forum.com/t/uploading-csv/156587 "2009-01-03T08:38:38Z")

</div>

hi all, in my project i have to upload the csv file.i want to show the data of the file before submitting the form. how to do it…plesae help me its very urgent…

---

## [InstantRails script/runner error](https://www.ruby-forum.com/t/instantrails-script-runner-error/156803)

<div class="topic-metadata">

**Author:** [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Replies:** 0\
**Last updated:** [January 3, 2009, 7:37am UTC](https://www.ruby-forum.com/t/instantrails-script-runner-error/156803 "2009-01-03T07:37:13Z")

</div>

Hi folks ^^, Ok I need some help here. I’m trying to create a script to automatically send Newsletters every day. The script is ready, but as I never used ruby script/runner I just wanted to make some test before. So…

---

## [How to disable etag?](https://www.ruby-forum.com/t/how-to-disable-etag/156802)

<div class="topic-metadata">

**Author:** [@swachian](https://www.ruby-forum.com/u/swachian)\
**Replies:** 0\
**Last updated:** [January 3, 2009, 6:03am UTC](https://www.ruby-forum.com/t/how-to-disable-etag/156802 "2009-01-03T06:03:42Z")

</div>

I just use rails2.1.2 which has etag in the http header. The etag makes something troublesome. Does anyone know how to disable the tag?

---

## [Displaying ruby content in rhtml](https://www.ruby-forum.com/t/displaying-ruby-content-in-rhtml/156798)

<div class="topic-metadata">

**Author:** [@shrikantv](https://www.ruby-forum.com/u/shrikantv)\
**Replies:** 3\
**Last updated:** [January 3, 2009, 3:52am UTC](https://www.ruby-forum.com/t/displaying-ruby-content-in-rhtml/156798 "2009-01-03T03:52:14Z")

</div>

Hi everyone, I am a newbie to RoR. I installed the Instant Rails package 1.7, and with scaffold, I was able to create and connect to a database. However, when I embed some code in rhtml(list.rhtml in the tutorial the…

---

## [Url\_for and ampersand escaping?](https://www.ruby-forum.com/t/url-for-and-ampersand-escaping/156797)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 5\
**Last updated:** [January 3, 2009, 2:08am UTC](https://www.ruby-forum.com/t/url-for-and-ampersand-escaping/156797 "2009-01-03T02:08:41Z")

</div>

I have two different servers, with two different test rails apps, both of which claim to be running Rails 2.1.2. On one of them, url\_for in a view environment generates & in between query parameters, instead of just &.…

---

## [Simple relations are failing](https://www.ruby-forum.com/t/simple-relations-are-failing/156799)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 0\
**Last updated:** [January 3, 2009, 1:03am UTC](https://www.ruby-forum.com/t/simple-relations-are-failing/156799 "2009-01-03T01:03:19Z")

</div>

Can anyone see why the league\_organizers relation is failing. class League \< ActiveRecord::Base has\_many :league\_admins has\_many :league\_organizers, :through =\> :league\_admins, :class\_name =\> “User” class LeagueAdmi…

---

## [.htaccess ReWrite](https://www.ruby-forum.com/t/htaccess-rewrite/156793)

<div class="topic-metadata">

**Author:** [@Sean\_McGilvray](https://www.ruby-forum.com/u/Sean_McGilvray)\
**Replies:** 0\
**Last updated:** [January 3, 2009, 12:01am UTC](https://www.ruby-forum.com/t/htaccess-rewrite/156793 "2009-01-03T00:01:04Z")

</div>

Hello everyone, I have the following old way of getting users to their sites I want all request coming in to this old way to go to the new way www.domain.com/profile/username Domain name is the same. Is there a wa…

---

## [Eager loading is letting me down](https://www.ruby-forum.com/t/eager-loading-is-letting-me-down/156786)

<div class="topic-metadata">

**Author:** [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Replies:** 2\
**Last updated:** [January 2, 2009, 10:38pm UTC](https://www.ruby-forum.com/t/eager-loading-is-letting-me-down/156786 "2009-01-02T22:38:58Z")

</div>

Class User has\_many Referrals. Referrals have an instance variable ‘point\_value.’ So on my users/index action I want to list the user info, total referrals, and then total points. However, I am getting the notoriou…

---

## [Testing a POST request with correct param](https://www.ruby-forum.com/t/testing-a-post-request-with-correct-param/156723)

<div class="topic-metadata">

**Author:** [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Replies:** 5\
**Last updated:** [January 2, 2009, 8:53pm UTC](https://www.ruby-forum.com/t/testing-a-post-request-with-correct-param/156723 "2009-01-02T20:53:42Z")

</div>

Hi,- I’m wondering how to test POSTing something to an action from a form. I am testing an action named “forgot” in my account\_controller.rb. It takes an email address as a parameter and does things based on whether a …

---

## [Which test framework do you use?](https://www.ruby-forum.com/t/which-test-framework-do-you-use/156779)

<div class="topic-metadata">

**Author:** [@wycats](https://www.ruby-forum.com/u/wycats)\
**Replies:** 1\
**Last updated:** [January 2, 2009, 8:45pm UTC](https://www.ruby-forum.com/t/which-test-framework-do-you-use/156779 "2009-01-02T20:45:40Z")

</div>

In the interest of collecting some demographic information on the community, Matt (Aimonetti, Rails evangelist) put together a poll of testing framework usage. Please vote at Twtpoll. Thanks!

---

## [Installing Gems](https://www.ruby-forum.com/t/installing-gems/156764)

<div class="topic-metadata">

**Author:** [@Abhishek\_Pratap](https://www.ruby-forum.com/u/Abhishek_Pratap)\
**Replies:** 4\
**Last updated:** [January 2, 2009, 7:49pm UTC](https://www.ruby-forum.com/t/installing-gems/156764 "2009-01-02T19:49:48Z")

</div>

Hi All Getting stuck at the first step with gems. I guess a tough start but hoping for a easy future. So here I am. I did install Gems in the separate /export directory of my Red Hat system. ruby setup.rb --prefix=…

---

## [Specifying Active Support Version in environment.rb](https://www.ruby-forum.com/t/specifying-active-support-version-in-environment-rb/156767)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 1\
**Last updated:** [January 2, 2009, 6:14pm UTC](https://www.ruby-forum.com/t/specifying-active-support-version-in-environment-rb/156767 "2009-01-02T18:14:27Z")

</div>

Hello. I am getting this error… C:/dev/ccx\_aucxtion\_ccx/config/boot.rb:20:Warning: Gem::SourceIndex#search support for String patterns is deprecated c:/ruby/lib/ruby/site\_ruby/1.8/rubygems.rb:149:in \`activate’: can’t …

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

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