# Rails

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

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

---

## [Storing Ruby expressions to execute later](https://www.ruby-forum.com/t/storing-ruby-expressions-to-execute-later/170051)

<div class="topic-metadata">

**Author:** [@tashfeen.ekram](https://www.ruby-forum.com/u/tashfeen.ekram)\
**Replies:** 1\
**Last updated:** [June 11, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/storing-ruby-expressions-to-execute-later/170051 "2009-06-11T18:28:24Z")

</div>

Is there a way to store rb expression so that can be interpreted later. For example, i store as a string for example in my db “3+2” and then at a later time i would like to execute it at future time. I am allowing my …

---

## [CPU Time - ActiveRecord](https://www.ruby-forum.com/t/cpu-time-activerecord/170047)

<div class="topic-metadata">

**Author:** [@bruno](https://www.ruby-forum.com/u/bruno)\
**Replies:** 1\
**Last updated:** [June 11, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/cpu-time-activerecord/170047 "2009-06-11T18:25:26Z")

</div>

HI, How i get CPUTime to populate a object from a Entity class ? Thanks, – Bruno S. Dumont msn: removed\_email\_address@domain.invalid Fortaleza - Ce, Brasil

---

## [Parsing big XML files - memory issue](https://www.ruby-forum.com/t/parsing-big-xml-files-memory-issue/170019)

<div class="topic-metadata">

**Author:** [@PierreW](https://www.ruby-forum.com/u/PierreW)\
**Replies:** 4\
**Last updated:** [June 11, 2009, 6:24pm UTC](https://www.ruby-forum.com/t/parsing-big-xml-files-memory-issue/170019 "2009-06-11T18:24:16Z")

</div>

Hello, I need to parse two big XML files in a row (30+MB each). I have tried both REXML and Hpricot. They do work. Thing is, with both libraries, the parsing of each file takes a huge amount of memory: more than 700M…

---

## [Protect\_from\_forgery doesnt protect from forgery](https://www.ruby-forum.com/t/protect-from-forgery-doesnt-protect-from-forgery/169884)

<div class="topic-metadata">

**Author:** [@c\_dekker](https://www.ruby-forum.com/u/c_dekker)\
**Replies:** 3\
**Last updated:** [June 11, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/protect-from-forgery-doesnt-protect-from-forgery/169884 "2009-06-11T18:13:40Z")

</div>

Maybe I am grasping the full usage of this protect\_from\_forgery function, but it does not seem to work for me. Imagine the following: A simple website with a user that needs to log in to do certain stuff and a closed …

---

## [How to display categorized pages in the most effective way?](https://www.ruby-forum.com/t/how-to-display-categorized-pages-in-the-most-effective-way/169885)

<div class="topic-metadata">

**Author:** [@emmek](https://www.ruby-forum.com/u/emmek)\
**Replies:** 2\
**Last updated:** [June 11, 2009, 6:05pm UTC](https://www.ruby-forum.com/t/how-to-display-categorized-pages-in-the-most-effective-way/169885 "2009-06-11T18:05:38Z")

</div>

I am looking for the most effective way to display categorized pages. Page model: acts\_as\_tree belongs\_to :theme (has attribute “title”) Theme model: has\_many :pages (has attribute “name”) I’d like to display all…

---

## [Need help with assert\_select semantics](https://www.ruby-forum.com/t/need-help-with-assert-select-semantics/170039)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 1\
**Last updated:** [June 11, 2009, 5:38pm UTC](https://www.ruby-forum.com/t/need-help-with-assert-select-semantics/170039 "2009-06-11T17:38:21Z")

</div>

I have this type of table row generated in a view: … CAD USD 2009-04-05 TEST 1.184273 features test … There are many instances of dorex\_rate\_line and I wish to select only those that also…

---

## [Scaffold and links created](https://www.ruby-forum.com/t/scaffold-and-links-created/168186)

<div class="topic-metadata">

**Author:** [@bandejapaisa](https://www.ruby-forum.com/u/bandejapaisa)\
**Replies:** 5\
**Last updated:** [June 11, 2009, 4:00pm UTC](https://www.ruby-forum.com/t/scaffold-and-links-created/168186 "2009-06-11T16:00:51Z")

</div>

I used scaffold command generate scaffold User username:string password:string email:string validation\_code:string validated:boolean and when i go to http://localhost:3000/users/ i get this error: undefined local va…

---

## [Rails Hosting Questions](https://www.ruby-forum.com/t/rails-hosting-questions/169798)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 25\
**Last updated:** [June 11, 2009, 3:33pm UTC](https://www.ruby-forum.com/t/rails-hosting-questions/169798 "2009-06-11T15:33:34Z")

</div>

Hi everyone, I use Hostgator as my hosting provider and I checked out the versions of the apps they are running: Linux CentOS: 5.3 Ruby: 1.8.5 Rails: 2.3.2 MySQL: 5.1.30 I’ve been programming on a windows box but …

---

## [Cannot open database under Passenger](https://www.ruby-forum.com/t/cannot-open-database-under-passenger/169986)

<div class="topic-metadata">

**Author:** [@mk27](https://www.ruby-forum.com/u/mk27)\
**Replies:** 5\
**Last updated:** [June 11, 2009, 3:28pm UTC](https://www.ruby-forum.com/t/cannot-open-database-under-passenger/169986 "2009-06-11T15:28:57Z")

</div>

After switching to passenger from WEBbrick I keep getting “attempt to write to read-only database”, so I chown’d the sqlite file apache.apache and chmod’d 666, now I get “unable to open database file”? -MK

---

## [DRY (don't repeat yourself) way / Hook to Activerecord object (to store IP address on every object](https://www.ruby-forum.com/t/dry-dont-repeat-yourself-way-hook-to-activerecord-object-to-store-ip-address-on-every-object/169803)

<div class="topic-metadata">

**Author:** [@chris](https://www.ruby-forum.com/u/chris)\
**Replies:** 11\
**Last updated:** [June 11, 2009, 3:20pm UTC](https://www.ruby-forum.com/t/dry-dont-repeat-yourself-way-hook-to-activerecord-object-to-store-ip-address-on-every-object/169803 "2009-06-11T15:20:42Z")

</div>

As part of my project, I need to store IP address for every object that was created. User Topic Payment and more… Now all these records have the following attribute in their table called “ip\_address\_on\_create”. O…

---

## [Multiple dynamically generated form fields](https://www.ruby-forum.com/t/multiple-dynamically-generated-form-fields/170031)

<div class="topic-metadata">

**Author:** [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Replies:** 0\
**Last updated:** [June 11, 2009, 2:39pm UTC](https://www.ruby-forum.com/t/multiple-dynamically-generated-form-fields/170031 "2009-06-11T14:39:37Z")

</div>

Just wondering what the best “Rails way” to do this would be… I have a form that uses an auto complete text box and a that holds n number of selections from the text box. The is made up of multiple each with the …

---

## [Troubles with polymorphics associations](https://www.ruby-forum.com/t/troubles-with-polymorphics-associations/170029)

<div class="topic-metadata">

**Author:** [@romain-tanguy](https://www.ruby-forum.com/u/romain-tanguy)\
**Replies:** 0\
**Last updated:** [June 11, 2009, 2:39pm UTC](https://www.ruby-forum.com/t/troubles-with-polymorphics-associations/170029 "2009-06-11T14:39:02Z")

</div>

Hello, Since some days, I try to create a dynamic user profiling system. In this system, users can use many fields defined in a list. In these fields, there are ones which admit a scalar value (like firstname or birt…

---

## [Application hanging in production! New Relic Phy Mem Utilization Haywire! Help!](https://www.ruby-forum.com/t/application-hanging-in-production-new-relic-phy-mem-utilization-haywire-help/170025)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 1\
**Last updated:** [June 11, 2009, 2:04pm UTC](https://www.ruby-forum.com/t/application-hanging-in-production-new-relic-phy-mem-utilization-haywire-help/170025 "2009-06-11T14:04:21Z")

</div>

Hi all, My app was doing fairly well in production past couple a months. But past 2 days, its gone off its rocker! Not able to figure out what the problem is. The symptoms are as follows… It first went down when I d…

---

## [Mongrel crashes while running 'exec' through ruby](https://www.ruby-forum.com/t/mongrel-crashes-while-running-exec-through-ruby/170006)

<div class="topic-metadata">

**Author:** [@tahir\_rauf](https://www.ruby-forum.com/u/tahir_rauf)\
**Replies:** 4\
**Last updated:** [June 11, 2009, 11:48am UTC](https://www.ruby-forum.com/t/mongrel-crashes-while-running-exec-through-ruby/170006 "2009-06-11T11:48:56Z")

</div>

Hi All, I have a ruby on rails application and in the controller, I try to run a shell script using exec command like this variable = ‘sh /home/abc.sh’ exec variable But when the control comes at this line, the mon…

---

## [Rest with ruby objects?](https://www.ruby-forum.com/t/rest-with-ruby-objects/169959)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [June 11, 2009, 11:19am UTC](https://www.ruby-forum.com/t/rest-with-ruby-objects/169959 "2009-06-11T11:19:14Z")

</div>

Hello Everyone, Does anybody know how to use rest to deliver non-active record models in rails 2.3.2. I am using flex as a front end for a huge data set and I end to crunch the numbers on the back end before passing …

---

## [Has one assciation insert record question](https://www.ruby-forum.com/t/has-one-assciation-insert-record-question/170015)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 1\
**Last updated:** [June 11, 2009, 11:18am UTC](https://www.ruby-forum.com/t/has-one-assciation-insert-record-question/170015 "2009-06-11T11:18:38Z")

</div>

Dear all I have two model, Event and EventDetail class Event \< ActiveRecord::Base set\_table\_name “ssc\_event” set\_primary\_key “event\_id” has\_one :event\_detail, :class\_name =\> ‘EventDetail’, :foreign\_key =\> ‘event\_id…

---

## [Parsing word docs with ruby on rails](https://www.ruby-forum.com/t/parsing-word-docs-with-ruby-on-rails/170016)

<div class="topic-metadata">

**Author:** [@anandhkumar](https://www.ruby-forum.com/u/anandhkumar)\
**Replies:** 0\
**Last updated:** [June 11, 2009, 11:09am UTC](https://www.ruby-forum.com/t/parsing-word-docs-with-ruby-on-rails/170016 "2009-06-11T11:09:16Z")

</div>

Hi there, Can anyone suggest me in parsing the word docs containing students details such as name etc… with ruby on rails…

---

## [Close popup window?](https://www.ruby-forum.com/t/close-popup-window/170007)

<div class="topic-metadata">

**Author:** [@macwise](https://www.ruby-forum.com/u/macwise)\
**Replies:** 1\
**Last updated:** [June 11, 2009, 10:08am UTC](https://www.ruby-forum.com/t/close-popup-window/170007 "2009-06-11T10:08:53Z")

</div>

I’m new to ruby, and I’m tweaking a plugin. Can you show me how I would close a window upon clicking a submit button? Here’s the code on the xhtml page: \<%= submit\_tag “Save” %\> And the code on the controller.rb…

---

## [Errors with Rails 2.3.2](https://www.ruby-forum.com/t/errors-with-rails-2-3-2/170012)

<div class="topic-metadata">

**Author:** [@ffrancy](https://www.ruby-forum.com/u/ffrancy)\
**Replies:** 1\
**Last updated:** [June 11, 2009, 10:03am UTC](https://www.ruby-forum.com/t/errors-with-rails-2-3-2/170012 "2009-06-11T10:03:00Z")

</div>

Hello everyone! I’ve done a RoR project using NetBeans IDE, JRuby 1.6, mysql, Glassfish V 3 Prelude, ActiveRecord 2.2.2 and Rails 2.2.2 and everything worked. Now I wanted to upgrade Rail’s version to 2.3.2. I downlo…

---

## [Hi folks](https://www.ruby-forum.com/t/hi-folks/169751)

<div class="topic-metadata">

**Author:** [@anandh](https://www.ruby-forum.com/u/anandh)\
**Replies:** 6\
**Last updated:** [June 11, 2009, 9:33am UTC](https://www.ruby-forum.com/t/hi-folks/169751 "2009-06-11T09:33:04Z")

</div>

i m a beginner in ruby on rails… i need a complete a code for the following… 1. To parse a word document containing the students details… 2.i ve to link these details in to database… i…

---

## [Web file manager for Rails?](https://www.ruby-forum.com/t/web-file-manager-for-rails/120400)

<div class="topic-metadata">

**Author:** [@qertoip](https://www.ruby-forum.com/u/qertoip)\
**Replies:** 3\
**Last updated:** [June 11, 2009, 7:38am UTC](https://www.ruby-forum.com/t/web-file-manager-for-rails/120400 "2009-06-11T07:38:22Z")

</div>

Do you know any web file manager done with Rails? Or generic library easy to integrate with RoR? Something like File Navigator http://pfn.sourceforge.net for PHP or FileVista for ASP.NET?

---

## [IRB error message (dyld: NSLinkModule() error)](https://www.ruby-forum.com/t/irb-error-message-dyld-nslinkmodule-error/151855)

<div class="topic-metadata">

**Author:** [@cormacm](https://www.ruby-forum.com/u/cormacm)\
**Replies:** 3\
**Last updated:** [June 11, 2009, 5:49am UTC](https://www.ruby-forum.com/t/irb-error-message-dyld-nslinkmodule-error/151855 "2009-06-11T05:49:33Z")

</div>

Hi folks, I’m new to Rails. I picked up Simply Rails 2 by Patrick Lenz a few weeks ago and I finally sat down to get stuck into it. I have Rails installed on my iMac (OS X Leopard) and I can load up the Rails Welcome …

---

## [Rails looking for partial with .erb extension instead of .html.erb](https://www.ruby-forum.com/t/rails-looking-for-partial-with-erb-extension-instead-of-html-erb/170000)

<div class="topic-metadata">

**Author:** [@hoenth](https://www.ruby-forum.com/u/hoenth)\
**Replies:** 1\
**Last updated:** [June 11, 2009, 4:55am UTC](https://www.ruby-forum.com/t/rails-looking-for-partial-with-erb-extension-instead-of-html-erb/170000 "2009-06-11T04:55:08Z")

</div>

I recently deployed a new version of my application. Unfortunately, I accidentally placed a folder containing two partials in the wrong repository (I had copied them from another application), so when I deployed, they…

---

## [File\_field\_tag : what was the original file name?](https://www.ruby-forum.com/t/file-field-tag-what-was-the-original-file-name/169998)

<div class="topic-metadata">

**Author:** [@robert](https://www.ruby-forum.com/u/robert)\
**Replies:** 0\
**Last updated:** [June 11, 2009, 4:06am UTC](https://www.ruby-forum.com/t/file-field-tag-what-was-the-original-file-name/169998 "2009-06-11T04:06:03Z")

</div>

My site allows users to upload csv files for processing. It all works fine, but on the response I’d like to report something like “Your file abc.csv processed OK”. Unfortunately I cannot seem to find the actual origi…

---

## [Developer + Web Designer available for remote work](https://www.ruby-forum.com/t/developer-web-designer-available-for-remote-work/169899)

<div class="topic-metadata">

**Author:** [@Everton\_JSCarpes](https://www.ruby-forum.com/u/Everton_JSCarpes)\
**Replies:** 6\
**Last updated:** [June 11, 2009, 3:01am UTC](https://www.ruby-forum.com/t/developer-web-designer-available-for-remote-work/169899 "2009-06-11T03:01:04Z")

</div>

Hi, I’m a Brazilian (GMT -3) based Developer, with 3+ years Rails experience, working together with a Designer and looking for a remote work that lead us to new challenges, where we should use our skills to create t…

---

## [Cache-money and background tasks](https://www.ruby-forum.com/t/cache-money-and-background-tasks/169982)

<div class="topic-metadata">

**Author:** [@davis](https://www.ruby-forum.com/u/davis)\
**Replies:** 1\
**Last updated:** [June 11, 2009, 12:30am UTC](https://www.ruby-forum.com/t/cache-money-and-background-tasks/169982 "2009-06-11T00:30:04Z")

</div>

I have been attempting to use cache-money on a new project and ran into a major problem. Normally it seems to be working as advertised but completely falls over when attempting to register a background task with BJ. …

---

## [HAML and SASS - worth the conversion with rails?](https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 7\
**Last updated:** [June 10, 2009, 11:40pm UTC](https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976 "2009-06-10T23:40:17Z")

</div>

Has anyone developed extensive projects with HAML and SASS and is it worth the effort to convert and utilize those markup languages? The reason why I ask is I’m getting ready to dive down into my views and work with C…

---

## [Authenticity token error on Safari and IE6 on Windows](https://www.ruby-forum.com/t/authenticity-token-error-on-safari-and-ie6-on-windows/169958)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 3\
**Last updated:** [June 10, 2009, 9:37pm UTC](https://www.ruby-forum.com/t/authenticity-token-error-on-safari-and-ie6-on-windows/169958 "2009-06-10T21:37:06Z")

</div>

Hi, I cannot log in to my Rails application using Windows and Safari or IE6. Windows + Firefox works, and Safari or Firefox on Osx works also. What in hell is going wrong? I recently switched my app from restful\_auth…

---

## [Deploying with Passenger question](https://www.ruby-forum.com/t/deploying-with-passenger-question/169896)

<div class="topic-metadata">

**Author:** [@calvin](https://www.ruby-forum.com/u/calvin)\
**Replies:** 5\
**Last updated:** [June 10, 2009, 9:05pm UTC](https://www.ruby-forum.com/t/deploying-with-passenger-question/169896 "2009-06-10T21:05:21Z")

</div>

Hi, I followed the instructions for deploying a site with Passenger from the screencast that is on the Phusion Passenger site and it didn’t work. I am using Dreamhost to host my site- could the problem be on their en…

---

## [Add variable in xpath](https://www.ruby-forum.com/t/add-variable-in-xpath/169935)

<div class="topic-metadata">

**Author:** [@lecielbleu](https://www.ruby-forum.com/u/lecielbleu)\
**Replies:** 2\
**Last updated:** [June 10, 2009, 8:27pm UTC](https://www.ruby-forum.com/t/add-variable-in-xpath/169935 "2009-06-10T20:27:49Z")

</div>

hi , i cant succeed add variable in xpath (libxml) brand = “037” xpath = “//Root/Stk\[@Category=‘601’ and @Brand=#{brand}\]” stack = node.find(xpath) i used #{brand} but doesnt work

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

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