# Rails

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

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

---

## [Restarting apache web server](https://www.ruby-forum.com/t/restarting-apache-web-server/189475)

<div class="topic-metadata">

**Author:** [@raghu\_muni](https://www.ruby-forum.com/u/raghu_muni)\
**Replies:** 6\
**Last updated:** [June 1, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/restarting-apache-web-server/189475 "2010-06-01T16:38:03Z")

</div>

Hi, I’m following this guide RubyOnRails - Community Help Wiki to install ror and configure this with apache…I’m facing a problem when restarting the apache2 web server following some steps. Now you should point apa…

---

## [Submitting form in utf\_8](https://www.ruby-forum.com/t/submitting-form-in-utf-8/189480)

<div class="topic-metadata">

**Author:** [@Mlle](https://www.ruby-forum.com/u/Mlle)\
**Replies:** 0\
**Last updated:** [June 1, 2010, 4:36pm UTC](https://www.ruby-forum.com/t/submitting-form-in-utf-8/189480 "2010-06-01T16:36:30Z")

</div>

How can I ensure that my form submits with characters in utf-8? The params hash is showing as below though the part “d’\\xC3\\xA9nergie” should say “d’énergie” The text in the input field is set by means of javascript f…

---

## [Generating Dynamic text box](https://www.ruby-forum.com/t/generating-dynamic-text-box/189457)

<div class="topic-metadata">

**Author:** [@venu1234](https://www.ruby-forum.com/u/venu1234)\
**Replies:** 1\
**Last updated:** [June 1, 2010, 4:18pm UTC](https://www.ruby-forum.com/t/generating-dynamic-text-box/189457 "2010-06-01T16:18:31Z")

</div>

\#Project controller class ProjectsController \< ApplicationController def index @projects = Project.find(:all) end def new @project = Project.new @project.tasks.build end def create @project = Project.new(params…

---

## [Spawning sleeper threads... good idea? bad?](https://www.ruby-forum.com/t/spawning-sleeper-threads-good-idea-bad/189478)

<div class="topic-metadata">

**Author:** [@Danimal](https://www.ruby-forum.com/u/Danimal)\
**Replies:** 0\
**Last updated:** [June 1, 2010, 4:13pm UTC](https://www.ruby-forum.com/t/spawning-sleeper-threads-good-idea-bad/189478 "2010-06-01T16:13:39Z")

</div>

Hello! I am building an application that requires users to complete a short tutorial after registration in order to fully activate their account. When a user registers, they get an email saying something like “thanks …

---

## [Validation on nested models](https://www.ruby-forum.com/t/validation-on-nested-models/189471)

<div class="topic-metadata">

**Author:** [@Mlle](https://www.ruby-forum.com/u/Mlle)\
**Replies:** 0\
**Last updated:** [June 1, 2010, 2:49pm UTC](https://www.ruby-forum.com/t/validation-on-nested-models/189471 "2010-06-01T14:49:53Z")

</div>

this validation in my model only works for the first nested model. Why is that? def treatment\_must\_have\_preptype errors.add(:preptype, I18n.translate(‘activerecord.errors.messages.nestedTrempty’)) if treatment\_prept…

---

## [How to update counter\_cache when updating a model?](https://www.ruby-forum.com/t/how-to-update-counter-cache-when-updating-a-model/189467)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 0\
**Last updated:** [June 1, 2010, 2:07pm UTC](https://www.ruby-forum.com/t/how-to-update-counter-cache-when-updating-a-model/189467 "2010-06-01T14:07:44Z")

</div>

I have a very simple relationship - a container has many items containers(title, items\_count) items(container\_id, title) class Item \< ActiveRecord::Base belongs\_to :container, :counter\_cache =\> true end My views/it…

---

## [Can not call RJS and throwing error](https://www.ruby-forum.com/t/can-not-call-rjs-and-throwing-error/189466)

<div class="topic-metadata">

**Author:** [@venu1234](https://www.ruby-forum.com/u/venu1234)\
**Replies:** 0\
**Last updated:** [June 1, 2010, 1:57pm UTC](https://www.ruby-forum.com/t/can-not-call-rjs-and-throwing-error/189466 "2010-06-01T13:57:41Z")

</div>

I created controllers of project and task and appropraite html pages for them and created two partials of fields and tasks and having link in fields partial, when i call it it is throwing RJS error, please find the co…

---

## [Chat app, Caching? Observe?](https://www.ruby-forum.com/t/chat-app-caching-observe/189425)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 3\
**Last updated:** [June 1, 2010, 1:35pm UTC](https://www.ruby-forum.com/t/chat-app-caching-observe/189425 "2010-06-01T13:35:23Z")

</div>

Hi, I am developping a little chat application with rails. On my chat page I make ajax request every 10 seconds to check if there are news messages. I think if I keep this thing with a lot of user my performance will …

---

## [Great for people looking for contract Rails / Ruby work](https://www.ruby-forum.com/t/great-for-people-looking-for-contract-rails-ruby-work/189460)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 0\
**Last updated:** [June 1, 2010, 12:26pm UTC](https://www.ruby-forum.com/t/great-for-people-looking-for-contract-rails-ruby-work/189460 "2010-06-01T12:26:28Z")

</div>

I saw this and thought it was a pretty cool idea, thought I would voice it… It seems like a nice addition to the community:

---

## [Undefined method \`add\_to\_rails\_paths' for #\<Module:0x3f72698](https://www.ruby-forum.com/t/undefined-method-add-to-rails-paths-for-module-0x3f72698/189458)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 0\
**Last updated:** [June 1, 2010, 11:52am UTC](https://www.ruby-forum.com/t/undefined-method-add-to-rails-paths-for-module-0x3f72698/189458 "2010-06-01T11:52:43Z")

</div>

Hi, I have added “config.gem “pdf-writer”, :version=\>‘1.1.8’” in my application’s environment.rb so that I can use “rake gems:install” for installing all gems. My problem is whenever I am running the command “rake ge…

---

## [Error messages](https://www.ruby-forum.com/t/error-messages/189450)

<div class="topic-metadata">

**Author:** [@Mlle](https://www.ruby-forum.com/u/Mlle)\
**Replies:** 1\
**Last updated:** [June 1, 2010, 11:34am UTC](https://www.ruby-forum.com/t/error-messages/189450 "2010-06-01T11:34:22Z")

</div>

I use validates\_presence\_of in my model and I use the yml file to have the error message translate into: Veuillez vérifier les champs suivants : \* Material doit être rempli(e) But how can I translate the name of the …

---

## [File links in browser](https://www.ruby-forum.com/t/file-links-in-browser/189411)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 7\
**Last updated:** [June 1, 2010, 11:31am UTC](https://www.ruby-forum.com/t/file-links-in-browser/189411 "2010-06-01T11:31:26Z")

</div>

Basically, if i open an txt file in firefox using “File \> Open file” then file is opening perfectly. But if i try to open a txt file from a file link on a webpage “file:///path” it is not going anywhere? Can i fix tha…

---

## [Partial Error](https://www.ruby-forum.com/t/partial-error/189456)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 0\
**Last updated:** [June 1, 2010, 10:45am UTC](https://www.ruby-forum.com/t/partial-error/189456 "2010-06-01T10:45:47Z")

</div>

I have a home controller and a Search controller. I would like to include the search form in the content of the home controller so I am doing this… \<%#= render :partial =\> “/searches/form”, :object =\> Search.new, :as …

---

## [Constant didn't update?](https://www.ruby-forum.com/t/constant-didnt-update/189432)

<div class="topic-metadata">

**Author:** [@minka](https://www.ruby-forum.com/u/minka)\
**Replies:** 4\
**Last updated:** [June 1, 2010, 10:41am UTC](https://www.ruby-forum.com/t/constant-didnt-update/189432 "2010-06-01T10:41:06Z")

</div>

A very puzzling thing has happened. Any ideas on this? I have two rates for this service I provide. 5 cents per line 10 cents per line I updated the latter to 20 cents per line, and made other changes to my site. I…

---

## [Active Directory in Ruby on rails](https://www.ruby-forum.com/t/active-directory-in-ruby-on-rails/189445)

<div class="topic-metadata">

**Author:** [@periyasamy](https://www.ruby-forum.com/u/periyasamy)\
**Replies:** 0\
**Last updated:** [June 1, 2010, 7:56am UTC](https://www.ruby-forum.com/t/active-directory-in-ruby-on-rails/189445 "2010-06-01T07:56:35Z")

</div>

Hi, I need to create a “Active directory authentication on linux machine” using ruby on rails. Can anybody have any idea please? Regards, Periyasamy.R

---

## [Freezing non-rails gems](https://www.ruby-forum.com/t/freezing-non-rails-gems/189422)

<div class="topic-metadata">

**Author:** [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Replies:** 2\
**Last updated:** [June 1, 2010, 6:29am UTC](https://www.ruby-forum.com/t/freezing-non-rails-gems/189422 "2010-06-01T06:29:36Z")

</div>

Hello, What is the 2010 way to get my non-rails gems frozen into my app? TIA! a.

---

## [ROR Sample applications for training](https://www.ruby-forum.com/t/ror-sample-applications-for-training/189413)

<div class="topic-metadata">

**Author:** [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Replies:** 4\
**Last updated:** [May 31, 2010, 7:37pm UTC](https://www.ruby-forum.com/t/ror-sample-applications-for-training/189413 "2010-05-31T19:37:56Z")

</div>

Hi all I am currently looking for any ROR sample applciation used for training. I am in the processes of collecting requirements/analyzing/designing a web site that will provide training

---

## [Rails 3 timezone error](https://www.ruby-forum.com/t/rails-3-timezone-error/189419)

<div class="topic-metadata">

**Author:** [@JSchwindt](https://www.ruby-forum.com/u/JSchwindt)\
**Replies:** 0\
**Last updated:** [May 31, 2010, 5:44pm UTC](https://www.ruby-forum.com/t/rails-3-timezone-error/189419 "2010-05-31T17:44:57Z")

</div>

I am struggling with time zone support in Rails 3 beta and I would like to know if it is a bug or if I am doing something wrong. He is the problem: Time.zone = ‘Madrid’ # it is GMT+2 =\> “Madrid” c = Comment.new =\>…

---

## [Multiple calls of validate() method in composed model by ActiveRecord, why?](https://www.ruby-forum.com/t/multiple-calls-of-validate-method-in-composed-model-by-activerecord-why/189405)

<div class="topic-metadata">

**Author:** [@msmsms](https://www.ruby-forum.com/u/msmsms)\
**Replies:** 1\
**Last updated:** [May 31, 2010, 5:44pm UTC](https://www.ruby-forum.com/t/multiple-calls-of-validate-method-in-composed-model-by-activerecord-why/189405 "2010-05-31T17:44:22Z")

</div>

Hi, thank you for reading my post. When I went trough my logs last time, I noticed that ActiveRecord calls the validate() method of one of my models multiple times. The concerned model acts like a linked list (no plu…

---

## [How to correctly load attachment\_fu with an initializer?](https://www.ruby-forum.com/t/how-to-correctly-load-attachment-fu-with-an-initializer/189415)

<div class="topic-metadata">

**Author:** [@rubybox](https://www.ruby-forum.com/u/rubybox)\
**Replies:** 0\
**Last updated:** [May 31, 2010, 4:56pm UTC](https://www.ruby-forum.com/t/how-to-correctly-load-attachment-fu-with-an-initializer/189415 "2010-05-31T16:56:56Z")

</div>

I seem to be getting 2 errors, Attachment\_fu properties are not set S3 is complaining ( Im not using it) S3: Processing ApplicationController#index (for 127.0.0.1 at 2010-05-31 16:49:10) \[GET\] NameError (undefined …

---

## [TCPSocket.new(host,port).readline hangs on windows :(](https://www.ruby-forum.com/t/tcpsocket-new-host-port-readline-hangs-on-windows/189407)

<div class="topic-metadata">

**Author:** [@hostep](https://www.ruby-forum.com/u/hostep)\
**Replies:** 0\
**Last updated:** [May 31, 2010, 1:51pm UTC](https://www.ruby-forum.com/t/tcpsocket-new-host-port-readline-hangs-on-windows/189407 "2010-05-31T13:51:53Z")

</div>

Hi Guys I am starting a new thread as it seems my gripe isnt to do with Juggernaut but with TCPSocket - which is used by Juggernaut. Turns out that the thing that actually hangs up in Juggernaut after x (130/1500/160…

---

## [Has\_many and has\_and\_belongs\_to conflit](https://www.ruby-forum.com/t/has-many-and-has-and-belongs-to-conflit/189399)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 2\
**Last updated:** [May 31, 2010, 11:39am UTC](https://www.ruby-forum.com/t/has-many-and-has-and-belongs-to-conflit/189399 "2010-05-31T11:39:34Z")

</div>

Hi, I have 2 models: User and Article. I have this relationship: User has many articles (and Article belongs to user) User has and belongs to many articles (and Article habtm users) But this is tricky because of: cu…

---

## [Trying to make new instance variables for each item in render :partial](https://www.ruby-forum.com/t/trying-to-make-new-instance-variables-for-each-item-in-render-partial/189395)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 1\
**Last updated:** [May 31, 2010, 10:28am UTC](https://www.ruby-forum.com/t/trying-to-make-new-instance-variables-for-each-item-in-render-partial/189395 "2010-05-31T10:28:16Z")

</div>

I have a list of people I am using as the collection for a render :partial. This is for a list of users that is being made into a pdf. I need to do 3 find calls to find out their attendance for the last 3 years. The o…

---

## [Change the column name field in error message](https://www.ruby-forum.com/t/change-the-column-name-field-in-error-message/189351)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 2\
**Last updated:** [May 31, 2010, 10:20am UTC](https://www.ruby-forum.com/t/change-the-column-name-field-in-error-message/189351 "2010-05-31T10:20:39Z")

</div>

Hi, When an error is display, it first show the column concerned. Does someone knows how to change the display column name? Greg

---

## [Does Rails 3.0.0 beta3 work with ruby 1.9.1 on Windows XP?](https://www.ruby-forum.com/t/does-rails-3-0-0-beta3-work-with-ruby-1-9-1-on-windows-xp/197198)

<div class="topic-metadata">

**Author:** [@daveh](https://www.ruby-forum.com/u/daveh)\
**Replies:** 1\
**Last updated:** [May 31, 2010, 10:13am UTC](https://www.ruby-forum.com/t/does-rails-3-0-0-beta3-work-with-ruby-1-9-1-on-windows-xp/197198 "2010-05-31T10:13:37Z")

</div>

Does Rails 3.0.0 beta3 work with ruby 1.9.1 on Windows XP? It does not work for me, the sample program crashes with no error message.

---

## [Rails 3 UJS and delete action](https://www.ruby-forum.com/t/rails-3-ujs-and-delete-action/189400)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 31, 2010, 9:52am UTC](https://www.ruby-forum.com/t/rails-3-ujs-and-delete-action/189400 "2010-05-31T09:52:33Z")

</div>

Hi, I ve got a question concerning delete actions in the new rails 3 world with unobtrusive javascript. How may I perform an “ajax” delete in a list of products. if attribute data-method is specified rails.js handleM…

---

## [\[Rails 3\] Path helper not working as expected with form\_for](https://www.ruby-forum.com/t/rails-3-path-helper-not-working-as-expected-with-form-for/189390)

<div class="topic-metadata">

**Author:** [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Replies:** 1\
**Last updated:** [May 31, 2010, 9:40am UTC](https://www.ruby-forum.com/t/rails-3-path-helper-not-working-as-expected-with-form-for/189390 "2010-05-31T09:40:16Z")

</div>

Hi there, I can’t seem to get form\_for to work correctly with the URL I’m providing for a set of nested resources. Here’s what I’m doing in routes.rb: resources :threads do resources :messages end And then I’ve g…

---

## [Deep\_merge! issue](https://www.ruby-forum.com/t/deep-merge-issue/189394)

<div class="topic-metadata">

**Author:** [@lo\_pan](https://www.ruby-forum.com/u/lo_pan)\
**Replies:** 0\
**Last updated:** [May 31, 2010, 6:44am UTC](https://www.ruby-forum.com/t/deep-merge-issue/189394 "2010-05-31T06:44:06Z")

</div>

Hi All, The i18n gem has a deep\_merge! method defined, but so have rails 2.3.x and rails 3, and all these implementations differ and have different behavior. I was wondering if all implementations should be consolidat…

---

## [Why was overwrite\_params deprecated in Rails 3?](https://www.ruby-forum.com/t/why-was-overwrite-params-deprecated-in-rails-3/189287)

<div class="topic-metadata">

**Author:** [@Ryan\_Michael](https://www.ruby-forum.com/u/Ryan_Michael)\
**Replies:** 2\
**Last updated:** [May 30, 2010, 11:39pm UTC](https://www.ruby-forum.com/t/why-was-overwrite-params-deprecated-in-rails-3/189287 "2010-05-30T23:39:47Z")

</div>

As far as I can tell there’s no ‘preferred’ way to do this instead of using overwrite\_params and this is extrememly usefuly in situations where it’s hard to know exactly which parameters will be set in a view (for ins…

---

## [Automatically decrement value each day](https://www.ruby-forum.com/t/automatically-decrement-value-each-day/189379)

<div class="topic-metadata">

**Author:** [@beckyrussoniello](https://www.ruby-forum.com/u/beckyrussoniello)\
**Replies:** 5\
**Last updated:** [May 30, 2010, 11:26pm UTC](https://www.ruby-forum.com/t/automatically-decrement-value-each-day/189379 "2010-05-30T23:26:18Z")

</div>

I have a Person model with a points attribute. For the most part, points values will be incremented and decremented via user votes. However, I’d also like to decrement a Person’s points by half a point each day. How…

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

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