# Rails

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

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

---

## [Phusion Passenger Version Check](https://www.ruby-forum.com/t/phusion-passenger-version-check/153852)

<div class="topic-metadata">

**Author:** [@perezda](https://www.ruby-forum.com/u/perezda)\
**Replies:** 2\
**Last updated:** [November 23, 2008, 1:14am UTC](https://www.ruby-forum.com/t/phusion-passenger-version-check/153852 "2008-11-23T01:14:21Z")

</div>

Hello, Sry if this sounds stupid, but how do I check to see what version of phussion passenger I am running, I did a recent upgrade and want to make sure the new version is in use. Thanks.

---

## [Search dates by params](https://www.ruby-forum.com/t/search-dates-by-params/153905)

<div class="topic-metadata">

**Author:** [@lucy](https://www.ruby-forum.com/u/lucy)\
**Replies:** 1\
**Last updated:** [November 22, 2008, 11:08pm UTC](https://www.ruby-forum.com/t/search-dates-by-params/153905 "2008-11-22T23:08:30Z")

</div>

Hi, all Now I am doing “Hotel” website where users can select room and arrival and leave dates, and I can put into shopping cart. So I want to create a search form where users can select dates such like: Checkin da…

---

## ["syntax error, unexpected tIDENTIFIER , expecting kEND" in RJS response](https://www.ruby-forum.com/t/syntax-error-unexpected-tidentifier-expecting-kend-in-rjs-response/153913)

<div class="topic-metadata">

**Author:** [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Replies:** 4\
**Last updated:** [November 22, 2008, 11:02pm UTC](https://www.ruby-forum.com/t/syntax-error-unexpected-tidentifier-expecting-kend-in-rjs-response/153913 "2008-11-22T23:02:05Z")

</div>

I get a “syntax error, unexpected tIDENTIFIER, expecting kEND” when the following RJS template is rendered: page.insert\_html :bottom, :requisite\_table, :partial =\> “insert\_jobrequisite\_select”, :locals =\> {:job =\> @jo…

---

## [Testing Environment for Plugints](https://www.ruby-forum.com/t/testing-environment-for-plugints/153914)

<div class="topic-metadata">

**Author:** [@musk](https://www.ruby-forum.com/u/musk)\
**Replies:** 1\
**Last updated:** [November 22, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/testing-environment-for-plugints/153914 "2008-11-22T22:52:06Z")

</div>

Hello, I’m currently creating my first plugin in rails. It creates a model and a mixin for controllers. For testing purposes I need a test controller (sort of a mock) to which I can include my mixin and test wether t…

---

## [RJS page.update question](https://www.ruby-forum.com/t/rjs-page-update-question/153866)

<div class="topic-metadata">

**Author:** [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Replies:** 3\
**Last updated:** [November 22, 2008, 9:41pm UTC](https://www.ruby-forum.com/t/rjs-page-update-question/153866 "2008-11-22T21:41:13Z")

</div>

How does page.update actually work? I know its a wrapper for Prototype.update but how does it get the partial in there? Say I wanted to update a div with the contents of a partial manually like this. content = render…

---

## [Stopping long running actions](https://www.ruby-forum.com/t/stopping-long-running-actions/153907)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 0\
**Last updated:** [November 22, 2008, 8:42pm UTC](https://www.ruby-forum.com/t/stopping-long-running-actions/153907 "2008-11-22T20:42:02Z")

</div>

I have been trying to find a way to stop a long running action. The method I have been trying is using an around filter with the Terminator gem (http://www.lindsaar.net/2008/9/11/terminator-timeout- without-mercy) h…

---

## [Select\_month post and params](https://www.ruby-forum.com/t/select-month-post-and-params/153880)

<div class="topic-metadata">

**Author:** [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Replies:** 6\
**Last updated:** [November 22, 2008, 6:39pm UTC](https://www.ruby-forum.com/t/select-month-post-and-params/153880 "2008-11-22T18:39:30Z")

</div>

Hi why is that not working? Controller----------------------------------------------------- def bla month = params\[:month\_select\] redirect\_to :action =\> "index" flash\[:error\_messages\_for\] = month.to\_s end Vi…

---

## [Acts\_as\_commentable: find Post by date of comment](https://www.ruby-forum.com/t/acts-as-commentable-find-post-by-date-of-comment/147289)

<div class="topic-metadata">

**Author:** [@tranquiliste](https://www.ruby-forum.com/u/tranquiliste)\
**Replies:** 4\
**Last updated:** [November 22, 2008, 5:14pm UTC](https://www.ruby-forum.com/t/acts-as-commentable-find-post-by-date-of-comment/147289 "2008-11-22T17:14:44Z")

</div>

Hello, I am using acts\_as\_commentable (related to Post) and I would like to know how to get the list the posts ordered by date of comment (i.e. post with recent comment first). in addition if a post has no comment, i…

---

## [Upgrade guide for 2.0.2 to 2.2.2](https://www.ruby-forum.com/t/upgrade-guide-for-2-0-2-to-2-2-2/153896)

<div class="topic-metadata">

**Author:** [@Schalk\_N](https://www.ruby-forum.com/u/Schalk_N)\
**Replies:** 1\
**Last updated:** [November 22, 2008, 3:51pm UTC](https://www.ruby-forum.com/t/upgrade-guide-for-2-0-2-to-2-2-2/153896 "2008-11-22T15:51:56Z")

</div>

Hey all, I believe I have upgraded my Rails version from 2.0.2 to 2.2.2 :wink: However, I am experiencing some problems with an app that was built on 2.0.2. Can anyone suggest a resource where I can learn more about h…

---

## [Generating Class Diagram from Models](https://www.ruby-forum.com/t/generating-class-diagram-from-models/153826)

<div class="topic-metadata">

**Author:** [@tlianza](https://www.ruby-forum.com/u/tlianza)\
**Replies:** 5\
**Last updated:** [November 22, 2008, 3:51pm UTC](https://www.ruby-forum.com/t/generating-class-diagram-from-models/153826 "2008-11-22T15:51:55Z")

</div>

Hi all! There are several softwares which read a database and shows the tables graphically on the screen (now I\`m using Power Architect: SQL Power Architect – Data Modeling). Is there something which beyond to read t…

---

## [Rawk no longer works on Rails 2.2.2](https://www.ruby-forum.com/t/rawk-no-longer-works-on-rails-2-2-2/153895)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 3\
**Last updated:** [November 22, 2008, 3:46pm UTC](https://www.ruby-forum.com/t/rawk-no-longer-works-on-rails-2-2-2/153895 "2008-11-22T15:46:02Z")

</div>

I just wanted to let you know that the hack to make rawk work on Rails 2.2.2 by grouping action calls no longer works. This is the hack, I have put the TODO where the line crashes Rails: module ActiveSupport class Buf…

---

## [Problem with mysql in windows](https://www.ruby-forum.com/t/problem-with-mysql-in-windows/153890)

<div class="topic-metadata">

**Author:** [@khawshik](https://www.ruby-forum.com/u/khawshik)\
**Replies:** 1\
**Last updated:** [November 22, 2008, 3:44pm UTC](https://www.ruby-forum.com/t/problem-with-mysql-in-windows/153890 "2008-11-22T15:44:17Z")

</div>

I installed ruby186-26 and then run this three command in command line… gem update --system gem install rails gem install mongrel Now i nedd to install mysql and i wish to working with mysql. but my database.ymal h…

---

## [Getting the number of years between two dates](https://www.ruby-forum.com/t/getting-the-number-of-years-between-two-dates/153789)

<div class="topic-metadata">

**Author:** [@chero](https://www.ruby-forum.com/u/chero)\
**Replies:** 5\
**Last updated:** [November 22, 2008, 3:04pm UTC](https://www.ruby-forum.com/t/getting-the-number-of-years-between-two-dates/153789 "2008-11-22T15:04:25Z")

</div>

Hey, I need to get the number of years (as a number) between two dates. Here is what I have as a helper. Returns the number of years between now and the specified date. def years\_ago(date) dateDifference = DateTime.…

---

## [Distribution entries for model over multiple tables](https://www.ruby-forum.com/t/distribution-entries-for-model-over-multiple-tables/153885)

<div class="topic-metadata">

**Author:** [@snitko](https://www.ruby-forum.com/u/snitko)\
**Replies:** 1\
**Last updated:** [November 22, 2008, 2:29pm UTC](https://www.ruby-forum.com/t/distribution-entries-for-model-over-multiple-tables/153885 "2008-11-22T14:29:12Z")

</div>

Here’s the thing. I’m designing an application that is very likely to generate lots of db entries quickly, therefore it’s important to think about scalability before doing any moves. To make it more clear: the model w…

---

## [Validates\_associated on has\_many :through polymorphic exception](https://www.ruby-forum.com/t/validates-associated-on-has-many-through-polymorphic-exception/153891)

<div class="topic-metadata">

**Author:** [@gerhard](https://www.ruby-forum.com/u/gerhard)\
**Replies:** 1\
**Last updated:** [November 22, 2008, 2:13pm UTC](https://www.ruby-forum.com/t/validates-associated-on-has-many-through-polymorphic-exception/153891 "2008-11-22T14:13:22Z")

</div>

I have a Company which has\_many AddressLinkings as AddressLinkable (polymorphic). The same Company has\_many Addresses through AddressLinkings. When creating a new Company and defining some Addresses for it, I want to …

---

## [Monitoring Rails applications](https://www.ruby-forum.com/t/monitoring-rails-applications/153887)

<div class="topic-metadata">

**Author:** [@Lennart\_K](https://www.ruby-forum.com/u/Lennart_K)\
**Replies:** 1\
**Last updated:** [November 22, 2008, 1:32pm UTC](https://www.ruby-forum.com/t/monitoring-rails-applications/153887 "2008-11-22T13:32:21Z")

</div>

Hey everyone, I have a question to all those who use Rails in a professional way and have to monitor their applications: What values do you monitor? And how? I don’t mean the health values of the machines or the netw…

---

## [Updating Rails in Aptana RadRails](https://www.ruby-forum.com/t/updating-rails-in-aptana-radrails/153855)

<div class="topic-metadata">

**Author:** [@Schalk\_N](https://www.ruby-forum.com/u/Schalk_N)\
**Replies:** 2\
**Last updated:** [November 22, 2008, 8:51am UTC](https://www.ruby-forum.com/t/updating-rails-in-aptana-radrails/153855 "2008-11-22T08:51:56Z")

</div>

Hey all, Rephrasing my previous question a little. How do I update the current Rails version when using Aptana RadRails as the IDE? Thanks, Schalk

---

## [How to run linux command in rake file](https://www.ruby-forum.com/t/how-to-run-linux-command-in-rake-file/153724)

<div class="topic-metadata">

**Author:** [@vamsi](https://www.ruby-forum.com/u/vamsi)\
**Replies:** 6\
**Last updated:** [November 22, 2008, 7:38am UTC](https://www.ruby-forum.com/t/how-to-run-linux-command-in-rake-file/153724 "2008-11-22T07:38:00Z")

</div>

hi all, i need to grep a word count from a text file and i want to display the count. i need all the above in a rake file , i tried it by using today\_count= system(“grep -R ‘time’ oct\_10.txt | grep -R ‘hi’ | wc -l”) …

---

## [To\_date method problems](https://www.ruby-forum.com/t/to-date-method-problems/153862)

<div class="topic-metadata">

**Author:** [@cam295](https://www.ruby-forum.com/u/cam295)\
**Replies:** 2\
**Last updated:** [November 22, 2008, 6:13am UTC](https://www.ruby-forum.com/t/to-date-method-problems/153862 "2008-11-22T06:13:58Z")

</div>

I’m having problems, all of a sudden, with some code that’s been working for years. Someone else wrote this code, and I’m just trying to maintain it - I don’t have expert experience with ruby or rails. The code grab…

---

## [Named\_scope lambda syntax](https://www.ruby-forum.com/t/named-scope-lambda-syntax/153872)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [November 22, 2008, 5:26am UTC](https://www.ruby-forum.com/t/named-scope-lambda-syntax/153872 "2008-11-22T05:26:49Z")

</div>

How would I pass an attribute name into a named\_scope lambda? I want to be able to search an active record class for nil values in a particular attribute. Would like to use a named\_scope instead of find () because I …

---

## [Iterate through a table record](https://www.ruby-forum.com/t/iterate-through-a-table-record/153860)

<div class="topic-metadata">

**Author:** [@musty](https://www.ruby-forum.com/u/musty)\
**Replies:** 4\
**Last updated:** [November 22, 2008, 4:52am UTC](https://www.ruby-forum.com/t/iterate-through-a-table-record/153860 "2008-11-22T04:52:14Z")

</div>

Hello…I’ve searched before posting but can’t find anything. New and need help. I want to iterate through some fields in my database table and populate a html table with their values. As an example, lets say I have a …

---

## [A deployment newbie trouble getting capistno project deploye](https://www.ruby-forum.com/t/a-deployment-newbie-trouble-getting-capistno-project-deploye/153822)

<div class="topic-metadata">

**Author:** [@r-a-mueller](https://www.ruby-forum.com/u/r-a-mueller)\
**Replies:** 3\
**Last updated:** [November 22, 2008, 4:37am UTC](https://www.ruby-forum.com/t/a-deployment-newbie-trouble-getting-capistno-project-deploye/153822 "2008-11-22T04:37:04Z")

</div>

I have a local project with I am versioning with a remote subversion resitory on which is on the same site as I am wanting to deploy my app. I have spent the last 3 hours trying to work this out, but I am lost I thin…

---

## [Introducing CachedAssociatedAttributes](https://www.ruby-forum.com/t/introducing-cachedassociatedattributes/153869)

<div class="topic-metadata">

**Author:** [@tim](https://www.ruby-forum.com/u/tim)\
**Replies:** 0\
**Last updated:** [November 22, 2008, 2:53am UTC](https://www.ruby-forum.com/t/introducing-cachedassociatedattributes/153869 "2008-11-22T02:53:04Z")

</div>

Hi, just wanted to let you know, that I released a little plugin on github: It automatically stores attributes of an associated object in the model’s table. This can help reduce the need for :include. See README. L…

---

## [Best Modal Popup for Rails](https://www.ruby-forum.com/t/best-modal-popup-for-rails/153718)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 7\
**Last updated:** [November 22, 2008, 2:26am UTC](https://www.ruby-forum.com/t/best-modal-popup-for-rails/153718 "2008-11-22T02:26:46Z")

</div>

I have been researching modal dialog popup windows for my rails app and have narrowed the search down to two with two main variables in mind: ease of integration and speed. The two, that use prototype, are Redbox and…

---

## [Live Clock and Date on Rails](https://www.ruby-forum.com/t/live-clock-and-date-on-rails/153856)

<div class="topic-metadata">

**Author:** [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Replies:** 10\
**Last updated:** [November 22, 2008, 12:53am UTC](https://www.ruby-forum.com/t/live-clock-and-date-on-rails/153856 "2008-11-22T00:53:11Z")

</div>

Hello, guys. Is there any example of a live clock and date on Rails? I’m using one made on Javascript, but the main problem i’m having is when using any Linux distro, which seems to show date incorrectly. For an examp…

---

## [Free software projekt seeking for help](https://www.ruby-forum.com/t/free-software-projekt-seeking-for-help/153867)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 22, 2008, 12:15am UTC](https://www.ruby-forum.com/t/free-software-projekt-seeking-for-help/153867 "2008-11-22T00:15:40Z")

</div>

Hey everyone, I am the developer of ScopePort: A free remote monitoring server. Yes, another one. Please don’t ask why there is a need for another remote monitoring server. Check the website of ScopePort or this blog …

---

## [How to create Virtual Host In Apache](https://www.ruby-forum.com/t/how-to-create-virtual-host-in-apache/153814)

<div class="topic-metadata">

**Author:** [@Piyush\_with\_Rails](https://www.ruby-forum.com/u/Piyush_with_Rails)\
**Replies:** 3\
**Last updated:** [November 21, 2008, 11:38pm UTC](https://www.ruby-forum.com/t/how-to-create-virtual-host-in-apache/153814 "2008-11-21T23:38:47Z")

</div>

Hi All, I am new to server configurations in apache web server. I want to learn how to create virtual hosts in apache server and run configure domains and making domain up. Can anyone guide me here or provide me some…

---

## [View Question... or is it a model question?](https://www.ruby-forum.com/t/view-question-or-is-it-a-model-question/153836)

<div class="topic-metadata">

**Author:** [@ressister](https://www.ruby-forum.com/u/ressister)\
**Replies:** 2\
**Last updated:** [November 21, 2008, 11:03pm UTC](https://www.ruby-forum.com/t/view-question-or-is-it-a-model-question/153836 "2008-11-21T23:03:01Z")

</div>

I have a partial, that generates a list of categories. I’d like to use the same partial for two different scenarios where data will be coming from different models. In one case, the partial is grabbing category data…

---

## [Mailer attach files that are posetd in a respository on the web](https://www.ruby-forum.com/t/mailer-attach-files-that-are-posetd-in-a-respository-on-the-web/153853)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 21, 2008, 10:38pm UTC](https://www.ruby-forum.com/t/mailer-attach-files-that-are-posetd-in-a-respository-on-the-web/153853 "2008-11-21T22:38:55Z")

</div>

I have set up my application to send e-mails along with attachments, however I would like the ability for the “browse” to search a file sharing repository that we have posted on the web. Right now it just searches an…

---

## [Problem getting rails1 app running under rails2](https://www.ruby-forum.com/t/problem-getting-rails1-app-running-under-rails2/153757)

<div class="topic-metadata">

**Author:** [@wpollans](https://www.ruby-forum.com/u/wpollans)\
**Replies:** 4\
**Last updated:** [November 21, 2008, 9:16pm UTC](https://www.ruby-forum.com/t/problem-getting-rails1-app-running-under-rails2/153757 "2008-11-21T21:16:40Z")

</div>

I’m sure others have already solved this problem - porting an existing rails1 app to rails2. A sketch of the problem - I’ll be happy to furnish as much detail as may be needed - I’m hoping this is/was a standard probl…

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

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