# Rails

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

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

---

## [Plugins not loading in production environment](https://www.ruby-forum.com/t/plugins-not-loading-in-production-environment/169730)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [July 7, 2009, 3:19am UTC](https://www.ruby-forum.com/t/plugins-not-loading-in-production-environment/169730 "2009-07-07T03:19:06Z")

</div>

I’m moving this query out from my earlier post. This is all I can assume that is happening here. When I run my site in production, any methods that call plugin functionality is failing. If I have methods in my models …

---

## [Help kill ghost request](https://www.ruby-forum.com/t/help-kill-ghost-request/171569)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 8\
**Last updated:** [July 7, 2009, 3:08am UTC](https://www.ruby-forum.com/t/help-kill-ghost-request/171569 "2009-07-07T03:08:35Z")

</div>

I’ve been troubleshooting a problem with my captcha and finally figured out that any time I make one request to my localhost server, it receives and processes two requests, for example if i got to localhost:3000/users…

---

## [How to make ZenTest autotest run whenever my tests change](https://www.ruby-forum.com/t/how-to-make-zentest-autotest-run-whenever-my-tests-change/171630)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 8\
**Last updated:** [July 7, 2009, 2:13am UTC](https://www.ruby-forum.com/t/how-to-make-zentest-autotest-run-whenever-my-tests-change/171630 "2009-07-07T02:13:47Z")

</div>

Railsters: Despite Rails being the only Web platform designed for TDD, a lot of its test infrastructure is still “cargo cult” - imitating other test rigs instead of understanding their principles. Most importantly,…

---

## [Default text\_field size](https://www.ruby-forum.com/t/default-text-field-size/171594)

<div class="topic-metadata">

**Author:** [@James\_Kahn](https://www.ruby-forum.com/u/James_Kahn)\
**Replies:** 2\
**Last updated:** [July 7, 2009, 1:50am UTC](https://www.ruby-forum.com/t/default-text-field-size/171594 "2009-07-07T01:50:53Z")

</div>

Hi all, The default field size in a view is 30, which is too large for most of the fields in my application. Is there a way to set the default text\_field size to something smaller without changing each field indivi…

---

## [Prevent orphan records](https://www.ruby-forum.com/t/prevent-orphan-records/171538)

<div class="topic-metadata">

**Author:** [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Replies:** 9\
**Last updated:** [July 7, 2009, 1:00am UTC](https://www.ruby-forum.com/t/prevent-orphan-records/171538 "2009-07-07T01:00:15Z")

</div>

If I have belongs\_to :user Do I need to have validates\_presence\_of :user\_id ? Does Rails validate the presence of :user\_id automatically if I have belongs\_to :user? In other words, does Rails prevent against cr…

---

## [Newbie Qn re Basic Google Maps Mashup How To?](https://www.ruby-forum.com/t/newbie-qn-re-basic-google-maps-mashup-how-to/171626)

<div class="topic-metadata">

**Author:** [@BrendanC](https://www.ruby-forum.com/u/BrendanC)\
**Replies:** 2\
**Last updated:** [July 6, 2009, 11:33pm UTC](https://www.ruby-forum.com/t/newbie-qn-re-basic-google-maps-mashup-how-to/171626 "2009-07-06T23:33:36Z")

</div>

I want to create a page that displays a map based on a place name entered by the user - e.g. Golden Gate Bridge gets a map of San Francisco, centered on the bridge - pretty basic. What GEMS/packages do I need to insta…

---

## [Generating M$ Word documents from RoR apps?](https://www.ruby-forum.com/t/generating-m-word-documents-from-ror-apps/171629)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 3\
**Last updated:** [July 6, 2009, 10:43pm UTC](https://www.ruby-forum.com/t/generating-m-word-documents-from-ror-apps/171629 "2009-07-06T22:43:14Z")

</div>

All, Anyone done any work generating Word documents/Word templates from a Rails app.? I’m sure that there is a way to do this without too much trouble in a JRuby world, so wondering about that approach as well. Any …

---

## [If storing duration as integer seconds... question on building a helper](https://www.ruby-forum.com/t/if-storing-duration-as-integer-seconds-question-on-building-a-helper/171577)

<div class="topic-metadata">

**Author:** [@rick](https://www.ruby-forum.com/u/rick)\
**Replies:** 3\
**Last updated:** [July 6, 2009, 10:37pm UTC](https://www.ruby-forum.com/t/if-storing-duration-as-integer-seconds-question-on-building-a-helper/171577 "2009-07-06T22:37:28Z")

</div>

Ok, I’m new to rails (and Ruby)… I’m trying to figure out the best practice for handling a duration field (for example “time it takes someone to run a mile.” ) All I care about is seconds (not milliseconds) so figured…

---

## [5 Ways to Speed Up Your Rails App - http://bit.ly/jtpK4](https://www.ruby-forum.com/t/5-ways-to-speed-up-your-rails-app-http-bit-ly-jtpk4/171624)

<div class="topic-metadata">

**Author:** [@LJMecca](https://www.ruby-forum.com/u/LJMecca)\
**Replies:** 3\
**Last updated:** [July 6, 2009, 9:55pm UTC](https://www.ruby-forum.com/t/5-ways-to-speed-up-your-rails-app-http-bit-ly-jtpk4/171624 "2009-07-06T21:55:58Z")

</div>

Useful advice… Ruby is a fast language, and a great one in so many ways, but nothing in this world is truly free. It’s very easy to do things that seem inconsequential but that later can bring your application to a g…

---

## [Curiosity about syntax for multi-line statements](https://www.ruby-forum.com/t/curiosity-about-syntax-for-multi-line-statements/171631)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 1\
**Last updated:** [July 6, 2009, 9:03pm UTC](https://www.ruby-forum.com/t/curiosity-about-syntax-for-multi-line-statements/171631 "2009-07-06T21:03:21Z")

</div>

Hi, I posted at http://www.pastie.org/536025 four different continuation schemes for a lengthy statement. The first three work fine, but the fourth fails. (The question arose as I was importing columnar positions …

---

## [Using the model to insert records without a running rails application](https://www.ruby-forum.com/t/using-the-model-to-insert-records-without-a-running-rails-application/171614)

<div class="topic-metadata">

**Author:** [@msmsms](https://www.ruby-forum.com/u/msmsms)\
**Replies:** 4\
**Last updated:** [July 6, 2009, 8:18pm UTC](https://www.ruby-forum.com/t/using-the-model-to-insert-records-without-a-running-rails-application/171614 "2009-07-06T20:18:56Z")

</div>

Hey, I want to insert new records manually with a little ruby script and I want to use the corresponding rails models beyond the running rails application. How do I manage this? Is there a way to fill up some tables …

---

## [Getting email replies with Net::IMAP](https://www.ruby-forum.com/t/getting-email-replies-with-net-imap/171622)

<div class="topic-metadata">

**Author:** [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Replies:** 3\
**Last updated:** [July 6, 2009, 7:58pm UTC](https://www.ruby-forum.com/t/getting-email-replies-with-net-imap/171622 "2009-07-06T19:58:51Z")

</div>

Hi, I recently made a program that retrieves emails from an inbox and enters the body of those emails into a database using IMAP. I was just wondering, is there any function in IMAP or other solution where I can just …

---

## [HTML page source not updated](https://www.ruby-forum.com/t/html-page-source-not-updated/171242)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 3\
**Last updated:** [July 6, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/html-page-source-not-updated/171242 "2009-07-06T19:39:45Z")

</div>

Dear all After I search something, it can successfully display the result in the browser. However, I view the Page source and found that the HTML code between the ‘event\_list’ div tag is not updated , the content is s…

---

## [Active Scaffold Error - Ruby 1.8.7](https://www.ruby-forum.com/t/active-scaffold-error-ruby-1-8-7/170924)

<div class="topic-metadata">

**Author:** [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Replies:** 1\
**Last updated:** [July 6, 2009, 7:15pm UTC](https://www.ruby-forum.com/t/active-scaffold-error-ruby-1-8-7/170924 "2009-07-06T19:15:44Z")

</div>

Hi, I’ve got an app that I’ve inherited that uses Active Scaffold. I’ve never used it before, but am now seeing errors on a page that appear to point to that plugin. The system is Ubuntu using Ruby 1.8.7. I already…

---

## [Re: Jruby + SQLserver](https://www.ruby-forum.com/t/re-jruby-sqlserver/171615)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 1\
**Last updated:** [July 6, 2009, 7:08pm UTC](https://www.ruby-forum.com/t/re-jruby-sqlserver/171615 "2009-07-06T19:08:11Z")

</div>

On Jul 6, 10:05 pm, Augustus C. removed\_email\_address@domain.invalid wrote: Somebody alredy work with this?May work donÂ´t autocommit. Why i make this? unfortunately my db is SQLserver. You can use JRuby and SQL Se…

---

## [Routing via regexp with map.resources?](https://www.ruby-forum.com/t/routing-via-regexp-with-map-resources/171623)

<div class="topic-metadata">

**Author:** [@Mark\_Larimer](https://www.ruby-forum.com/u/Mark_Larimer)\
**Replies:** 0\
**Last updated:** [July 6, 2009, 7:00pm UTC](https://www.ruby-forum.com/t/routing-via-regexp-with-map-resources/171623 "2009-07-06T19:00:35Z")

</div>

I have a requirement to support a query syntax on my resources like so: http://localhost:3000/people(last\_name=jones).xml I can hook that up so that the people controller receives that action via map.connect like so: …

---

## [Retrieving Count (\*)](https://www.ruby-forum.com/t/retrieving-count/171619)

<div class="topic-metadata">

**Author:** [@railslist](https://www.ruby-forum.com/u/railslist)\
**Replies:** 6\
**Last updated:** [July 6, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/retrieving-count/171619 "2009-07-06T18:49:30Z")

</div>

I have a find statement in my controller like the following: @c = Model.find(:all, :select=\>“count(\*) as total”, :conditions=\>\[some conditions\]) This returns some value or “0” (if none found). How do I retrieve this …

---

## [Rendering partials with ajax checkbox/observer](https://www.ruby-forum.com/t/rendering-partials-with-ajax-checkbox-observer/171617)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 4\
**Last updated:** [July 6, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/rendering-partials-with-ajax-checkbox-observer/171617 "2009-07-06T18:21:26Z")

</div>

I decided to create an advanced search form which is stored in a partial called: \_search.html.erb Right now the partial just contains a simple two box nested form\_tag… In my index.html I have the following: \<% form\_…

---

## [Reassignement TCPSocket::new](https://www.ruby-forum.com/t/reassignement-tcpsocket-new/171563)

<div class="topic-metadata">

**Author:** [@mistressjanna](https://www.ruby-forum.com/u/mistressjanna)\
**Replies:** 4\
**Last updated:** [July 6, 2009, 6:15pm UTC](https://www.ruby-forum.com/t/reassignement-tcpsocket-new/171563 "2009-07-06T18:15:00Z")

</div>

in my model, I have: attr\_accessor :socket in my controller I have def toServer(s) begin if(@socket == nil) @socket = TCPSocket::new(@channel.serverip, @channel.port) end @socket.send(s,0) rescue return end e…

---

## [Build a table with content\_tag's](https://www.ruby-forum.com/t/build-a-table-with-content-tags/171616)

<div class="topic-metadata">

**Author:** [@jcernelli](https://www.ruby-forum.com/u/jcernelli)\
**Replies:** 1\
**Last updated:** [July 6, 2009, 5:57pm UTC](https://www.ruby-forum.com/t/build-a-table-with-content-tags/171616 "2009-07-06T17:57:17Z")

</div>

Hi, I have a fastcsv collection (2d array) that I want to display as a table. I figured the best way would be a helper function, and build the table dynamically. table = content\_tag(:table, #tbody begind conte…

---

## [Help with regular expression](https://www.ruby-forum.com/t/help-with-regular-expression/171613)

<div class="topic-metadata">

**Author:** [@chimorito](https://www.ruby-forum.com/u/chimorito)\
**Replies:** 0\
**Last updated:** [July 6, 2009, 5:36pm UTC](https://www.ruby-forum.com/t/help-with-regular-expression/171613 "2009-07-06T17:36:05Z")

</div>

First at all sory if my english is not the best. We have a problem in our web when a user writes a long url. The structure of the web becomes ugly… First, we tried to solve this poblem with CSS. We implemented somethi…

---

## [Authlogic and updateing a user without changing password](https://www.ruby-forum.com/t/authlogic-and-updateing-a-user-without-changing-password/171609)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 1\
**Last updated:** [July 6, 2009, 5:21pm UTC](https://www.ruby-forum.com/t/authlogic-and-updateing-a-user-without-changing-password/171609 "2009-07-06T17:21:48Z")

</div>

Hi, I created a new Rails app with authlogic to handle authentication and what have you. In my admin section I’d like to change only the state of users. The problem is that when I submit the form, I get the following …

---

## [Uninitialized constant ActiveRecord::VERSION](https://www.ruby-forum.com/t/uninitialized-constant-activerecord-version/171612)

<div class="topic-metadata">

**Author:** [@Augustus\_C](https://www.ruby-forum.com/u/Augustus_C)\
**Replies:** 0\
**Last updated:** [July 6, 2009, 5:17pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-activerecord-version/171612 "2009-07-06T17:17:08Z")

</div>

I canÂ´t create my data base with rake db:create erro: rake aborted! uninitialized constant ActiveRecord::VERSION -gem list actionmailer (2.2.2) actionpack (2.2.2) activerecord (2.2.2) ActiveRecord-JDBC (0.5) ac…

---

## [Deploying without capistrano, using git pull?](https://www.ruby-forum.com/t/deploying-without-capistrano-using-git-pull/171561)

<div class="topic-metadata">

**Author:** [@davetron5000](https://www.ruby-forum.com/u/davetron5000)\
**Replies:** 4\
**Last updated:** [July 6, 2009, 5:05pm UTC](https://www.ruby-forum.com/t/deploying-without-capistrano-using-git-pull/171561 "2009-07-06T17:05:30Z")

</div>

I’m NOT working on an enterprisey big time rails application; just something for my personal site. I’ve been deploying via local\> git push origin master remote\> git pull origin remote\> sudo /etc/init.d/httpd restart …

---

## [CMS action & "/cms" subfolder for each controller](https://www.ruby-forum.com/t/cms-action-cms-subfolder-for-each-controller/171550)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [July 6, 2009, 5:04pm UTC](https://www.ruby-forum.com/t/cms-action-cms-subfolder-for-each-controller/171550 "2009-07-06T17:04:52Z")

</div>

How do I do this? (And is this a good solution?) I want to have a “/cms” for each controller so I can login as admin and edit them, instead of creating whole new controllers for the cms. Default if you add a new actio…

---

## [FCKEditor and ActiveScaffold](https://www.ruby-forum.com/t/fckeditor-and-activescaffold/171610)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 0\
**Last updated:** [July 6, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/fckeditor-and-activescaffold/171610 "2009-07-06T16:47:11Z")

</div>

Hi guys, I was just wondering if someone can give me some insight. I have fckeditor working with active scaffold after following the instructions here It works like a charm, but there is slight prob. Page has\_many…

---

## [Rails Documentation of hash options](https://www.ruby-forum.com/t/rails-documentation-of-hash-options/171608)

<div class="topic-metadata">

**Author:** [@timrohde](https://www.ruby-forum.com/u/timrohde)\
**Replies:** 0\
**Last updated:** [July 6, 2009, 4:36pm UTC](https://www.ruby-forum.com/t/rails-documentation-of-hash-options/171608 "2009-07-06T16:36:49Z")

</div>

Is it just me or is the current rails documentation severely lacking when it comes to documenting all the various hash options can be sent to many rails methods. Things like html\_options, session\_options, etc. Is ther…

---

## [Scope out plugin](https://www.ruby-forum.com/t/scope-out-plugin/171603)

<div class="topic-metadata">

**Author:** [@miss\_moviestar](https://www.ruby-forum.com/u/miss_moviestar)\
**Replies:** 0\
**Last updated:** [July 6, 2009, 4:15pm UTC](https://www.ruby-forum.com/t/scope-out-plugin/171603 "2009-07-06T16:15:52Z")

</div>

hi i want to install scope out plugin script/plugin install http://scope-out-rails.googlecode.com/svn/trunk but i get the error plugin not found i use window what should i do? thanks in advance

---

## [Find where association model count=0?](https://www.ruby-forum.com/t/find-where-association-model-count-0/171602)

<div class="topic-metadata">

**Author:** [@yannimac](https://www.ruby-forum.com/u/yannimac)\
**Replies:** 2\
**Last updated:** [July 6, 2009, 4:10pm UTC](https://www.ruby-forum.com/t/find-where-association-model-count-0/171602 "2009-07-06T16:10:32Z")

</div>

I have a widget model that has\_many foos. I want to find a list of widgets that have no foos. Can I do this with a “find” method? Right now I am selecting all widgets and iterating through them to look at .count. …

---

## [Versioning of objects. Best practice?](https://www.ruby-forum.com/t/versioning-of-objects-best-practice/171591)

<div class="topic-metadata">

**Author:** [@Adrian\_D](https://www.ruby-forum.com/u/Adrian_D)\
**Replies:** 2\
**Last updated:** [July 6, 2009, 3:03pm UTC](https://www.ruby-forum.com/t/versioning-of-objects-best-practice/171591 "2009-07-06T15:03:21Z")

</div>

Hi, I have a model which has a few has\_many associations. I want the user let it change (but not delete) including the child objects without registration. A big problem is that users could use that for spam etc. Ther…

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

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