# Rails

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

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

---

## [Render :kml](https://www.ruby-forum.com/t/render-kml/190604)

<div class="topic-metadata">

**Author:** [@chewmanfoo](https://www.ruby-forum.com/u/chewmanfoo)\
**Replies:** 0\
**Last updated:** [June 23, 2010, 5:52pm UTC](https://www.ruby-forum.com/t/render-kml/190604 "2010-06-23T17:52:53Z")

</div>

kml is an xml format used by Google Maps for specifying a map and markers and other things in the GMap. I have a model Carrier which has\_many :addresses. Each Address has the standard fields (address1, address2, cit…

---

## [Use reflection to show the list](https://www.ruby-forum.com/t/use-reflection-to-show-the-list/190577)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 1\
**Last updated:** [June 23, 2010, 5:50pm UTC](https://www.ruby-forum.com/t/use-reflection-to-show-the-list/190577 "2010-06-23T17:50:38Z")

</div>

Hi, I have two list Groups that user part of Group members list. I trying to do this by using the reflection so that I will be having only one view in which depending on the action the object passed will be differe…

---

## [Pass instance variable from one method to another controller](https://www.ruby-forum.com/t/pass-instance-variable-from-one-method-to-another-controller/190563)

<div class="topic-metadata">

**Author:** [@railslist](https://www.ruby-forum.com/u/railslist)\
**Replies:** 4\
**Last updated:** [June 23, 2010, 5:20pm UTC](https://www.ruby-forum.com/t/pass-instance-variable-from-one-method-to-another-controller/190563 "2010-06-23T17:20:15Z")

</div>

Hi Everybody! I m back. I have a non-model form (I am using active\_record\_no\_table gem for validations). When the user fills that form and submits it, I want to process the form and then display it back to the user j…

---

## [Could not find rmagick locally or in a repository](https://www.ruby-forum.com/t/could-not-find-rmagick-locally-or-in-a-repository/182858)

<div class="topic-metadata">

**Author:** [@vihrao](https://www.ruby-forum.com/u/vihrao)\
**Replies:** 7\
**Last updated:** [June 23, 2010, 5:08pm UTC](https://www.ruby-forum.com/t/could-not-find-rmagick-locally-or-in-a-repository/182858 "2010-06-23T17:08:03Z")

</div>

I unzipped simple captcha in vendor/plugins Then I did rake simple\_captcha:setup Gave error: rake aborted! no such file to load – RMagick2.so SO I thought Rmagick has to be installed. So downloaded 2.12.0 binar…

---

## [Mysql::Error (Can't connect to MySQL server on )](https://www.ruby-forum.com/t/mysql-error-cant-connect-to-mysql-server-on/190582)

<div class="topic-metadata">

**Author:** [@anonuser](https://www.ruby-forum.com/u/anonuser)\
**Replies:** 2\
**Last updated:** [June 23, 2010, 3:34pm UTC](https://www.ruby-forum.com/t/mysql-error-cant-connect-to-mysql-server-on/190582 "2010-06-23T15:34:39Z")

</div>

got this error during production (production log) Mysql::Error (Can’t connect to MySQL server on ‘database server ip’ (110)): \*\*\* LOCAL GEMS \*\*\* actionmailer (1.2.2) Service layer for easy email delivery and testing…

---

## [ThreadError: stopping only thread](https://www.ruby-forum.com/t/threaderror-stopping-only-thread/190101)

<div class="topic-metadata">

**Author:** [@laurin1](https://www.ruby-forum.com/u/laurin1)\
**Replies:** 2\
**Last updated:** [June 23, 2010, 3:30pm UTC](https://www.ruby-forum.com/t/threaderror-stopping-only-thread/190101 "2010-06-23T15:30:38Z")

</div>

Running Rails 2.3.5 I am new to Ruby and Rails. From the console I get the following ThreadError below. Any suggestions are very welcome. app.get “/slides” =\> 200 app.request.path\_parameters =\> {“action”=\>“in…

---

## [Ajax/Prototype/Scriptaculous](https://www.ruby-forum.com/t/ajax-prototype-scriptaculous/190537)

<div class="topic-metadata">

**Author:** [@Ants\_P](https://www.ruby-forum.com/u/Ants_P)\
**Replies:** 4\
**Last updated:** [June 23, 2010, 2:22pm UTC](https://www.ruby-forum.com/t/ajax-prototype-scriptaculous/190537 "2010-06-23T14:22:01Z")

</div>

Hello, I can’t find a way to do what I’m trying so maybe someone can throw something at me. The idea is if an option is not in a select list, the user can click a link next to the list ‘not there?’ and this will ope…

---

## [Example of an application generator template for Rails 3?](https://www.ruby-forum.com/t/example-of-an-application-generator-template-for-rails-3/190560)

<div class="topic-metadata">

**Author:** [@Daniel\_Kehoe](https://www.ruby-forum.com/u/Daniel_Kehoe)\
**Replies:** 1\
**Last updated:** [June 23, 2010, 12:20pm UTC](https://www.ruby-forum.com/t/example-of-an-application-generator-template-for-rails-3/190560 "2010-06-23T12:20:15Z")

</div>

I’d like to see an example of an application generator template for Rails 3. Any suggestions? – Daniel removed\_email\_address@domain.invalid

---

## [Intalll RoR on Windows XP, NOT connected to Web](https://www.ruby-forum.com/t/intalll-ror-on-windows-xp-not-connected-to-web/190586)

<div class="topic-metadata">

**Author:** [@WestCoast101](https://www.ruby-forum.com/u/WestCoast101)\
**Replies:** 0\
**Last updated:** [June 23, 2010, 12:15pm UTC](https://www.ruby-forum.com/t/intalll-ror-on-windows-xp-not-connected-to-web/190586 "2010-06-23T12:15:33Z")

</div>

I have installed Ruby and RubyGems, latest versions from rubyonrails.com, successfully after downloading zip files. Attempting to install rails with \> gem install rails gives a message that the computer \[not connected…

---

## [Silly little link\_to question](https://www.ruby-forum.com/t/silly-little-link-to-question/190562)

<div class="topic-metadata">

**Author:** [@richardsugg](https://www.ruby-forum.com/u/richardsugg)\
**Replies:** 6\
**Last updated:** [June 23, 2010, 10:44am UTC](https://www.ruby-forum.com/t/silly-little-link-to-question/190562 "2010-06-23T10:44:49Z")

</div>

I want to show a page that lists people that belong to a particular company (each person has a company\_id). My link\_to looks like \<%= link\_to “people”, :controller =\> “people”, :action =\> “by\_company”, :comp…

---

## [Rails 3 - AJAX Response](https://www.ruby-forum.com/t/rails-3-ajax-response/190574)

<div class="topic-metadata">

**Author:** [@eric2323223](https://www.ruby-forum.com/u/eric2323223)\
**Replies:** 0\
**Last updated:** [June 23, 2010, 5:33am UTC](https://www.ruby-forum.com/t/rails-3-ajax-response/190574 "2010-06-23T05:33:25Z")

</div>

Hi, I need help with some AJAX in rails 3. So basically, I have a select option in my index page for my User model. This select option is a form that modifies the user’s type. The " :remote =\> true " works and the ty…

---

## [Why am I onlu limited by the years from 2005-2015?](https://www.ruby-forum.com/t/why-am-i-onlu-limited-by-the-years-from-2005-2015/190569)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 8\
**Last updated:** [June 23, 2010, 4:56am UTC](https://www.ruby-forum.com/t/why-am-i-onlu-limited-by-the-years-from-2005-2015/190569 "2010-06-23T04:56:33Z")

</div>

I have created a scaffold, part of which was dob:date When I view my web page under DOB, I have only the years listed from 2005-2015. What should I do to enter older years? Thanks.

---

## [Stored procedures and ROR](https://www.ruby-forum.com/t/stored-procedures-and-ror/190480)

<div class="topic-metadata">

**Author:** [@Sampath\_M](https://www.ruby-forum.com/u/Sampath_M)\
**Replies:** 11\
**Last updated:** [June 23, 2010, 2:07am UTC](https://www.ruby-forum.com/t/stored-procedures-and-ror/190480 "2010-06-23T02:07:13Z")

</div>

dear friends, I need to execute mysql stored procedure with input parameter and need to get some values to ROR calling application. if some one have idea please let me know. thanks sam

---

## [Editing Migrations table](https://www.ruby-forum.com/t/editing-migrations-table/190561)

<div class="topic-metadata">

**Author:** [@tesmar](https://www.ruby-forum.com/u/tesmar)\
**Replies:** 8\
**Last updated:** [June 23, 2010, 1:45am UTC](https://www.ruby-forum.com/t/editing-migrations-table/190561 "2010-06-23T01:45:26Z")

</div>

Most of my migrations are by number, not timestamp, but 5 or 6 of them (the most recent) are with timestamp. These I want to move to number based, and now I want to forward the migration table to the appropriate numbe…

---

## [Model Namespace?](https://www.ruby-forum.com/t/model-namespace/190546)

<div class="topic-metadata">

**Author:** [@ferblape](https://www.ruby-forum.com/u/ferblape)\
**Replies:** 2\
**Last updated:** [June 23, 2010, 12:23am UTC](https://www.ruby-forum.com/t/model-namespace/190546 "2010-06-23T00:23:12Z")

</div>

Hello, Sorry if this looks silly, but I trying to learn Ruby on Rails best practices. I have a model called “Users” and a model called “Projects”. Now I need to implement a “status” field to each one of them. Each …

---

## [Web server](https://www.ruby-forum.com/t/web-server/190553)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 3\
**Last updated:** [June 22, 2010, 11:54pm UTC](https://www.ruby-forum.com/t/web-server/190553 "2010-06-22T23:54:03Z")

</div>

Just have a small question especially I’m new to RoR and web programming. When we say that the application runs on a web server. Does that mean for example when I run my application at: http://localhost:3000, the web …

---

## [Problem with callbacks and has\_many :through association](https://www.ruby-forum.com/t/problem-with-callbacks-and-has-many-through-association/190502)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 2\
**Last updated:** [June 22, 2010, 11:18pm UTC](https://www.ruby-forum.com/t/problem-with-callbacks-and-has-many-through-association/190502 "2010-06-22T23:18:48Z")

</div>

Hey, I’ve got a following scenario: Reply has\_many :venues, :through =\> :venue\_suggestions. When user answers to a question he can add venues to it as suggestions. The problem is that these venues (actually their IDs…

---

## [Javascript tabs not working in rails app](https://www.ruby-forum.com/t/javascript-tabs-not-working-in-rails-app/190509)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 4\
**Last updated:** [June 22, 2010, 11:12pm UTC](https://www.ruby-forum.com/t/javascript-tabs-not-working-in-rails-app/190509 "2010-06-22T23:12:58Z")

</div>

This is in application.html.erb: \<div id="content"\> \<%= yield :tabContent %\> \</div\> This is in index.html.erb in views/products: \<% content\_for :tabContent do %\> …

---

## [N00b question: 'Having troubles with map.namespace :admin'](https://www.ruby-forum.com/t/n00b-question-having-troubles-with-map-namespace-admin/190454)

<div class="topic-metadata">

**Author:** [@sebastian](https://www.ruby-forum.com/u/sebastian)\
**Replies:** 3\
**Last updated:** [June 22, 2010, 10:37pm UTC](https://www.ruby-forum.com/t/n00b-question-having-troubles-with-map-namespace-admin/190454 "2010-06-22T22:37:14Z")

</div>

Hi everyone! Im having troubles with my routes.rb, i set map.namespace :admin so i can enter to my scaffold ‘contacts’ via admin/contacts’, but the view its crashing showing this error:; undefined method \`contact\_path…

---

## [Incorrect path generation if some controller actions are under path prefix: expected behavior or bu](https://www.ruby-forum.com/t/incorrect-path-generation-if-some-controller-actions-are-under-path-prefix-expected-behavior-or-bu/190556)

<div class="topic-metadata">

**Author:** [@Vitalii\_Khustochka](https://www.ruby-forum.com/u/Vitalii_Khustochka)\
**Replies:** 1\
**Last updated:** [June 22, 2010, 7:18pm UTC](https://www.ruby-forum.com/t/incorrect-path-generation-if-some-controller-actions-are-under-path-prefix-expected-behavior-or-bu/190556 "2010-06-22T19:18:09Z")

</div>

Imagine I have a simple scaffolded model Order, controller OrderControllers with all the default views etc. Then I modify routes to have all actions except index and show be available under /admin subdirectory: resou…

---

## [Find in controller or view](https://www.ruby-forum.com/t/find-in-controller-or-view/190458)

<div class="topic-metadata">

**Author:** [@Norm\_S](https://www.ruby-forum.com/u/Norm_S)\
**Replies:** 4\
**Last updated:** [June 22, 2010, 6:27pm UTC](https://www.ruby-forum.com/t/find-in-controller-or-view/190458 "2010-06-22T18:27:38Z")

</div>

I have an app that does a number of collection\_selects. There are two general methods of getting the data and displaying it that I am aware of. You can do a find in the controller and assign the result to an instance…

---

## [Experienced Ruby on Rails Developer](https://www.ruby-forum.com/t/experienced-ruby-on-rails-developer/190550)

<div class="topic-metadata">

**Author:** [@psycloneinc](https://www.ruby-forum.com/u/psycloneinc)\
**Replies:** 0\
**Last updated:** [June 22, 2010, 5:48pm UTC](https://www.ruby-forum.com/t/experienced-ruby-on-rails-developer/190550 "2010-06-22T17:48:45Z")

</div>

We are looking for an experienced developer to help build cutting edge web applications. The ideal candidate is a great problem solver, who is able to work independently. Open, informal and creative atmosphere… Availa…

---

## [Non Model form with Validation](https://www.ruby-forum.com/t/non-model-form-with-validation/190498)

<div class="topic-metadata">

**Author:** [@railslist](https://www.ruby-forum.com/u/railslist)\
**Replies:** 6\
**Last updated:** [June 22, 2010, 2:12pm UTC](https://www.ruby-forum.com/t/non-model-form-with-validation/190498 "2010-06-22T14:12:10Z")

</div>

Hi Everybody, I need to create a non model form. But also I would like to validate the form fields as you would validate a model form using validates\_presence\_of, validates\_numericality\_of…etc. How can I do this? I…

---

## [How to implement a user score by activity](https://www.ruby-forum.com/t/how-to-implement-a-user-score-by-activity/190524)

<div class="topic-metadata">

**Author:** [@rodrigo3n](https://www.ruby-forum.com/u/rodrigo3n)\
**Replies:** 1\
**Last updated:** [June 22, 2010, 1:44pm UTC](https://www.ruby-forum.com/t/how-to-implement-a-user-score-by-activity/190524 "2010-06-22T13:44:10Z")

</div>

Hello everyone, I gotta start an app that have to give icons to users conform they use the application. For example, a user has bought 10 products so he gets icons symbolizing his activity. A user who has bought 5 ite…

---

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

<div class="topic-metadata">

**Author:** [@charanya](https://www.ruby-forum.com/u/charanya)\
**Replies:** 2\
**Last updated:** [June 22, 2010, 8:37am UTC](https://www.ruby-forum.com/t/rating-plugin/190474 "2010-06-22T08:37:52Z")

</div>

Hi, I wanna rate an object on multiple criteria Like… Benefits Applicability etc… So i would want the user to rate an object on 2 criteria. Is there any plugin which will suit my need.Acts\_as\_rateable allows only …

---

## [Mocking an ActiverRecord model](https://www.ruby-forum.com/t/mocking-an-activerrecord-model/190525)

<div class="topic-metadata">

**Author:** [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Replies:** 1\
**Last updated:** [June 22, 2010, 7:34am UTC](https://www.ruby-forum.com/t/mocking-an-activerrecord-model/190525 "2010-06-22T07:34:27Z")

</div>

In Rails 2.x, using Mocha, I was trying a pretty simple excercise, mocking an activerecord model, and an association. I wrote something like this: test “setting the home\_phone works” do a\_phone = mock() a\_card = Car…

---

## [Controllers, what? why?](https://www.ruby-forum.com/t/controllers-what-why/190487)

<div class="topic-metadata">

**Author:** [@pmatos](https://www.ruby-forum.com/u/pmatos)\
**Replies:** 14\
**Last updated:** [June 22, 2010, 4:21am UTC](https://www.ruby-forum.com/t/controllers-what-why/190487 "2010-06-22T04:21:18Z")

</div>

Hi, I am starting to learn rails and I went through the guide and a couple of tutorials. Even though I understand controllers or at least I can use them I can’t see yet the whole picture. Why do you need several cont…

---

## [Redirect\_to ... re-directing to the action you are currently in](https://www.ruby-forum.com/t/redirect-to-re-directing-to-the-action-you-are-currently-in/190518)

<div class="topic-metadata">

**Author:** [@slindsey3000](https://www.ruby-forum.com/u/slindsey3000)\
**Replies:** 0\
**Last updated:** [June 22, 2010, 1:19am UTC](https://www.ruby-forum.com/t/redirect-to-re-directing-to-the-action-you-are-currently-in/190518 "2010-06-22T01:19:15Z")

</div>

I am banging my head against a wall here. I am in index in index I check if it was the first time index has been called for the app. if so I make some changes to the db and redirect\_to right back to index. But… all…

---

## [Cities spell checker](https://www.ruby-forum.com/t/cities-spell-checker/190490)

<div class="topic-metadata">

**Author:** [@rorra](https://www.ruby-forum.com/u/rorra)\
**Replies:** 4\
**Last updated:** [June 22, 2010, 12:15am UTC](https://www.ruby-forum.com/t/cities-spell-checker/190490 "2010-06-22T00:15:56Z")

</div>

I’m totally lost with this feature so I wanted to ask to the community for some links in order to implement this feature I’m trying to make a city spell checker (actually a spell checker that will work for anything at…

---

## [Best way to tell if you're running in a webapp environment?](https://www.ruby-forum.com/t/best-way-to-tell-if-youre-running-in-a-webapp-environment/190508)

<div class="topic-metadata">

**Author:** [@mat\_b](https://www.ruby-forum.com/u/mat_b)\
**Replies:** 1\
**Last updated:** [June 21, 2010, 11:52pm UTC](https://www.ruby-forum.com/t/best-way-to-tell-if-youre-running-in-a-webapp-environment/190508 "2010-06-21T23:52:32Z")

</div>

Hi all, Is there a recommended way to tell from within your Rails app whether the app is running as a webapp vs. some other environment (rake task, console, background worker, etc.)? I can’t think of anything better …

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

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