# Rails

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

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

---

## [Basic relationship question](https://www.ruby-forum.com/t/basic-relationship-question/121695)

<div class="topic-metadata">

**Author:** [@silvertab](https://www.ruby-forum.com/u/silvertab)\
**Replies:** 1\
**Last updated:** [November 30, 2007, 10:09am UTC](https://www.ruby-forum.com/t/basic-relationship-question/121695 "2007-11-30T10:09:08Z")

</div>

This question should be rather easy, but being fairly new to RoR I’m not sure of the best way to proceed… I have 2 models: City and Location… Both model belong to the Country model… (So basically a Country has many c…

---

## [\[ANN\] Rails 2.0: Release Candidate 2](https://www.ruby-forum.com/t/ann-rails-2-0-release-candidate-2/121597)

<div class="topic-metadata">

**Author:** [@DHH](https://www.ruby-forum.com/u/DHH)\
**Replies:** 8\
**Last updated:** [November 30, 2007, 10:00am UTC](https://www.ruby-forum.com/t/ann-rails-2-0-release-candidate-2/121597 "2007-11-30T10:00:21Z")

</div>

Grab it while it’s hot:

---

## [Dynamic JS or RJS?](https://www.ruby-forum.com/t/dynamic-js-or-rjs/121665)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 5\
**Last updated:** [November 30, 2007, 9:59am UTC](https://www.ruby-forum.com/t/dynamic-js-or-rjs/121665 "2007-11-30T09:59:40Z")

</div>

Hi, while I search the net for hints I leave this here, probably you will be faster than me finding an answer. The next: I have a static site where I embed a player using an external js The html: The JS: if(navig…

---

## [Trouble with plugin](https://www.ruby-forum.com/t/trouble-with-plugin/121727)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 9:43am UTC](https://www.ruby-forum.com/t/trouble-with-plugin/121727 "2007-11-30T09:43:23Z")

</div>

Hi, Just trying to write a simple plugin, I dont want it to be part of the app all the time so I want it to be contained in the plugin. When I access, http://0.0.0.0:3000/plugin\_test I want it to display the index Iv…

---

## [Problems with activerecord associations between tables](https://www.ruby-forum.com/t/problems-with-activerecord-associations-between-tables/121669)

<div class="topic-metadata">

**Author:** [@netbomb](https://www.ruby-forum.com/u/netbomb)\
**Replies:** 5\
**Last updated:** [November 30, 2007, 9:34am UTC](https://www.ruby-forum.com/t/problems-with-activerecord-associations-between-tables/121669 "2007-11-30T09:34:33Z")

</div>

Hi all, i’m developing an application with 40 tables that they have relations between them, in my products\_list when i render the results in my view everything worked fine but from one day i i get an error: NoMethod…

---

## [Replace link\_to\_remote bu button\_to\_function](https://www.ruby-forum.com/t/replace-link-to-remote-bu-button-to-function/121380)

<div class="topic-metadata">

**Author:** [@advait](https://www.ruby-forum.com/u/advait)\
**Replies:** 2\
**Last updated:** [November 30, 2007, 9:27am UTC](https://www.ruby-forum.com/t/replace-link-to-remote-bu-button-to-function/121380 "2007-11-30T09:27:37Z")

</div>

Hi, I am making use of a method button\_to\_function, and I want to use it in place of link\_to\_remot. The issue I am facing is that I am not able to pass all the parameters of the remote function to button function. I…

---

## [501 Bad Recipient Address Syntax](https://www.ruby-forum.com/t/501-bad-recipient-address-syntax/121720)

<div class="topic-metadata">

**Author:** [@mendicant](https://www.ruby-forum.com/u/mendicant)\
**Replies:** 1\
**Last updated:** [November 30, 2007, 6:47am UTC](https://www.ruby-forum.com/t/501-bad-recipient-address-syntax/121720 "2007-11-30T06:47:25Z")

</div>

Hi, I’m having a problem with sending email with ActionMailer. My mailer looks something like this: class PNGMailer \< ActionMailer::Base def forgotten\_password\_email (password\_reset, user) recipients = user.email f…

---

## [Permissions for an sqlite3 db? rake aborted](https://www.ruby-forum.com/t/permissions-for-an-sqlite3-db-rake-aborted/121609)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 4\
**Last updated:** [November 30, 2007, 6:25am UTC](https://www.ruby-forum.com/t/permissions-for-an-sqlite3-db-rake-aborted/121609 "2007-11-30T06:25:43Z")

</div>

It’s not clear to me why the rake fails. Would it be helpful to post the trace? seemed spammy. I assume it’s some sort of permissions issue, although a google search turned up other ideas (which seemed unlikely so …

---

## [Rake, capistrano and subversion on google code](https://www.ruby-forum.com/t/rake-capistrano-and-subversion-on-google-code/121713)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 1\
**Last updated:** [November 30, 2007, 6:15am UTC](https://www.ruby-forum.com/t/rake-capistrano-and-subversion-on-google-code/121713 "2007-11-30T06:15:12Z")

</div>

I have a google code project (it’s awesome), but nothing uploaded yet. What would I upload to my project at \<Google Code Archive - Long-term storage for Google Code Project Hosting. rails/\> ? Do I make a sort of “ant”…

---

## [\[ANN\] Webrat 0.1.0 released - Ruby Acceptance Testing for Web applications](https://www.ruby-forum.com/t/ann-webrat-0-1-0-released-ruby-acceptance-testing-for-web-applications/121704)

<div class="topic-metadata">

**Author:** [@bryan123](https://www.ruby-forum.com/u/bryan123)\
**Replies:** 1\
**Last updated:** [November 30, 2007, 5:47am UTC](https://www.ruby-forum.com/t/ann-webrat-0-1-0-released-ruby-acceptance-testing-for-web-applications/121704 "2007-11-30T05:47:44Z")

</div>

Webrat - Ruby Acceptance Testing for Web applications - version 0.1.0 released! http://svn.eastmedia.net/public/plugins/webrat/ Webrat lets you quickly write robust and thorough acceptance tests for a Ruby web appli…

---

## [Ajax and Rails basic application](https://www.ruby-forum.com/t/ajax-and-rails-basic-application/121556)

<div class="topic-metadata">

**Author:** [@syed](https://www.ruby-forum.com/u/syed)\
**Replies:** 6\
**Last updated:** [November 30, 2007, 4:25am UTC](https://www.ruby-forum.com/t/ajax-and-rails-basic-application/121556 "2007-11-30T04:25:07Z")

</div>

Hi all, I have searched google for any basic Ruby on Rails application with Ajax. Any basic example where after clicking the button a webpage the application connects to the database and execute the query using AJAX …

---

## [New open source web site development anouncement](https://www.ruby-forum.com/t/new-open-source-web-site-development-anouncement/121706)

<div class="topic-metadata">

**Author:** [@dmitry](https://www.ruby-forum.com/u/dmitry)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 3:31am UTC](https://www.ruby-forum.com/t/new-open-source-web-site-development-anouncement/121706 "2007-11-30T03:31:30Z")

</div>

A new project just started at google code – http://cleantogether.googlecode.com Here is a project description: http://cleantogether.com web site lets people post their environment cleaning experiences. Whether you go…

---

## [Source not reloading on development env](https://www.ruby-forum.com/t/source-not-reloading-on-development-env/121501)

<div class="topic-metadata">

**Author:** [@gabru](https://www.ruby-forum.com/u/gabru)\
**Replies:** 13\
**Last updated:** [November 30, 2007, 2:56am UTC](https://www.ruby-forum.com/t/source-not-reloading-on-development-env/121501 "2007-11-30T02:56:23Z")

</div>

for some days i have strange behavoir with my environment … the following scenario: dev env mongrel City model autocomplete\_city controller action when i do changes to the city model i need to restart the server that …

---

## [Url\_for not working when using aditional route parameters](https://www.ruby-forum.com/t/url-for-not-working-when-using-aditional-route-parameters/121703)

<div class="topic-metadata">

**Author:** [@vagostino](https://www.ruby-forum.com/u/vagostino)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 2:43am UTC](https://www.ruby-forum.com/t/url-for-not-working-when-using-aditional-route-parameters/121703 "2007-11-30T02:43:32Z")

</div>

I have a couple routes where I need to send additional parameters every time some routes in my app are called. In order to stay DRY, it makes sense to set these parameters in the route, rather than passing them throug…

---

## [Trouble sorting a list of DIVs using scriptaculous](https://www.ruby-forum.com/t/trouble-sorting-a-list-of-divs-using-scriptaculous/121702)

<div class="topic-metadata">

**Author:** [@redroot](https://www.ruby-forum.com/u/redroot)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 2:27am UTC](https://www.ruby-forum.com/t/trouble-sorting-a-list-of-divs-using-scriptaculous/121702 "2007-11-30T02:27:11Z")

</div>

I have my view, which displays a simple list of player names, one after the other contained in a parent div. They are named item\_1, item\_2, item\_3 etc. (based on what position they are in) I have a form that adds a ne…

---

## ["build" is slow on large has\_many association collections](https://www.ruby-forum.com/t/build-is-slow-on-large-has-many-association-collections/121692)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 4\
**Last updated:** [November 30, 2007, 1:57am UTC](https://www.ruby-forum.com/t/build-is-slow-on-large-has-many-association-collections/121692 "2007-11-30T01:57:57Z")

</div>

All, Rails 1.1.6 Given: an AR::Base descendant X has\_many :Ys As the size of the collection of Ys increases, the time it takes to run the “build” method (used to create a new instance of Y, as in x.ys.build(:attr1 =\>…

---

## [What is the weakness of Ruby? How is the execution speed of Ruby?](https://www.ruby-forum.com/t/what-is-the-weakness-of-ruby-how-is-the-execution-speed-of-ruby/121602)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 11\
**Last updated:** [November 30, 2007, 1:53am UTC](https://www.ruby-forum.com/t/what-is-the-weakness-of-ruby-how-is-the-execution-speed-of-ruby/121602 "2007-11-30T01:53:57Z")

</div>

Is It much slower than JAVA in regard of the execution speed?

---

## [Mongrel stops responding after period of inactivity](https://www.ruby-forum.com/t/mongrel-stops-responding-after-period-of-inactivity/110671)

<div class="topic-metadata">

**Author:** [@Olly\_L](https://www.ruby-forum.com/u/Olly_L)\
**Replies:** 4\
**Last updated:** [November 30, 2007, 12:08am UTC](https://www.ruby-forum.com/t/mongrel-stops-responding-after-period-of-inactivity/110671 "2007-11-30T00:08:28Z")

</div>

Hi I’m running a 2-instance Mongrel cluster behind Apache 2.2.4 with Rails 1.2.3. If no requests are received by the application for several hours (this usually happens overnight) then Mongrel stops responding and n…

---

## [Configure Apache in Mac Os X 10.5 to be used with ROR](https://www.ruby-forum.com/t/configure-apache-in-mac-os-x-10-5-to-be-used-with-ror/121676)

<div class="topic-metadata">

**Author:** [@jpedrosa](https://www.ruby-forum.com/u/jpedrosa)\
**Replies:** 1\
**Last updated:** [November 29, 2007, 11:59pm UTC](https://www.ruby-forum.com/t/configure-apache-in-mac-os-x-10-5-to-be-used-with-ror/121676 "2007-11-29T23:59:55Z")

</div>

Hi, I am new to ruby, I installed the mysql and configure properly the ruby to use mysql. But I am using WeBRICK webserver instead of Apache! I want to use Apache with ruby, how can I configure that in Mac OS X 10.…

---

## [Can't find rails after re-installing/upgrading Kubuntu](https://www.ruby-forum.com/t/cant-find-rails-after-re-installing-upgrading-kubuntu/121236)

<div class="topic-metadata">

**Author:** [@JSPablo\_FernSSSSnd](https://www.ruby-forum.com/u/JSPablo_FernSSSSnd)\
**Replies:** 5\
**Last updated:** [November 29, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/cant-find-rails-after-re-installing-upgrading-kubuntu/121236 "2007-11-29T23:36:30Z")

</div>

Hello Railers (?), I have just re-installed my machine with the lattest Kubuntu, which brings with Rails 1.2.4 instead of 1.2.3. Now my Rail project doesn’t start anymore. At first I’ve got this message: Cannot find …

---

## [Problems using a string as an option](https://www.ruby-forum.com/t/problems-using-a-string-as-an-option/121576)

<div class="topic-metadata">

**Author:** [@jay](https://www.ruby-forum.com/u/jay)\
**Replies:** 3\
**Last updated:** [November 29, 2007, 10:25pm UTC](https://www.ruby-forum.com/t/problems-using-a-string-as-an-option/121576 "2007-11-29T22:25:36Z")

</div>

Hello Group, I’ve tried various ways to solve my problem with no luck. I have a loop that creates a string based upon a database @markerstring \<\< “#{spot.id} =\> @markers\[#{spot.id}\]” this creates the correct string …

---

## [Someone explain this output? \<%= 'Last Post'\[:last\_post\] %\>](https://www.ruby-forum.com/t/someone-explain-this-output-last-post-last-post/121677)

<div class="topic-metadata">

**Author:** [@aantix](https://www.ruby-forum.com/u/aantix)\
**Replies:** 4\
**Last updated:** [November 29, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/someone-explain-this-output-last-post-last-post/121677 "2007-11-29T22:20:26Z")

</div>

I am looking at the source of the forum software, Beast. For most of the labels within the system, they structure their output like this : \<%= ‘Last Post’\[:last\_post\] %\> From observing the system running, it obviousl…

---

## [Method on a array of objects from the database](https://www.ruby-forum.com/t/method-on-a-array-of-objects-from-the-database/121672)

<div class="topic-metadata">

**Author:** [@pierreva](https://www.ruby-forum.com/u/pierreva)\
**Replies:** 5\
**Last updated:** [November 29, 2007, 9:34pm UTC](https://www.ruby-forum.com/t/method-on-a-array-of-objects-from-the-database/121672 "2007-11-29T21:34:40Z")

</div>

Hello, I would like to know the more elegant way to add a method for an array of objects from the database. Let me give an example : Class Product … end And in my controller : @products = Product.find(:all) And …

---

## [Weird Rails 2, Candidate 2 error: welcome aboard app env. link broken?](https://www.ruby-forum.com/t/weird-rails-2-candidate-2-error-welcome-aboard-app-env-link-broken/121678)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 0\
**Last updated:** [November 29, 2007, 9:34pm UTC](https://www.ruby-forum.com/t/weird-rails-2-candidate-2-error-welcome-aboard-app-env-link-broken/121678 "2007-11-29T21:34:04Z")

</div>

created a new project, then did rake rails:freeze:edge to pull into it Rails 2, candidate 2. Then script/server webrick then check the "about your application’s environment link and get a “500 Internal Server Error” I…

---

## [SVN stuff](https://www.ruby-forum.com/t/svn-stuff/121671)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 1\
**Last updated:** [November 29, 2007, 8:38pm UTC](https://www.ruby-forum.com/t/svn-stuff/121671 "2007-11-29T20:38:53Z")

</div>

I’m looking for a way I can use SVN here at work. I am writing an internal app just to be used on our network, but I don’t know how to setup anything for SVN. I tried looking for SVN hosting, but it seems they are all…

---

## [Migration Bug?](https://www.ruby-forum.com/t/migration-bug/121658)

<div class="topic-metadata">

**Author:** [@sp00nyg](https://www.ruby-forum.com/u/sp00nyg)\
**Replies:** 1\
**Last updated:** [November 29, 2007, 8:34pm UTC](https://www.ruby-forum.com/t/migration-bug/121658 "2007-11-29T20:34:12Z")

</div>

Please tell me I’m just confused, but this is very strange. I have a migration like so: class AddLevelToRequest \< ActiveRecord::Migration def self.up add\_column :requests, :title\_levels, :string end def self.down …

---

## [How to embed with\_scope in ActiveRecord class defnition?](https://www.ruby-forum.com/t/how-to-embed-with-scope-in-activerecord-class-defnition/121668)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 1\
**Last updated:** [November 29, 2007, 8:16pm UTC](https://www.ruby-forum.com/t/how-to-embed-with-scope-in-activerecord-class-defnition/121668 "2007-11-29T20:16:33Z")

</div>

Hi, I want to limit the scope of records for a ActiveRecord class. class Product \< ActiveRecord::Base end I can use with\_scope to limit the result set. However, I want to limit it in the model in a fixed way so that …

---

## [Testing validity of URL](https://www.ruby-forum.com/t/testing-validity-of-url/121533)

<div class="topic-metadata">

**Author:** [@alake](https://www.ruby-forum.com/u/alake)\
**Replies:** 2\
**Last updated:** [November 29, 2007, 7:38pm UTC](https://www.ruby-forum.com/t/testing-validity-of-url/121533 "2007-11-29T19:38:22Z")

</div>

I am in early development of my first RoR project. I am following Agile Web D. with Rails and am trying to adopt their best practices ideas, specifically making use of the test suite and Subversion. I wish to valida…

---

## [Include vs. require vs. require\_dependency](https://www.ruby-forum.com/t/include-vs-require-vs-require-dependency/121565)

<div class="topic-metadata">

**Author:** [@gabru](https://www.ruby-forum.com/u/gabru)\
**Replies:** 8\
**Last updated:** [November 29, 2007, 7:25pm UTC](https://www.ruby-forum.com/t/include-vs-require-vs-require-dependency/121565 "2007-11-29T19:25:43Z")

</div>

i am struggling a bit with all of them … could someone be so nice a describe me the exact differences, pros & cons of all of them … thx a lot!

---

## [Where does class file go](https://www.ruby-forum.com/t/where-does-class-file-go/121659)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 2\
**Last updated:** [November 29, 2007, 6:47pm UTC](https://www.ruby-forum.com/t/where-does-class-file-go/121659 "2007-11-29T18:47:19Z")

</div>

This is probably a simple question, but I have this class that I wrote that will be used in the controller that will encrypt some information. I’m just unsure of where to put this class code for the encryption - shoul…

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

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