# Rails

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

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

---

## [How do you trigger an xml response for "respond\_to do |format|'](https://www.ruby-forum.com/t/how-do-you-trigger-an-xml-response-for-respond-to-do-format/160732)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [February 19, 2009, 11:48am UTC](https://www.ruby-forum.com/t/how-do-you-trigger-an-xml-response-for-respond-to-do-format/160732 "2009-02-19T11:48:45Z")

</div>

Hi - how do you trigger an xml response for "respond\_to do |format|’ ? Wondering why the following isn’t working for me (i.e. triggers HTML response) ------------------view ---------------- \<% remote\_form\_for :bi\_all…

---

## [How to add a include-activation to restful-authenticated?](https://www.ruby-forum.com/t/how-to-add-a-include-activation-to-restful-authenticated/160726)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 1\
**Last updated:** [February 19, 2009, 11:04am UTC](https://www.ruby-forum.com/t/how-to-add-a-include-activation-to-restful-authenticated/160726 "2009-02-19T11:04:36Z")

</div>

I use restful-authenticated a months ago, but recently I got a spam problem, so I would like to add a activation function on my site. so, how to add include-activation to a original restful-authenticated without activ…

---

## [Plugin to check the application](https://www.ruby-forum.com/t/plugin-to-check-the-application/160750)

<div class="topic-metadata">

**Author:** [@nike](https://www.ruby-forum.com/u/nike)\
**Replies:** 2\
**Last updated:** [February 19, 2009, 10:49am UTC](https://www.ruby-forum.com/t/plugin-to-check-the-application/160750 "2009-02-19T10:49:53Z")

</div>

Is there any plugin to check how many erb files are in views & rb files in controllers,models \* helpers

---

## [Geo Code](https://www.ruby-forum.com/t/geo-code/160736)

<div class="topic-metadata">

**Author:** [@cyrus](https://www.ruby-forum.com/u/cyrus)\
**Replies:** 3\
**Last updated:** [February 19, 2009, 10:02am UTC](https://www.ruby-forum.com/t/geo-code/160736 "2009-02-19T10:02:14Z")

</div>

Hello Everyone, any one has idea abt geocode ? in rails I want to find distance in miles between 2 points , I have lattitude and longitude of both points , how can i do that ? please help me thanks

---

## [Gems description](https://www.ruby-forum.com/t/gems-description/160746)

<div class="topic-metadata">

**Author:** [@chaitanya](https://www.ruby-forum.com/u/chaitanya)\
**Replies:** 1\
**Last updated:** [February 19, 2009, 9:58am UTC](https://www.ruby-forum.com/t/gems-description/160746 "2009-02-19T09:58:27Z")

</div>

Can any body tell me how to know the description of every gem in rails

---

## [How can i count total days of particular month](https://www.ruby-forum.com/t/how-can-i-count-total-days-of-particular-month/160744)

<div class="topic-metadata">

**Author:** [@dharmdip](https://www.ruby-forum.com/u/dharmdip)\
**Replies:** 2\
**Last updated:** [February 19, 2009, 9:57am UTC](https://www.ruby-forum.com/t/how-can-i-count-total-days-of-particular-month/160744 "2009-02-19T09:57:33Z")

</div>

Hi , to all . Is there any idea in rails to count totoal days of month eg. 2008-5-01 total days =31

---

## [Validate uniqueness of category model depending on user model](https://www.ruby-forum.com/t/validate-uniqueness-of-category-model-depending-on-user-model/160628)

<div class="topic-metadata">

**Author:** [@Geekyra](https://www.ruby-forum.com/u/Geekyra)\
**Replies:** 3\
**Last updated:** [February 19, 2009, 9:24am UTC](https://www.ruby-forum.com/t/validate-uniqueness-of-category-model-depending-on-user-model/160628 "2009-02-19T09:24:18Z")

</div>

How to make unique validation on category model that is belong to user model and the unique validation must depend on user model so for example every user may have their own unique category name but two or more user m…

---

## [Instance variables](https://www.ruby-forum.com/t/instance-variables/160683)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 3\
**Last updated:** [February 19, 2009, 8:47am UTC](https://www.ruby-forum.com/t/instance-variables/160683 "2009-02-19T08:47:23Z")

</div>

Learning about instance variables and don’t understand why the instance variable “name” in the code example below is not visible where as “title” is. Could someone explain this to me and why I hadto use the “self.get\_…

---

## [Newbie: has\_many](https://www.ruby-forum.com/t/newbie-has-many/160696)

<div class="topic-metadata">

**Author:** [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Replies:** 2\
**Last updated:** [February 19, 2009, 8:24am UTC](https://www.ruby-forum.com/t/newbie-has-many/160696 "2009-02-19T08:24:57Z")

</div>

I am sorry for the newbie question, but I am really stuck and I can’t work it out. :frowning: Have 2 models. category and product (has\_many and belongs\_to). My routes.rb: map.resources :categories do |category| cate…

---

## [Rating](https://www.ruby-forum.com/t/rating/160733)

<div class="topic-metadata">

**Author:** [@chaitanya](https://www.ruby-forum.com/u/chaitanya)\
**Replies:** 2\
**Last updated:** [February 19, 2009, 8:17am UTC](https://www.ruby-forum.com/t/rating/160733 "2009-02-19T08:17:20Z")

</div>

how to implement rating feature in rails and wat are the required gems for that.

---

## [Toggle single element in a page](https://www.ruby-forum.com/t/toggle-single-element-in-a-page/160425)

<div class="topic-metadata">

**Author:** [@vishy](https://www.ruby-forum.com/u/vishy)\
**Replies:** 5\
**Last updated:** [February 19, 2009, 7:01am UTC](https://www.ruby-forum.com/t/toggle-single-element-in-a-page/160425 "2009-02-19T07:01:46Z")

</div>

I am currently working on a blog site in which each blog entry will have its own comments. The comments can be seen by clicking a comments link present at the end of each blog entry. I am using RJS to toggle the view …

---

## [Facebook connect problem](https://www.ruby-forum.com/t/facebook-connect-problem/160730)

<div class="topic-metadata">

**Author:** [@anton\_effendi](https://www.ruby-forum.com/u/anton_effendi)\
**Replies:** 0\
**Last updated:** [February 19, 2009, 6:58am UTC](https://www.ruby-forum.com/t/facebook-connect-problem/160730 "2009-02-19T06:58:50Z")

</div>

Hai I have problem on facebook connect in local my site don’t have problem in facebook, my site always missing template… any body can help me ?? please – Wu You Duan

---

## [Email debug best practices](https://www.ruby-forum.com/t/email-debug-best-practices/160729)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 0\
**Last updated:** [February 19, 2009, 6:57am UTC](https://www.ruby-forum.com/t/email-debug-best-practices/160729 "2009-02-19T06:57:43Z")

</div>

I’m writing a rails app that receives email. I’m trying to parse using Tmail, but my normal method of debugging (using “puts” to output to my console) doesn’t seem give me any output. What are some tatics I should us…

---

## [Dynamic select box](https://www.ruby-forum.com/t/dynamic-select-box/160579)

<div class="topic-metadata">

**Author:** [@loader](https://www.ruby-forum.com/u/loader)\
**Replies:** 3\
**Last updated:** [February 19, 2009, 6:00am UTC](https://www.ruby-forum.com/t/dynamic-select-box/160579 "2009-02-19T06:00:15Z")

</div>

Hi everyone, I have a problem. I want to display a different select box wether the current user is an admin or an user. So I thought I could do this in my view where my form is displayed : \<%= f.label(:role\_id…

---

## [Switching to ActiveRecord Session Store](https://www.ruby-forum.com/t/switching-to-activerecord-session-store/160708)

<div class="topic-metadata">

**Author:** [@jdevine](https://www.ruby-forum.com/u/jdevine)\
**Replies:** 1\
**Last updated:** [February 19, 2009, 5:52am UTC](https://www.ruby-forum.com/t/switching-to-activerecord-session-store/160708 "2009-02-19T05:52:04Z")

</div>

I’m having a problem switching from cookie sessions (the default) to active record sessions. I’ve created the sessions table via the rake task, uncommented the line config.action\_controller.session\_store = :active\_re…

---

## [Content\_for and view, controller, and default hierarchy](https://www.ruby-forum.com/t/content-for-and-view-controller-and-default-hierarchy/160725)

<div class="topic-metadata">

**Author:** [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Replies:** 0\
**Last updated:** [February 19, 2009, 5:49am UTC](https://www.ruby-forum.com/t/content-for-and-view-controller-and-default-hierarchy/160725 "2009-02-19T05:49:43Z")

</div>

I am trying to accomplish a hierarchy for my sidebar content using yield :sidebar and content\_for :sidebar. What is the best way to set up the content\_for hierarchy such that the following pseudo code is true. if :s…

---

## [Default Layout File For Controllers in Namespace?](https://www.ruby-forum.com/t/default-layout-file-for-controllers-in-namespace/160724)

<div class="topic-metadata">

**Author:** [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Replies:** 0\
**Last updated:** [February 19, 2009, 5:43am UTC](https://www.ruby-forum.com/t/default-layout-file-for-controllers-in-namespace/160724 "2009-02-19T05:43:50Z")

</div>

Do controllers in namespaces somehow get their own default layout file? For instance, the UsersController will use layouts/users.rhtml if it exists. Is there something similar for Admin::UsersController or will it d…

---

## [Without the magical id column in table](https://www.ruby-forum.com/t/without-the-magical-id-column-in-table/160519)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 3\
**Last updated:** [February 19, 2009, 5:22am UTC](https://www.ruby-forum.com/t/without-the-magical-id-column-in-table/160519 "2009-02-19T05:22:47Z")

</div>

Dear all In rails, the are some magical column such as id, created\_at, updated\_at can make things easier. However, within my organization, due to whatever reason, the data type identity is not allowed to use. So, the…

---

## [Rails 2.2.2 crash with a kernel protection failure](https://www.ruby-forum.com/t/rails-2-2-2-crash-with-a-kernel-protection-failure/159787)

<div class="topic-metadata">

**Author:** [@lmcdougall](https://www.ruby-forum.com/u/lmcdougall)\
**Replies:** 8\
**Last updated:** [February 19, 2009, 12:25am UTC](https://www.ruby-forum.com/t/rails-2-2-2-crash-with-a-kernel-protection-failure/159787 "2009-02-19T00:25:44Z")

</div>

I am using OS X 10.5.6 gem 1.3.1 and ruby ruby 1.8.7 (2008-08-11 patchlevel 72) \[i686-darwin9.6.0\] This is the firs time I am trying rails (ever). At the shell I am trying rails blog and I get /Library/Ruby/Gems/1.8/…

---

## [Capistrano equivalent for \*nix -\> Windows deployment](https://www.ruby-forum.com/t/capistrano-equivalent-for-nix-windows-deployment/160596)

<div class="topic-metadata">

**Author:** [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Replies:** 5\
**Last updated:** [February 18, 2009, 11:29pm UTC](https://www.ruby-forum.com/t/capistrano-equivalent-for-nix-windows-deployment/160596 "2009-02-18T23:29:40Z")

</div>

I have a (hopefully short-term) need to deploy a small Rails app to a Windows XP box. It’s installed and working fine, but I’ll be needing to make updates and enhancements, and would like to be able to do the equivale…

---

## [Form\_tag help needed](https://www.ruby-forum.com/t/form-tag-help-needed/160635)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 3\
**Last updated:** [February 18, 2009, 11:18pm UTC](https://www.ruby-forum.com/t/form-tag-help-needed/160635 "2009-02-18T23:18:30Z")

</div>

Hi I have created a model Request and after that created the controller for that with the name Request .I have also added in routes.rb map.resources :reuests Now in app/view/requests/new.html.erb I have \<% form\_tag…

---

## [Again and again: no such file to load -- mysql](https://www.ruby-forum.com/t/again-and-again-no-such-file-to-load-mysql/160627)

<div class="topic-metadata">

**Author:** [@zaqwery](https://www.ruby-forum.com/u/zaqwery)\
**Replies:** 5\
**Last updated:** [February 18, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/again-and-again-no-such-file-to-load-mysql/160627 "2009-02-18T23:16:45Z")

</div>

Hello! I’ve got same problem! Can’t continue working with Rails! I have OSX 10.5.6. Mysql 5.0.67, Latest Ruby , Rubygems, Rails 2.2.2, and mysl gem 2.7 installed in this way sudo env ARCHFLAGS="-arch i386" gem instal…

---

## [Why is user/new redirecting to sessions/new and then looping?](https://www.ruby-forum.com/t/why-is-user-new-redirecting-to-sessions-new-and-then-looping/160666)

<div class="topic-metadata">

**Author:** [@brian](https://www.ruby-forum.com/u/brian)\
**Replies:** 1\
**Last updated:** [February 18, 2009, 11:11pm UTC](https://www.ruby-forum.com/t/why-is-user-new-redirecting-to-sessions-new-and-then-looping/160666 "2009-02-18T23:11:26Z")

</div>

I’ve started out my new rails app by setting up users and sessions by following the example in the FlexibleRails book. This uses the restful\_authentication plugin. It then generates users sessions and sets up basic …

---

## [Rails hosting](https://www.ruby-forum.com/t/rails-hosting/160605)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [February 18, 2009, 10:36pm UTC](https://www.ruby-forum.com/t/rails-hosting/160605 "2009-02-18T22:36:58Z")

</div>

Hi All, I am looking for the cheapest rails hosting with mysql support. Can you please let me know the best rails hosting when price is concerning. Are there any free rails hosting servers?? Thanks, Ramu.

---

## [Can't get passenger apache 2 module installed](https://www.ruby-forum.com/t/cant-get-passenger-apache-2-module-installed/150476)

<div class="topic-metadata">

**Author:** [@veganopolis](https://www.ruby-forum.com/u/veganopolis)\
**Replies:** 4\
**Last updated:** [February 18, 2009, 10:10pm UTC](https://www.ruby-forum.com/t/cant-get-passenger-apache-2-module-installed/150476 "2009-02-18T22:10:52Z")

</div>

Hi I have tried everything to get the passenger apache 2 module to install but haven’t had any luck yet. Was hoping maybe someone else had similar problems. Running on apache v 2.2.3 Linux version 2.4.25 (Debian pre…

---

## [Post to external form](https://www.ruby-forum.com/t/post-to-external-form/160591)

<div class="topic-metadata">

**Author:** [@frank\_programmer](https://www.ruby-forum.com/u/frank_programmer)\
**Replies:** 4\
**Last updated:** [February 18, 2009, 8:09pm UTC](https://www.ruby-forum.com/t/post-to-external-form/160591 "2009-02-18T20:09:52Z")

</div>

Hi, This is probably a dumb question but I can’t figure it out. How do you post to an external form? I think the easiest way would be to do a GET on the URL with the query arguments but I don’t know how to do that i…

---

## [\[ANN\] Sidebars made Simpler: Body Builder](https://www.ruby-forum.com/t/ann-sidebars-made-simpler-body-builder/160682)

<div class="topic-metadata">

**Author:** [@wybo](https://www.ruby-forum.com/u/wybo)\
**Replies:** 1\
**Last updated:** [February 18, 2009, 8:02pm UTC](https://www.ruby-forum.com/t/ann-sidebars-made-simpler-body-builder/160682 "2009-02-18T20:02:15Z")

</div>

This plugin fixes the problem of how to organize the parts of your app that are re-used like blocks across pages, like those in side-bars and top-bars. It allows you to create render-points where content can be insert…

---

## [Sql Adapter reports out of memory](https://www.ruby-forum.com/t/sql-adapter-reports-out-of-memory/160684)

<div class="topic-metadata">

**Author:** [@rroman81](https://www.ruby-forum.com/u/rroman81)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 7:54pm UTC](https://www.ruby-forum.com/t/sql-adapter-reports-out-of-memory/160684 "2009-02-18T19:54:33Z")

</div>

I’ve set up freeTDS, unixODBC and got sql\_adapter gem for rails 2.2.2. It’s on x64 CentOS 5. within the app a call to ActiveRecord object to inspect columns fails like this: ActiveRecord::StatementInvalid: NoMemoryE…

---

## [Expire\_fragment with memcached](https://www.ruby-forum.com/t/expire-fragment-with-memcached/160658)

<div class="topic-metadata">

**Author:** [@feustine](https://www.ruby-forum.com/u/feustine)\
**Replies:** 4\
**Last updated:** [February 18, 2009, 7:31pm UTC](https://www.ruby-forum.com/t/expire-fragment-with-memcached/160658 "2009-02-18T19:31:35Z")

</div>

Hello all, We know that memcached or memcached-client doesn’t support regex… But It seems it doesn’t support expire\_fragment either :confused: I’m trying to use expire\_fragment with memcached as following : expire\_fr…

---

## [Wrong number of arguments (1 for 0)](https://www.ruby-forum.com/t/wrong-number-of-arguments-1-for-0/160674)

<div class="topic-metadata">

**Author:** [@zonyzeb](https://www.ruby-forum.com/u/zonyzeb)\
**Replies:** 3\
**Last updated:** [February 18, 2009, 6:52pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-1-for-0/160674 "2009-02-18T18:52:39Z")

</div>

Hello, I am new to ruby on rails. When I tried to create a session I am getting an error, ‘wrong number of arguments (1 for 0)’, in my controller. ArgumentError in CustomerController#add\_to\_cart wrong number of arg…

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

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