# Rails

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

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

---

## [Javascript in rails](https://www.ruby-forum.com/t/javascript-in-rails/146362)

<div class="topic-metadata">

**Author:** [@maite](https://www.ruby-forum.com/u/maite)\
**Replies:** 1\
**Last updated:** [August 20, 2008, 11:12am UTC](https://www.ruby-forum.com/t/javascript-in-rails/146362 "2008-08-20T11:12:43Z")

</div>

hello list I have in rails the object @list, it is string and I want pass this @list to javascript function, but I donÂ´t know where put the javascript code and how pass @list any idea. thanks

---

## [Rspec fixtures stay in the test db - is this right?](https://www.ruby-forum.com/t/rspec-fixtures-stay-in-the-test-db-is-this-right/128396)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 6\
**Last updated:** [August 20, 2008, 10:16am UTC](https://www.ruby-forum.com/t/rspec-fixtures-stay-in-the-test-db-is-this-right/128396 "2008-08-20T10:16:34Z")

</div>

I have some fixtures set up to put a few records in some of my tables. In some of my rspec describe blocks, i’m not calling the fixtures, and expecting the tables to be empty. But they’re not - the fixture data is in…

---

## [I have a problem in executing following line](https://www.ruby-forum.com/t/i-have-a-problem-in-executing-following-line/146356)

<div class="topic-metadata">

**Author:** [@muhammad-usman](https://www.ruby-forum.com/u/muhammad-usman)\
**Replies:** 1\
**Last updated:** [August 20, 2008, 9:40am UTC](https://www.ruby-forum.com/t/i-have-a-problem-in-executing-following-line/146356 "2008-08-20T09:40:35Z")

</div>

when i run ruby script/generate scaffold Item Manage it displays: wrong number of arguments(1 for 2) i am using book “Biggining ruby on rails”

---

## [Beginner in Ruby](https://www.ruby-forum.com/t/beginner-in-ruby/146260)

<div class="topic-metadata">

**Author:** [@thiagobrandam](https://www.ruby-forum.com/u/thiagobrandam)\
**Replies:** 7\
**Last updated:** [August 20, 2008, 9:35am UTC](https://www.ruby-forum.com/t/beginner-in-ruby/146260 "2008-08-20T09:35:53Z")

</div>

Hi all, my name is Thiago and I am completely new to Ruby. I’m having OO class this semester and one of the languages we are using is Ruby. For the final exam, we will have to build a software using OO concepts and my…

---

## [Simple captch plugin](https://www.ruby-forum.com/t/simple-captch-plugin/146353)

<div class="topic-metadata">

**Author:** [@dharmdip](https://www.ruby-forum.com/u/dharmdip)\
**Replies:** 6\
**Last updated:** [August 20, 2008, 9:20am UTC](https://www.ruby-forum.com/t/simple-captch-plugin/146353 "2008-08-20T09:20:12Z")

</div>

i can not download simple CAPTCHA plugin !

---

## [Failed to install Ruby on Rails](https://www.ruby-forum.com/t/failed-to-install-ruby-on-rails/146350)

<div class="topic-metadata">

**Author:** [@lcyeap](https://www.ruby-forum.com/u/lcyeap)\
**Replies:** 4\
**Last updated:** [August 20, 2008, 9:11am UTC](https://www.ruby-forum.com/t/failed-to-install-ruby-on-rails/146350 "2008-08-20T09:11:16Z")

</div>

Greetings, I am facing problem when installing the rails 2.1.0. i have saved the gem file in the bin folder, but it always come out with the error saying that rails require rake 0.8.1. I try to download the rake gem f…

---

## [Model validation](https://www.ruby-forum.com/t/model-validation/146273)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [August 20, 2008, 9:08am UTC](https://www.ruby-forum.com/t/model-validation/146273 "2008-08-20T09:08:56Z")

</div>

Hi, I don’t understand the validate method inside the model objet, when using the fields are always empty ? class Personne \< ActiveRecord::Base set\_table\_name ‘personnes’ has\_many :emails protected def validate …

---

## [What does script/runner do?](https://www.ruby-forum.com/t/what-does-script-runner-do/146349)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 2\
**Last updated:** [August 20, 2008, 9:00am UTC](https://www.ruby-forum.com/t/what-does-script-runner-do/146349 "2008-08-20T09:00:48Z")

</div>

I’m trying to learn how to schedule jobs. I understand that cron and script/runner is a good choice. But I don’t fully understand script/runner. Why do I need it? Can’t Rails run Ruby anyway?

---

## [RSpec problems on a toy program/script](https://www.ruby-forum.com/t/rspec-problems-on-a-toy-program-script/146253)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 1\
**Last updated:** [August 20, 2008, 7:00am UTC](https://www.ruby-forum.com/t/rspec-problems-on-a-toy-program-script/146253 "2008-08-20T07:00:39Z")

</div>

I’m running WinXP-Pro/SP2 with: • ruby 1.8.6 (2007-09-24 patchlevel 111) \[i386-mswin32\] • RSpec-1.1.4 (build 20080526202855) - BDD for Ruby I posted as http://www.pastie.org/pastes/255594: • BankAccount\_for\_RSpec.…

---

## [Nuby: How to use onKeyPress to call JavaScript?](https://www.ruby-forum.com/t/nuby-how-to-use-onkeypress-to-call-javascript/146213)

<div class="topic-metadata">

**Author:** [@craig](https://www.ruby-forum.com/u/craig)\
**Replies:** 5\
**Last updated:** [August 20, 2008, 5:59am UTC](https://www.ruby-forum.com/t/nuby-how-to-use-onkeypress-to-call-javascript/146213 "2008-08-20T05:59:51Z")

</div>

Hi, I’m new to rails, so please be nice to me :slight\_smile: I’m trying to do some simple JavaScript in Rails but am having a lot of difficulty getting it to work. Basically, I have a form with a text field. When th…

---

## [New comer](https://www.ruby-forum.com/t/new-comer/146259)

<div class="topic-metadata">

**Author:** [@redster](https://www.ruby-forum.com/u/redster)\
**Replies:** 3\
**Last updated:** [August 20, 2008, 5:44am UTC](https://www.ruby-forum.com/t/new-comer/146259 "2008-08-20T05:44:03Z")

</div>

Hi all, i am new comer for ruby on rails. so please any body help to me… 1.how to create one form and validation 2.how to connect with mysql and insert data regards M.Murali

---

## [A -\> B -\> C... A has\_many C's?](https://www.ruby-forum.com/t/a-b-c-a-has-many-cs/146274)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 4\
**Last updated:** [August 20, 2008, 1:54am UTC](https://www.ruby-forum.com/t/a-b-c-a-has-many-cs/146274 "2008-08-20T01:54:48Z")

</div>

Hi… I am sure this is a newb question but, here goes. I have three models: Genre - can have many subgenres Subgenre - only one genre, can have many books Book - can belong to many subgenres Genre: has\_many Subgenre…

---

## [Bug in String.to\_datetime (or... soap4r doesn't parse dates correctly when used with rails)](https://www.ruby-forum.com/t/bug-in-string-to-datetime-or-soap4r-doesnt-parse-dates-correctly-when-used-with-rails/146325)

<div class="topic-metadata">

**Author:** [@Spock](https://www.ruby-forum.com/u/Spock)\
**Replies:** 0\
**Last updated:** [August 20, 2008, 1:04am UTC](https://www.ruby-forum.com/t/bug-in-string-to-datetime-or-soap4r-doesnt-parse-dates-correctly-when-used-with-rails/146325 "2008-08-20T01:04:26Z")

</div>

Rails ActiveSupport adds a to\_datetime function to the String class. But, for some reason, it doesn’t handle timezone specifications in date strings, nor does it handle second fractions. For example, one consequence o…

---

## [Script.aculo.us drag and drop problem](https://www.ruby-forum.com/t/script-aculo-us-drag-and-drop-problem/146323)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 0\
**Last updated:** [August 20, 2008, 12:36am UTC](https://www.ruby-forum.com/t/script-aculo-us-drag-and-drop-problem/146323 "2008-08-20T00:36:56Z")

</div>

Hello, I am using Script.aculo.us helpers “drop\_receiving\_element” and I get a “calling against a nil object” and a NoMethodError exception. I used the same code un Rails 1.2.6 and it works: the drag code is: Code :…

---

## [MultiparameterAssignmentErrors when feeding a bogus day/month combination into a date\_select--how be](https://www.ruby-forum.com/t/multiparameterassignmenterrors-when-feeding-a-bogus-day-month-combination-into-a-date-select-how-be/146296)

<div class="topic-metadata">

**Author:** [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Replies:** 1\
**Last updated:** [August 19, 2008, 11:06pm UTC](https://www.ruby-forum.com/t/multiparameterassignmenterrors-when-feeding-a-bogus-day-month-combination-into-a-date-select-how-be/146296 "2008-08-19T23:06:42Z")

</div>

Hey All, My user just got bit by this problem (in my rails version 2.0.2 app): http://railsmanual.com/class/ActiveRecord::MultiparameterAssignmentErrors That is, if you use the date\_select generated list boxes to sele…

---

## [Problem in check\_box](https://www.ruby-forum.com/t/problem-in-check-box/146293)

<div class="topic-metadata">

**Author:** [@leonard2](https://www.ruby-forum.com/u/leonard2)\
**Replies:** 4\
**Last updated:** [August 19, 2008, 10:30pm UTC](https://www.ruby-forum.com/t/problem-in-check-box/146293 "2008-08-19T22:30:27Z")

</div>

hello list I have this check\_box in my code \<% for mercado in @merca %\> \<%= check\_box “mercado”, “nombre”, {:value=\>mercado.id, :name=\>mercado.nombre}, :onchange =\> remote\_function(:url =\> {:action =\> “find2”}, :wit…

---

## [Rails + PHP REST web service security](https://www.ruby-forum.com/t/rails-php-rest-web-service-security/146305)

<div class="topic-metadata">

**Author:** [@peter](https://www.ruby-forum.com/u/peter)\
**Replies:** 0\
**Last updated:** [August 19, 2008, 10:28pm UTC](https://www.ruby-forum.com/t/rails-php-rest-web-service-security/146305 "2008-08-19T22:28:37Z")

</div>

Hey guys, I want to ensure secure communication between our rails application and a REST web service on an external server running php. What are some of the ways of accomplishing this? Do we need to use ssl to encryp…

---

## [Can you help me solve a potential performance problem with Ferret and view counts](https://www.ruby-forum.com/t/can-you-help-me-solve-a-potential-performance-problem-with-ferret-and-view-counts/145905)

<div class="topic-metadata">

**Author:** [@jamie](https://www.ruby-forum.com/u/jamie)\
**Replies:** 6\
**Last updated:** [August 19, 2008, 9:52pm UTC](https://www.ruby-forum.com/t/can-you-help-me-solve-a-potential-performance-problem-with-ferret-and-view-counts/145905 "2008-08-19T21:52:50Z")

</div>

I am currently using Ferret and the DRb server for search and can forsee a potential problem which I am hoping some of you good folks can help me with. I currently have a view count field associated with a record, whi…

---

## [Removing the path\_prefix from a route](https://www.ruby-forum.com/t/removing-the-path-prefix-from-a-route/91731)

<div class="topic-metadata">

**Author:** [@kuma](https://www.ruby-forum.com/u/kuma)\
**Replies:** 1\
**Last updated:** [August 19, 2008, 9:04pm UTC](https://www.ruby-forum.com/t/removing-the-path-prefix-from-a-route/91731 "2008-08-19T21:04:30Z")

</div>

Let’s say I have a resource defined… map.resources :user do |user| user.resource :profile user.resource :foo end I’ve got everything working so to\_param spits out the username instead of the id, so now I have urls…

---

## [Random Closed Stream error](https://www.ruby-forum.com/t/random-closed-stream-error/138693)

<div class="topic-metadata">

**Author:** [@soroe](https://www.ruby-forum.com/u/soroe)\
**Replies:** 4\
**Last updated:** [August 19, 2008, 9:04pm UTC](https://www.ruby-forum.com/t/random-closed-stream-error/138693 "2008-08-19T21:04:14Z")

</div>

Hey Guys, I’ve been getting a random ‘closed stream’ exception with my app. I can’t reliably duplicate the problem. It seems to crop up every 20th request or so… A snippet from the call-stack appears below. If I hi…

---

## [Peculiar and regular rails crash](https://www.ruby-forum.com/t/peculiar-and-regular-rails-crash/146292)

<div class="topic-metadata">

**Author:** [@soroe](https://www.ruby-forum.com/u/soroe)\
**Replies:** 0\
**Last updated:** [August 19, 2008, 8:55pm UTC](https://www.ruby-forum.com/t/peculiar-and-regular-rails-crash/146292 "2008-08-19T20:55:19Z")

</div>

Hey Guys, Has anyone had issues with rails crashing regularly with the error message: regular expression too big: /(=|?|\_before\_type\_cast|\_changed?|\_change|\_will\_change!|\_was|\_changed?|\_change|\_will\_change!|\_was|\_cha…

---

## [Rendering rjs after redirect](https://www.ruby-forum.com/t/rendering-rjs-after-redirect/146149)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [August 19, 2008, 8:26pm UTC](https://www.ruby-forum.com/t/rendering-rjs-after-redirect/146149 "2008-08-19T20:26:55Z")

</div>

Hello all, Using scaffolded code, I create a new rails object and, when successful, forward to show, at which point I display a notice with the flash indicating all is well. Now, I want that flash notice to fade awa…

---

## [ActiveRecord column with reserved name 'class'](https://www.ruby-forum.com/t/activerecord-column-with-reserved-name-class/125705)

<div class="topic-metadata">

**Author:** [@lofye](https://www.ruby-forum.com/u/lofye)\
**Replies:** 4\
**Last updated:** [August 19, 2008, 7:38pm UTC](https://www.ruby-forum.com/t/activerecord-column-with-reserved-name-class/125705 "2008-08-19T19:38:24Z")

</div>

I have a legacy database with a column named ‘class’ which is causing Rails problems. Renaming the column isn’t an option and the workarounds I’ve seen so far don’t suit. I’m running rails 2.0.2 and an example of the …

---

## [Session id changing for each request](https://www.ruby-forum.com/t/session-id-changing-for-each-request/146243)

<div class="topic-metadata">

**Author:** [@jamie](https://www.ruby-forum.com/u/jamie)\
**Replies:** 5\
**Last updated:** [August 19, 2008, 7:17pm UTC](https://www.ruby-forum.com/t/session-id-changing-for-each-request/146243 "2008-08-19T19:17:40Z")

</div>

I posted this a little while back, but was unable to resolve the problem, so keeping my fingers crossed that other have some insight… Some percentage of users are unable to login as it appears the rails session ID cha…

---

## [Multiple application using apache and mongrel cluster](https://www.ruby-forum.com/t/multiple-application-using-apache-and-mongrel-cluster/146219)

<div class="topic-metadata">

**Author:** [@simi](https://www.ruby-forum.com/u/simi)\
**Replies:** 3\
**Last updated:** [August 19, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/multiple-application-using-apache-and-mongrel-cluster/146219 "2008-08-19T18:24:14Z")

</div>

Hi, I need to deploy two rails applications using apache and mongrel cluster. I have modified VirtualHost and configured mongrel cluster for a single application http://mydomain.com and it works fine. The administra…

---

## [Using ActionWebService from PHP](https://www.ruby-forum.com/t/using-actionwebservice-from-php/146180)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 3\
**Last updated:** [August 19, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/using-actionwebservice-from-php/146180 "2008-08-19T18:16:35Z")

</div>

I have an existing Rails API using ActionWebService that is used for billing. I have been given a site written in PHP that accepts billing information and now needs to submit this information to the ActionWebService A…

---

## [Rails & mysql](https://www.ruby-forum.com/t/rails-mysql/146258)

<div class="topic-metadata">

**Author:** [@blueshadow](https://www.ruby-forum.com/u/blueshadow)\
**Replies:** 4\
**Last updated:** [August 19, 2008, 5:03pm UTC](https://www.ruby-forum.com/t/rails-mysql/146258 "2008-08-19T17:03:50Z")

</div>

Hello! It’s possible to run mySql whit rails this days? Pleas tel me all process on windows xp!

---

## [Find(:last) just not working!](https://www.ruby-forum.com/t/find-last-just-not-working/146248)

<div class="topic-metadata">

**Author:** [@brads](https://www.ruby-forum.com/u/brads)\
**Replies:** 23\
**Last updated:** [August 19, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/find-last-just-not-working/146248 "2008-08-19T16:49:24Z")

</div>

hi i have just upgraded rails to the most recent version, and find(:last) is still not working! any ideas? heres the code in my controller: @testrun = Testrun.find(:last) and heres the code in the view for test pur…

---

## [Set activated\_at only when active is updated to true](https://www.ruby-forum.com/t/set-activated-at-only-when-active-is-updated-to-true/146257)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 4\
**Last updated:** [August 19, 2008, 4:45pm UTC](https://www.ruby-forum.com/t/set-activated-at-only-when-active-is-updated-to-true/146257 "2008-08-19T16:45:52Z")

</div>

I’ve just added a couple of fields to one of our models (Resource): active (boolean) and activated\_at (datetime). I want to set it up so that if i make a restful call to update, and set active to true, ie “/resources…

---

## [Restful\_authentication+ personnalized database session store](https://www.ruby-forum.com/t/restful-authentication-personnalized-database-session-store/146102)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 2\
**Last updated:** [August 19, 2008, 4:14pm UTC](https://www.ruby-forum.com/t/restful-authentication-personnalized-database-session-store/146102 "2008-08-19T16:14:04Z")

</div>

I’m using restful\_authentication and database session store with rails 2.1.0. It works well and I’m trying too add the user\_id in the session table. For that, I have created app/models/session.rb and I have set the u…

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

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