# Rails

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

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

---

## [How database connection works?](https://www.ruby-forum.com/t/how-database-connection-works/162663)

<div class="topic-metadata">

**Author:** [@rgagnon](https://www.ruby-forum.com/u/rgagnon)\
**Replies:** 0\
**Last updated:** [March 12, 2009, 4:12pm UTC](https://www.ruby-forum.com/t/how-database-connection-works/162663 "2009-03-12T16:12:01Z")

</div>

Hi all, Is there documentation on how the database connection works in rails. When its released? When its reused? How many time it is kept alive? That kind of stuff? Thank you RÃ©mi

---

## [How many people are using Ruby now?](https://www.ruby-forum.com/t/how-many-people-are-using-ruby-now/162640)

<div class="topic-metadata">

**Author:** [@Paul\_Klipp](https://www.ruby-forum.com/u/Paul_Klipp)\
**Replies:** 8\
**Last updated:** [March 12, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/how-many-people-are-using-ruby-now/162640 "2009-03-12T16:08:48Z")

</div>

I enjoyed the Linux Counter (http://counter.li.org/) in the early days of Linux adoption and so when we had some free time, one of my team tossed together a little app for registering and counting Ruby users and track…

---

## ["uninitialized constant Gem::Etc (NameError)" when starting server](https://www.ruby-forum.com/t/uninitialized-constant-gem-etc-nameerror-when-starting-server/159377)

<div class="topic-metadata">

**Author:** [@jslicari](https://www.ruby-forum.com/u/jslicari)\
**Replies:** 1\
**Last updated:** [March 12, 2009, 4:04pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-gem-etc-nameerror-when-starting-server/159377 "2009-03-12T16:04:06Z")

</div>

I keep getting this when I try to start the server: \[Macintosh:rails/work/demo\] jslicari% script/server /Library/Ruby/Site/1.8/rubygems.rb:723:in set\_paths': uninitialized constant Gem::Etc (NameError) from /Library/Ru…

---

## [XHTML compliance makes development faster, not slower!](https://www.ruby-forum.com/t/xhtml-compliance-makes-development-faster-not-slower/162652)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 2\
**Last updated:** [March 12, 2009, 3:53pm UTC](https://www.ruby-forum.com/t/xhtml-compliance-makes-development-faster-not-slower/162652 "2009-03-12T15:53:32Z")

</div>

http://xkcd.org/554/ Someone tell Randall he got part of panel 3 wrong, k? tx!

---

## [Modify select\_year()](https://www.ruby-forum.com/t/modify-select-year/162593)

<div class="topic-metadata">

**Author:** [@northband](https://www.ruby-forum.com/u/northband)\
**Replies:** 2\
**Last updated:** [March 12, 2009, 3:17pm UTC](https://www.ruby-forum.com/t/modify-select-year/162593 "2009-03-12T15:17:43Z")

</div>

Hi - Does anyone know how to add a selection to this helper: select\_year(date, options = {}, html\_options = {}) I would like to precede it with ‘Select a year’ just as I would if I were using .unshift. Right now the c…

---

## [Monkey Patching a Plugin](https://www.ruby-forum.com/t/monkey-patching-a-plugin/162576)

<div class="topic-metadata">

**Author:** [@Daly](https://www.ruby-forum.com/u/Daly)\
**Replies:** 6\
**Last updated:** [March 12, 2009, 2:59pm UTC](https://www.ruby-forum.com/t/monkey-patching-a-plugin/162576 "2009-03-12T14:59:30Z")

</div>

I am using a plugin that adds a method to ActiveRecord::Base. The added method is called self.create\_or\_update. I need to monkey patch this method. I tried in lib/ config/initializers and in environment.rb, but the on…

---

## [Ruby on Btrieve, it's possible?](https://www.ruby-forum.com/t/ruby-on-btrieve-its-possible/162436)

<div class="topic-metadata">

**Author:** [@anyel](https://www.ruby-forum.com/u/anyel)\
**Replies:** 2\
**Last updated:** [March 12, 2009, 2:58pm UTC](https://www.ruby-forum.com/t/ruby-on-btrieve-its-possible/162436 "2009-03-12T14:58:33Z")

</div>

Hi guys! Sorry, but i don’t write very good in english, anyway, let’s go. I work in a company that uses a ERP software with Btrieve Database, can i (it’s possible) building a webapplication to access this data on btr…

---

## [Beginner: what to do after adding an association in a model?](https://www.ruby-forum.com/t/beginner-what-to-do-after-adding-an-association-in-a-model/162641)

<div class="topic-metadata">

**Author:** [@neerolyte](https://www.ruby-forum.com/u/neerolyte)\
**Replies:** 5\
**Last updated:** [March 12, 2009, 2:22pm UTC](https://www.ruby-forum.com/t/beginner-what-to-do-after-adding-an-association-in-a-model/162641 "2009-03-12T14:22:28Z")

</div>

I’ve looked at a bunch of tutorials and don’t really understand what is supposed to happen after I add an association (belongs\_to, has\_many etc) to both sides of a relationship. A lot of the tutorials just add the ass…

---

## [Generating routes on demand](https://www.ruby-forum.com/t/generating-routes-on-demand/162655)

<div class="topic-metadata">

**Author:** [@Drogomir](https://www.ruby-forum.com/u/Drogomir)\
**Replies:** 0\
**Last updated:** [March 12, 2009, 2:18pm UTC](https://www.ruby-forum.com/t/generating-routes-on-demand/162655 "2009-03-12T14:18:57Z")

</div>

Hi, I have problem with routes. It’s the big one (over 50 resources) and starting an app is a pain - 3-4 seconds. I’ve added :only and :except options where I could and it’s better than at the beginning but still… sl…

---

## [InvalidAuthenticityToken from home page](https://www.ruby-forum.com/t/invalidauthenticitytoken-from-home-page/162622)

<div class="topic-metadata">

**Author:** [@prichard](https://www.ruby-forum.com/u/prichard)\
**Replies:** 5\
**Last updated:** [March 12, 2009, 2:08pm UTC](https://www.ruby-forum.com/t/invalidauthenticitytoken-from-home-page/162622 "2009-03-12T14:08:23Z")

</div>

I’m trying to create a log in in index.html, but I keep getting an error about InvalidAuthenticityToken. I understand this is something that RoR puts in the forms, and it changes regularly. The problem is that the hom…

---

## [Search Function](https://www.ruby-forum.com/t/search-function/162615)

<div class="topic-metadata">

**Author:** [@pal](https://www.ruby-forum.com/u/pal)\
**Replies:** 5\
**Last updated:** [March 12, 2009, 12:43pm UTC](https://www.ruby-forum.com/t/search-function/162615 "2009-03-12T12:43:05Z")

</div>

Hi I have two tables Stores and Categories Relationship of these tables are: Many to Many Store can have many categories Category can also have many stores Now in the stores table I have a store\_name and category\_id…

---

## [Return only some resources from 2 tables](https://www.ruby-forum.com/t/return-only-some-resources-from-2-tables/162594)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 2\
**Last updated:** [March 12, 2009, 9:22am UTC](https://www.ruby-forum.com/t/return-only-some-resources-from-2-tables/162594 "2009-03-12T09:22:44Z")

</div>

Hello, I’m having trouble selecting only some specific resources from 2 tables. That’s my code: categories = %w{cat1 cat2 cat3} categories.each { |category| cat = CharacterAttributeCategory.find\_by\_name category @c…

---

## [Rake aborted! Could not find table](https://www.ruby-forum.com/t/rake-aborted-could-not-find-table/141919)

<div class="topic-metadata">

**Author:** [@anteaya](https://www.ruby-forum.com/u/anteaya)\
**Replies:** 14\
**Last updated:** [March 12, 2009, 7:31am UTC](https://www.ruby-forum.com/t/rake-aborted-could-not-find-table/141919 "2009-03-12T07:31:34Z")

</div>

I am getting a rake aborted error and I suspect that I am missing a package on my system since the app works for a friend on this computer. Here is the terminal output of the error: anita@anitas-computer:~/sandbox/sh…

---

## [Tooltip effect feds away after sorting data in table in ruby](https://www.ruby-forum.com/t/tooltip-effect-feds-away-after-sorting-data-in-table-in-ruby/162629)

<div class="topic-metadata">

**Author:** [@radha](https://www.ruby-forum.com/u/radha)\
**Replies:** 0\
**Last updated:** [March 12, 2009, 6:44am UTC](https://www.ruby-forum.com/t/tooltip-effect-feds-away-after-sorting-data-in-table-in-ruby/162629 "2009-03-12T06:44:18Z")

</div>

Hello Friends, I am using tooltip.js in my rails application to show tooltip effect on contents of table column. But when i sort the table data using sort key = column\_name, the tooltip effect feds away.It doesnt per…

---

## [Doing POST and PUT in a Sinatra application](https://www.ruby-forum.com/t/doing-post-and-put-in-a-sinatra-application/162630)

<div class="topic-metadata">

**Author:** [@vipulpathak](https://www.ruby-forum.com/u/vipulpathak)\
**Replies:** 0\
**Last updated:** [March 12, 2009, 6:36am UTC](https://www.ruby-forum.com/t/doing-post-and-put-in-a-sinatra-application/162630 "2009-03-12T06:36:46Z")

</div>

Hello, I am using Sinatra to write an application that would act on GET, POST, PUT and DELETE actions. I have coded the GET part as follows- get '/' do @CNs = Data.all() erb :index end The index.erb in ./views…

---

## [A beginner, i also encounter an issue about route](https://www.ruby-forum.com/t/a-beginner-i-also-encounter-an-issue-about-route/162559)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 9\
**Last updated:** [March 12, 2009, 4:52am UTC](https://www.ruby-forum.com/t/a-beginner-i-also-encounter-an-issue-about-route/162559 "2009-03-12T04:52:19Z")

</div>

the same issue talk here: http://groups.google.com/group/rubyonrails-talk/browse\_thread/thread/7080b9fd6ea71d4e/b798ef5d12b86bc1?lnk=gst&q=Routing+Error#b798ef5d12b86bc1 i have also encountered an error=\> Routing Error…

---

## [Polymorphic question](https://www.ruby-forum.com/t/polymorphic-question/162444)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 3\
**Last updated:** [March 12, 2009, 1:34am UTC](https://www.ruby-forum.com/t/polymorphic-question/162444 "2009-03-12T01:34:05Z")

</div>

I have a “ports” model I wanted to make polymorphic. I have an alarm table that has a port, and I also have a circuits model that has 2 ports. Is there a way to use the circuits model as polymorphic with 2 ports eac…

---

## [:order question](https://www.ruby-forum.com/t/order-question/162613)

<div class="topic-metadata">

**Author:** [@esdevs](https://www.ruby-forum.com/u/esdevs)\
**Replies:** 2\
**Last updated:** [March 12, 2009, 12:16am UTC](https://www.ruby-forum.com/t/order-question/162613 "2009-03-12T00:16:50Z")

</div>

ok so I am trying to do something like the below to order by :joins (I know the below won’t work)…the only solution that I can fathom is using something like find\_by\_sql - but I certainly would prefer a simpler method…

---

## [Disabling session cookie per-request in 2.3](https://www.ruby-forum.com/t/disabling-session-cookie-per-request-in-2-3/162535)

<div class="topic-metadata">

**Author:** [@ryan](https://www.ruby-forum.com/u/ryan)\
**Replies:** 5\
**Last updated:** [March 11, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/disabling-session-cookie-per-request-in-2-3/162535 "2009-03-11T23:04:46Z")

</div>

I need to disable the Set-Cookie: header that Rails 2.3 issues for certain requests, when the request is made to my API action from a non- browser client. I understand that the “session :off” option was removed, but n…

---

## [Caching RJS](https://www.ruby-forum.com/t/caching-rjs/162607)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 1\
**Last updated:** [March 11, 2009, 10:50pm UTC](https://www.ruby-forum.com/t/caching-rjs/162607 "2009-03-11T22:50:41Z")

</div>

Hey, I’ve been looking all over for this but am not having any luck. Is it possible to use page caching on RJS templates? The problem I’m having is this: When I turn on page caching for RJS, an HTML template is saved …

---

## [Knowing when to go to multiple mongrel instances or dedicated server](https://www.ruby-forum.com/t/knowing-when-to-go-to-multiple-mongrel-instances-or-dedicated-server/162519)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [March 11, 2009, 10:29pm UTC](https://www.ruby-forum.com/t/knowing-when-to-go-to-multiple-mongrel-instances-or-dedicated-server/162519 "2009-03-11T22:29:33Z")

</div>

I have a rails app with a growing user base. Right now it is on a single mongrel instance on a shared server. Is there a quantifiable method I can use to measure when I need to add mongrel instances, or move to a de…

---

## [\[ANN\] Ruby on Rails Hosting 2009 Survey results!](https://www.ruby-forum.com/t/ann-ruby-on-rails-hosting-2009-survey-results/162608)

<div class="topic-metadata">

**Author:** [@robby247365](https://www.ruby-forum.com/u/robby247365)\
**Replies:** 1\
**Last updated:** [March 11, 2009, 10:15pm UTC](https://www.ruby-forum.com/t/ann-ruby-on-rails-hosting-2009-survey-results/162608 "2009-03-11T22:15:59Z")

</div>

Hey all, We just published the results from the Ruby on Rails hosting survey that we ran a few months ago. You can see the results in CSV, PDF, and HTML format at the following url: http://rails-hosting.com/ Thanks…

---

## [Eager loading comments associated with user submissions](https://www.ruby-forum.com/t/eager-loading-comments-associated-with-user-submissions/162565)

<div class="topic-metadata">

**Author:** [@cdubd](https://www.ruby-forum.com/u/cdubd)\
**Replies:** 12\
**Last updated:** [March 11, 2009, 9:36pm UTC](https://www.ruby-forum.com/t/eager-loading-comments-associated-with-user-submissions/162565 "2009-03-11T21:36:37Z")

</div>

Hey everyone, I am working on an application that allows users to submit articles, and also comment on those articles. Pretty much exactly like Digg. Everything works fine except that when there are a lot of comments …

---

## [Web Service: REST or SOAP?](https://www.ruby-forum.com/t/web-service-rest-or-soap/162573)

<div class="topic-metadata">

**Author:** [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Replies:** 4\
**Last updated:** [March 11, 2009, 8:01pm UTC](https://www.ruby-forum.com/t/web-service-rest-or-soap/162573 "2009-03-11T20:01:06Z")

</div>

Hi, i’ve a rails app and i’d like to add a web service to permit of get data from external. What should i use to do this? I’ve seen that for create a web service there is rest and soap, which is better? I’m already u…

---

## [Crypto in Rails 2.x?](https://www.ruby-forum.com/t/crypto-in-rails-2-x/162469)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 8\
**Last updated:** [March 11, 2009, 7:49pm UTC](https://www.ruby-forum.com/t/crypto-in-rails-2-x/162469 "2009-03-11T19:49:48Z")

</div>

I need to encrypt some items in the database in a rails app. I tried using the old “sentry” gem, but it doesn’t seem to be surviving Rails 2. The stuff I found for Active Crypto on the web appeared to be many years o…

---

## [Do not understand collect method use wit property](https://www.ruby-forum.com/t/do-not-understand-collect-method-use-wit-property/162595)

<div class="topic-metadata">

**Author:** [@chisa](https://www.ruby-forum.com/u/chisa)\
**Replies:** 2\
**Last updated:** [March 11, 2009, 7:21pm UTC](https://www.ruby-forum.com/t/do-not-understand-collect-method-use-wit-property/162595 "2009-03-11T19:21:56Z")

</div>

Hi all, Can someone explain to me in terms of ruby why this works? Story.find\_all\_by\_user\_id(2).collect(&:link) # 1 method call This is in ROR console. link is a property of Story. The above command finds all d…

---

## [Newbie question on adding columns and references to existing table](https://www.ruby-forum.com/t/newbie-question-on-adding-columns-and-references-to-existing-table/162601)

<div class="topic-metadata">

**Author:** [@tappind](https://www.ruby-forum.com/u/tappind)\
**Replies:** 1\
**Last updated:** [March 11, 2009, 7:13pm UTC](https://www.ruby-forum.com/t/newbie-question-on-adding-columns-and-references-to-existing-table/162601 "2009-03-11T19:13:17Z")

</div>

I took a run at the blog tutorial and now I am working on my first Ruby app. I have two models with the same relationship as the post / comments example in the blog tutorial. When I created the second model I forgot t…

---

## [Date Performance](https://www.ruby-forum.com/t/date-performance/162599)

<div class="topic-metadata">

**Author:** [@alesc](https://www.ruby-forum.com/u/alesc)\
**Replies:** 0\
**Last updated:** [March 11, 2009, 7:08pm UTC](https://www.ruby-forum.com/t/date-performance/162599 "2009-03-11T19:08:36Z")

</div>

Hello, i pubblished on my blog some test about Date, DateTime and Time formatting performance, it’s in italian but the data it’s in english, i think it’s quite stranghe since it show how base ruby can’t manage Date …

---

## [ActionWebService... how to return base64?](https://www.ruby-forum.com/t/actionwebservice-how-to-return-base64/162600)

<div class="topic-metadata">

**Author:** [@steveybaby](https://www.ruby-forum.com/u/steveybaby)\
**Replies:** 0\
**Last updated:** [March 11, 2009, 7:03pm UTC](https://www.ruby-forum.com/t/actionwebservice-how-to-return-base64/162600 "2009-03-11T19:03:35Z")

</div>

Hello friends… I’m hoping MY thread has more responses than other AWS threads I’ve found in my searches. Anyway, I’m returning a Track object, defined by this schema: create\_table “tracks”, :force =\> true do |t| t.s…

---

## [How do I organize my model code?](https://www.ruby-forum.com/t/how-do-i-organize-my-model-code/162504)

<div class="topic-metadata">

**Author:** [@davox](https://www.ruby-forum.com/u/davox)\
**Replies:** 2\
**Last updated:** [March 11, 2009, 6:22pm UTC](https://www.ruby-forum.com/t/how-do-i-organize-my-model-code/162504 "2009-03-11T18:22:35Z")

</div>

I have a basic question. I’ve been working with Rails for a couple months now, and I’ve read the O’Reilly book on it, but once I started making a basic sized application, it seems like my main model “List” has waaay …

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

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