# Rails

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

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

---

## [How do you do this in Rails?](https://www.ruby-forum.com/t/how-do-you-do-this-in-rails/170972)

<div class="topic-metadata">

**Author:** [@mistressjanna](https://www.ruby-forum.com/u/mistressjanna)\
**Replies:** 8\
**Last updated:** [June 24, 2009, 8:00pm UTC](https://www.ruby-forum.com/t/how-do-you-do-this-in-rails/170972 "2009-06-24T20:00:02Z")

</div>

I have a model (“Ups”) and a corresponding controller (“UpsController”). The Ups model has a link to my “channels” toble through channel\_id Everything I am going to do in the given views for Ups have to do with usin…

---

## [Session storage switching problem](https://www.ruby-forum.com/t/session-storage-switching-problem/170971)

<div class="topic-metadata">

**Author:** [@fredsmith1981](https://www.ruby-forum.com/u/fredsmith1981)\
**Replies:** 3\
**Last updated:** [June 24, 2009, 7:10pm UTC](https://www.ruby-forum.com/t/session-storage-switching-problem/170971 "2009-06-24T19:10:36Z")

</div>

I’ve added this line to switch to mem cache session store config.action\_controller.session\_store = :mem\_cache\_store to my environment.rb When trying to start server I’ve got this error =\> Booting WEBrick =\> Rails 2.…

---

## [Rake db:migrate not working](https://www.ruby-forum.com/t/rake-db-migrate-not-working/139454)

<div class="topic-metadata">

**Author:** [@metaltree](https://www.ruby-forum.com/u/metaltree)\
**Replies:** 12\
**Last updated:** [June 24, 2009, 6:41pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-not-working/139454 "2009-06-24T18:41:17Z")

</div>

When I run the rake db:migrate command, I get this: C:\\testror\\depot\>rake db:migrate --trace (in C:/testror/depot) \*\* Invoke db:migrate (first\_time) \*\* Invoke environment (first\_time) \*\* Execute environment \*\* Exec…

---

## [Order on virtual attribute in has\_many](https://www.ruby-forum.com/t/order-on-virtual-attribute-in-has-many/170862)

<div class="topic-metadata">

**Author:** [@harm](https://www.ruby-forum.com/u/harm)\
**Replies:** 1\
**Last updated:** [June 24, 2009, 5:53pm UTC](https://www.ruby-forum.com/t/order-on-virtual-attribute-in-has-many/170862 "2009-06-24T17:53:49Z")

</div>

Hi all, Consider the following models: class Sheep \< AR::B belongs\_to :herd def some\_virtual\_attribute #returns something sortable end end class Herd \< AR::B has\_many :sheep do def some\_method #do something us…

---

## [Trouble with basic remote\_function usage](https://www.ruby-forum.com/t/trouble-with-basic-remote-function-usage/170973)

<div class="topic-metadata">

**Author:** [@naijaguy](https://www.ruby-forum.com/u/naijaguy)\
**Replies:** 0\
**Last updated:** [June 24, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/trouble-with-basic-remote-function-usage/170973 "2009-06-24T17:31:30Z")

</div>

I’ve tried moving the code around in different ways, but so far I haven’t gotten remote\_function to work for me (I’m using Rails 2.3.2 on my Mac). I want to make an AJAX call when I double-click a word on my page, an…

---

## [Pop up window](https://www.ruby-forum.com/t/pop-up-window/170943)

<div class="topic-metadata">

**Author:** [@marmolin](https://www.ruby-forum.com/u/marmolin)\
**Replies:** 3\
**Last updated:** [June 24, 2009, 4:56pm UTC](https://www.ruby-forum.com/t/pop-up-window/170943 "2009-06-24T16:56:57Z")

</div>

Rails ha an option pop\_up to helper link\_to However this options does not put focus on the pop up window whic means that it coud be hidden below other windows The script should rather be window.open (…). focus(), than…

---

## [Starting ruby script on server's reboot](https://www.ruby-forum.com/t/starting-ruby-script-on-servers-reboot/170891)

<div class="topic-metadata">

**Author:** [@serenobs](https://www.ruby-forum.com/u/serenobs)\
**Replies:** 3\
**Last updated:** [June 24, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/starting-ruby-script-on-servers-reboot/170891 "2009-06-24T16:48:43Z")

</div>

Hi I’m using passenger + apache. with this combination, how can I start my ruby script on server’s reboot? now I type “ruby myscript.rb run” whenever server reboot.

---

## [Drag and Drop - one list to the other](https://www.ruby-forum.com/t/drag-and-drop-one-list-to-the-other/170968)

<div class="topic-metadata">

**Author:** [@mistressjanna](https://www.ruby-forum.com/u/mistressjanna)\
**Replies:** 0\
**Last updated:** [June 24, 2009, 4:41pm UTC](https://www.ruby-forum.com/t/drag-and-drop-one-list-to-the-other/170968 "2009-06-24T16:41:04Z")

</div>

Is anyone aware of an example of dragging text items from one list box to another? For some reason, the examples I find down;t show this, and I am realy struggling with this (what should be a simple) thing! Thanks, Ja…

---

## [Help: pool doesn't work correctly!](https://www.ruby-forum.com/t/help-pool-doesnt-work-correctly/170962)

<div class="topic-metadata">

**Author:** [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Replies:** 0\
**Last updated:** [June 24, 2009, 2:55pm UTC](https://www.ruby-forum.com/t/help-pool-doesnt-work-correctly/170962 "2009-06-24T14:55:21Z")

</div>

Hi, i’m using nginx+passenger and i’ve set a max\_connection\_pool for passenger equal to 10, and the rails pool in the database.yml to 25. Looking to the production log i’ve found that it’s not updated (i’ve restart bo…

---

## [Calendardateselect problem](https://www.ruby-forum.com/t/calendardateselect-problem/170271)

<div class="topic-metadata">

**Author:** [@drKreso](https://www.ruby-forum.com/u/drKreso)\
**Replies:** 1\
**Last updated:** [June 24, 2009, 2:29pm UTC](https://www.ruby-forum.com/t/calendardateselect-problem/170271 "2009-06-24T14:29:29Z")

</div>

I am using Google Code Archive - Long-term storage for Google Code Project Hosting. for my date time picker. I am using dd.mm.yyyy format (:finnish) and i am using ActiveSupport::CoreExtensions::date::Conversions::DA…

---

## [Issue with Rails and Tomcat](https://www.ruby-forum.com/t/issue-with-rails-and-tomcat/170961)

<div class="topic-metadata">

**Author:** [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Replies:** 0\
**Last updated:** [June 24, 2009, 2:27pm UTC](https://www.ruby-forum.com/t/issue-with-rails-and-tomcat/170961 "2009-06-24T14:27:35Z")

</div>

Hi all, in my app deployed on my remote Tomcat it seems like the Postgres sequences are not being correctly recognized.However,the same code works perfectly on my local machine.Is it possible IÂ´m missing some config…

---

## [How to get all associations info from an ActiveRecord model Class?](https://www.ruby-forum.com/t/how-to-get-all-associations-info-from-an-activerecord-model-class/170959)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [June 24, 2009, 2:16pm UTC](https://www.ruby-forum.com/t/how-to-get-all-associations-info-from-an-activerecord-model-class/170959 "2009-06-24T14:16:33Z")

</div>

I have defined in my Library model belongs\_to :academy has\_many :document, :order =\> :title , :dependent =\> :destroy … In one of my instance methods, I need to know what’s the order column defined so I could write …

---

## [Retrieving image from database to HTML](https://www.ruby-forum.com/t/retrieving-image-from-database-to-html/170863)

<div class="topic-metadata">

**Author:** [@caiuby](https://www.ruby-forum.com/u/caiuby)\
**Replies:** 2\
**Last updated:** [June 24, 2009, 12:37pm UTC](https://www.ruby-forum.com/t/retrieving-image-from-database-to-html/170863 "2009-06-24T12:37:55Z")

</div>

I can upload an image to mysql database, but canÂ´t render it on HTML page. I wrote the following acording to many snipets founded on the web. Inside the controller (classified\_controller.rb): def imageload @image =…

---

## [LocalJumpError calculating the median](https://www.ruby-forum.com/t/localjumperror-calculating-the-median/170951)

<div class="topic-metadata">

**Author:** [@simon180](https://www.ruby-forum.com/u/simon180)\
**Replies:** 1\
**Last updated:** [June 24, 2009, 12:29pm UTC](https://www.ruby-forum.com/t/localjumperror-calculating-the-median/170951 "2009-06-24T12:29:11Z")

</div>

Hi I have searched/Googled around but I’m struggling with the following problem. I am building a Rails 2.3.2 application and one of the requirements is to calculate the median of an array of results. I am using code …

---

## [\[solved\] CAPTCHA gem: undefined method \`stringFT'](https://www.ruby-forum.com/t/solved-captcha-gem-undefined-method-stringft/170947)

<div class="topic-metadata">

**Author:** [@gigi33](https://www.ruby-forum.com/u/gigi33)\
**Replies:** 0\
**Last updated:** [June 24, 2009, 11:15am UTC](https://www.ruby-forum.com/t/solved-captcha-gem-undefined-method-stringft/170947 "2009-06-24T11:15:52Z")

</div>

Since it took me quite some time to resolve this problem, I hope this post will be useful for someone else. I am using the CAPTCHA gem in my application and always got the following error: undefined method \`stringFT’…

---

## [How to return List in web services througth ActionWebService](https://www.ruby-forum.com/t/how-to-return-list-in-web-services-througth-actionwebservice/170937)

<div class="topic-metadata">

**Author:** [@hamidraza](https://www.ruby-forum.com/u/hamidraza)\
**Replies:** 2\
**Last updated:** [June 24, 2009, 10:40am UTC](https://www.ruby-forum.com/t/how-to-return-list-in-web-services-througth-actionwebservice/170937 "2009-06-24T10:40:32Z")

</div>

I need to return list of objects(e.g. users, articles etc) through ActionWebService::API::Base class BabyWiseApi \< ActionWebService::API::Base api\_method :is\_new\_update\_available, :expects =\> \[{:login=\>:string}, {:l…

---

## [:select](https://www.ruby-forum.com/t/select/170935)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 4\
**Last updated:** [June 24, 2009, 10:27am UTC](https://www.ruby-forum.com/t/select/170935 "2009-06-24T10:27:43Z")

</div>

Hi This is just an example .I have a model Person with fields first\_name, last\_name And after entering some records to the people table I tried the sql Person.find(:all,:select =\> “first\_name,#{first\_name+last\_name} …

---

## [Mechanize gem](https://www.ruby-forum.com/t/mechanize-gem/169161)

<div class="topic-metadata">

**Author:** [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Replies:** 1\
**Last updated:** [June 24, 2009, 10:09am UTC](https://www.ruby-forum.com/t/mechanize-gem/169161 "2009-06-24T10:09:34Z")

</div>

Hi All, I am trying to use Mechanize gem for some url, I am submitting the form in that url but on the following submit command I got an error message. command: page = agent.submit(search\_form) error: Iconv::InvalidE…

---

## [Formatting dates for database, in controller or model](https://www.ruby-forum.com/t/formatting-dates-for-database-in-controller-or-model/170941)

<div class="topic-metadata">

**Author:** [@Lars\_Smit](https://www.ruby-forum.com/u/Lars_Smit)\
**Replies:** 0\
**Last updated:** [June 24, 2009, 10:09am UTC](https://www.ruby-forum.com/t/formatting-dates-for-database-in-controller-or-model/170941 "2009-06-24T10:09:33Z")

</div>

I use the jQuery datepicker widget and the date is formatted in this format in the input field after picking a date: dd/mm/yy. I have to format the date for saving to the database and I made an method that converts th…

---

## [Render partial but content is hidden](https://www.ruby-forum.com/t/render-partial-but-content-is-hidden/170849)

<div class="topic-metadata">

**Author:** [@malkifel](https://www.ruby-forum.com/u/malkifel)\
**Replies:** 3\
**Last updated:** [June 24, 2009, 9:31am UTC](https://www.ruby-forum.com/t/render-partial-but-content-is-hidden/170849 "2009-06-24T09:31:25Z")

</div>

Hi, I have a strange problem: I try to use replace\_html (rjs) for replace object fields with partial contains remote\_form\_for to edit the object It works well but the inserted form is coming hidden. (I also tried to…

---

## [Reset session if user click back button in browser](https://www.ruby-forum.com/t/reset-session-if-user-click-back-button-in-browser/170841)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 2\
**Last updated:** [June 24, 2009, 9:30am UTC](https://www.ruby-forum.com/t/reset-session-if-user-click-back-button-in-browser/170841 "2009-06-24T09:30:06Z")

</div>

Dear all Can rails reset session if user click the back button in browser? say, go to 应用宝官网-全网最新最热手机应用游戏下载 Search something and display the result go to http://another\_server.com click back button, I still can see t…

---

## [How do I get Action Mailer to use Hotmail](https://www.ruby-forum.com/t/how-do-i-get-action-mailer-to-use-hotmail/127618)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 8\
**Last updated:** [June 24, 2009, 8:59am UTC](https://www.ruby-forum.com/t/how-do-i-get-action-mailer-to-use-hotmail/127618 "2009-06-24T08:59:23Z")

</div>

Hi, How do I get Action Mailer to use my Hotmail, or my GMail account. I will only be using these while testing my app, because when my app is ready I will get a server to host it. I will then be using that server fo…

---

## [\[ANN\] Lone Star Ruby Conference 2009 Registration is Now Open](https://www.ruby-forum.com/t/ann-lone-star-ruby-conference-2009-registration-is-now-open/170938)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [June 24, 2009, 8:57am UTC](https://www.ruby-forum.com/t/ann-lone-star-ruby-conference-2009-registration-is-now-open/170938 "2009-06-24T08:57:26Z")

</div>

Howdy It’s time to git along and register for the Lone Star Ruby Conference because registration is NOW OPEN! The Lone Star Ruby Conference is being held in Austin, TX on Aug 27-29. This year we have MORE training cl…

---

## [Nested Routes allow for actions only if IDs match?](https://www.ruby-forum.com/t/nested-routes-allow-for-actions-only-if-ids-match/170822)

<div class="topic-metadata">

**Author:** [@ahad](https://www.ruby-forum.com/u/ahad)\
**Replies:** 2\
**Last updated:** [June 24, 2009, 7:25am UTC](https://www.ruby-forum.com/t/nested-routes-allow-for-actions-only-if-ids-match/170822 "2009-06-24T07:25:11Z")

</div>

Hello, I’m encountering a very strange issue and I’ve identified behavior I don’t quite understand. I have a design in which a “full model” exists with sub-screens for each of the pages worth of data input. Each scree…

---

## [Run rake task from Rails controller](https://www.ruby-forum.com/t/run-rake-task-from-rails-controller/170931)

<div class="topic-metadata">

**Author:** [@leakhina](https://www.ruby-forum.com/u/leakhina)\
**Replies:** 0\
**Last updated:** [June 24, 2009, 6:34am UTC](https://www.ruby-forum.com/t/run-rake-task-from-rails-controller/170931 "2009-06-24T06:34:57Z")

</div>

Hi everyone, Could you give me an detail example how can I call rake task from controller in Rails project? Best regards, Leakhina

---

## [How can I contribute with http://api.rubyonrails.org/?](https://www.ruby-forum.com/t/how-can-i-contribute-with-http-api-rubyonrails-org/170727)

<div class="topic-metadata">

**Author:** [@ericfer](https://www.ruby-forum.com/u/ericfer)\
**Replies:** 5\
**Last updated:** [June 24, 2009, 4:13am UTC](https://www.ruby-forum.com/t/how-can-i-contribute-with-http-api-rubyonrails-org/170727 "2009-06-24T04:13:45Z")

</div>

Hi everyone. I was looking for a helper definition (create\_table) and I’ve noticed that the documentation in http://api.rubyonrails.org/ is incomplete. It’s not covering the “sexy migration” options to defining the co…

---

## [Intro to Behaviour-Driven Development (BDD) with Cucumber - http://bit.ly/ZX6TX](https://www.ruby-forum.com/t/intro-to-behaviour-driven-development-bdd-with-cucumber-http-bit-ly-zx6tx/170889)

<div class="topic-metadata">

**Author:** [@sbinsider](https://www.ruby-forum.com/u/sbinsider)\
**Replies:** 1\
**Last updated:** [June 24, 2009, 3:46am UTC](https://www.ruby-forum.com/t/intro-to-behaviour-driven-development-bdd-with-cucumber-http-bit-ly-zx6tx/170889 "2009-06-24T03:46:38Z")

</div>

Cucumber is a framework for writing and executing high-level descriptions of your software’s functionality. Cucumber plays a central role in a development approach called Behaviour Driven Development (BDD). BDD in its…

---

## [Action caching with multiple domains](https://www.ruby-forum.com/t/action-caching-with-multiple-domains/170797)

<div class="topic-metadata">

**Author:** [@timrohde](https://www.ruby-forum.com/u/timrohde)\
**Replies:** 1\
**Last updated:** [June 24, 2009, 3:17am UTC](https://www.ruby-forum.com/t/action-caching-with-multiple-domains/170797 "2009-06-24T03:17:57Z")

</div>

I have recently setup some action caching in my Rails app and everything seems to be working fine. I am using file store pointing at /tmp/cache. The problem I am running into is that separate cache directories are bei…

---

## [Decoding utf - 8 string](https://www.ruby-forum.com/t/decoding-utf-8-string/170888)

<div class="topic-metadata">

**Author:** [@twittwit](https://www.ruby-forum.com/u/twittwit)\
**Replies:** 1\
**Last updated:** [June 24, 2009, 1:28am UTC](https://www.ruby-forum.com/t/decoding-utf-8-string/170888 "2009-06-24T01:28:04Z")

</div>

hello, i tried using html\_helpers and it doesn’t seems to work properly on my pdf.prawn( prawnto) does anybody know other way to decode utf-8 string ? cheers bryan

---

## [Do I lose anything by using legacy databases?](https://www.ruby-forum.com/t/do-i-lose-anything-by-using-legacy-databases/170864)

<div class="topic-metadata">

**Author:** [@jmDesktop](https://www.ruby-forum.com/u/jmDesktop)\
**Replies:** 1\
**Last updated:** [June 24, 2009, 12:29am UTC](https://www.ruby-forum.com/t/do-i-lose-anything-by-using-legacy-databases/170864 "2009-06-24T00:29:01Z")

</div>

If I have information in a legacy database will I be losing anything by using RoR. Can I store configuration information in mysql but display data from my legacy database?

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

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