# Rails

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

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

---

## [Rails way to do long running tasks](https://www.ruby-forum.com/t/rails-way-to-do-long-running-tasks/169700)

<div class="topic-metadata">

**Author:** [@chris](https://www.ruby-forum.com/u/chris)\
**Replies:** 6\
**Last updated:** [June 14, 2009, 12:19am UTC](https://www.ruby-forum.com/t/rails-way-to-do-long-running-tasks/169700 "2009-06-14T00:19:41Z")

</div>

Hello Rails community, I would like to get some advices - I am writing a web application that will be sending some emails and execute other long running tasks. Some of these tasks may take some time and I do not want …

---

## [How Can I insert another column data into the CSV file when I use FasterCSV?](https://www.ruby-forum.com/t/how-can-i-insert-another-column-data-into-the-csv-file-when-i-use-fastercsv/170199)

<div class="topic-metadata">

**Author:** [@chenpassion](https://www.ruby-forum.com/u/chenpassion)\
**Replies:** 3\
**Last updated:** [June 13, 2009, 11:52pm UTC](https://www.ruby-forum.com/t/how-can-i-insert-another-column-data-into-the-csv-file-when-i-use-fastercsv/170199 "2009-06-13T23:52:45Z")

</div>

Hi, All, Suppose I have a CSV file, there is data in it. Column 1 Column2 Column 3 Column 4 Row1 a b c Row2 a2 …

---

## [What is a simple way to increment the next record (not the "id" column)](https://www.ruby-forum.com/t/what-is-a-simple-way-to-increment-the-next-record-not-the-id-column/170182)

<div class="topic-metadata">

**Author:** [@chris](https://www.ruby-forum.com/u/chris)\
**Replies:** 4\
**Last updated:** [June 13, 2009, 9:13pm UTC](https://www.ruby-forum.com/t/what-is-a-simple-way-to-increment-the-next-record-not-the-id-column/170182 "2009-06-13T21:13:26Z")

</div>

Hello Rails community, I have been struggling a bit to try to find a simple solution for this simple requirement and have not found a DRY - simple way for this. I have a table called “Posts” (Articles) with the foll…

---

## [Rake migration error](https://www.ruby-forum.com/t/rake-migration-error/170181)

<div class="topic-metadata">

**Author:** [@dtolj](https://www.ruby-forum.com/u/dtolj)\
**Replies:** 2\
**Last updated:** [June 13, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/rake-migration-error/170181 "2009-06-13T18:49:58Z")

</div>

Hi, I am constantly getting an error when I use the rake command to do a migration or even use drop, this happened after I installed some plugins such as paperclip and seed-fu. The error is: rake aborted! uninitial…

---

## [Sqlite crazy timezone](https://www.ruby-forum.com/t/sqlite-crazy-timezone/170164)

<div class="topic-metadata">

**Author:** [@steux](https://www.ruby-forum.com/u/steux)\
**Replies:** 2\
**Last updated:** [June 13, 2009, 5:51pm UTC](https://www.ruby-forum.com/t/sqlite-crazy-timezone/170164 "2009-06-13T17:51:21Z")

</div>

Hi everyone, I am using sqlite3-ruby for my rails application. My computer timezone is -3:00 GMT. But when a entry is saved in sqlite3 database it records 0:00 GMT timestamps. If it is 14:00 now, created\_at timestamp…

---

## [Please enlighten me and break me out of my shell](https://www.ruby-forum.com/t/please-enlighten-me-and-break-me-out-of-my-shell/170167)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 17\
**Last updated:** [June 13, 2009, 5:48pm UTC](https://www.ruby-forum.com/t/please-enlighten-me-and-break-me-out-of-my-shell/170167 "2009-06-13T17:48:46Z")

</div>

One of the hardest things I find myself doing (being a newbie to rails) is getting back into the long frame of mind with other languages I program in. Take for instance this method: def self.do\_sort(sort\_by, search, …

---

## [Best Practice for Separate "Update" Applications for Website](https://www.ruby-forum.com/t/best-practice-for-separate-update-applications-for-website/170129)

<div class="topic-metadata">

**Author:** [@Phoenix\_R](https://www.ruby-forum.com/u/Phoenix_R)\
**Replies:** 1\
**Last updated:** [June 13, 2009, 5:33pm UTC](https://www.ruby-forum.com/t/best-practice-for-separate-update-applications-for-website/170129 "2009-06-13T17:33:13Z")

</div>

I’ve got a company e-commerce site built in Rails 2.3 that’s up, running, doing fine. However, for several reasons, security chief among them, I’m not allowing ANY way of making changes to the database inside the web…

---

## [Preload form fields with vaiables](https://www.ruby-forum.com/t/preload-form-fields-with-vaiables/170192)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 2\
**Last updated:** [June 13, 2009, 5:08pm UTC](https://www.ruby-forum.com/t/preload-form-fields-with-vaiables/170192 "2009-06-13T17:08:01Z")

</div>

I have the following for which uses javascript to preload a couple of fields but it doesn’t work on a Blackberry (even IF javascript is enabled there). Is there a non-javascript way of preloading the fields I have in …

---

## [Pdf-writer :landscape and :portrait](https://www.ruby-forum.com/t/pdf-writer-landscape-and-portrait/170189)

<div class="topic-metadata">

**Author:** [@blueomega](https://www.ruby-forum.com/u/blueomega)\
**Replies:** 0\
**Last updated:** [June 13, 2009, 12:38pm UTC](https://www.ruby-forum.com/t/pdf-writer-landscape-and-portrait/170189 "2009-06-13T12:38:36Z")

</div>

I can define orientation easily with pdf writer with :orientation, but all the pages get the same orientation I want to do a page as portrait and the next as landscape, without specific order Is it possible? Regards …

---

## [Unable to install thin](https://www.ruby-forum.com/t/unable-to-install-thin/170185)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 1\
**Last updated:** [June 13, 2009, 12:04pm UTC](https://www.ruby-forum.com/t/unable-to-install-thin/170185 "2009-06-13T12:04:23Z")

</div>

On a newly installed Lenny server with Ruby1.8.7 and Rubygems installed from source (not package) and latest rails installed through rubygems $ sudo gem1.8 install thin Building native extensions. This could take a w…

---

## [File manager for rails](https://www.ruby-forum.com/t/file-manager-for-rails/170173)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 2\
**Last updated:** [June 13, 2009, 11:06am UTC](https://www.ruby-forum.com/t/file-manager-for-rails/170173 "2009-06-13T11:06:03Z")

</div>

Hi there I am building a tool to manage servers and I needed a file manager. I was searching for one plugin that does this job but I did not find. Are you aware of any file managers that is built on rails thanks

---

## [Help on Regular EXpression](https://www.ruby-forum.com/t/help-on-regular-expression/170171)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 2\
**Last updated:** [June 13, 2009, 11:02am UTC](https://www.ruby-forum.com/t/help-on-regular-expression/170171 "2009-06-13T11:02:31Z")

</div>

hi i need to validate user input for my designation field . that field should accept(alphapets,numbers,-,&) example =\> System support - Trainee could u people help me with the reqular expression. Thanks for any help…

---

## [Dispatch.fcgi is presented instead of the action](https://www.ruby-forum.com/t/dispatch-fcgi-is-presented-instead-of-the-action/169593)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 4\
**Last updated:** [June 13, 2009, 7:51am UTC](https://www.ruby-forum.com/t/dispatch-fcgi-is-presented-instead-of-the-action/169593 "2009-06-13T07:51:38Z")

</div>

Hi there I am trying to setup my first application on the server and i keep getting the content of dispatch.fcgi after i googled it, i found that i have to have .htaccess which i had in the public folder. you can ch…

---

## [DRY concepts for Models](https://www.ruby-forum.com/t/dry-concepts-for-models/170145)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 2\
**Last updated:** [June 13, 2009, 4:41am UTC](https://www.ruby-forum.com/t/dry-concepts-for-models/170145 "2009-06-13T04:41:58Z")

</div>

I will have roughly 37 models that will contain this piece of code (although it will be further modified): def self.search(search, page) start\_date = Time.now.beginning\_of\_week end\_date = Time.now.end\_of\_week pagina…

---

## [Mysterious Method added by Scaffold](https://www.ruby-forum.com/t/mysterious-method-added-by-scaffold/170079)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 3\
**Last updated:** [June 13, 2009, 3:47am UTC](https://www.ruby-forum.com/t/mysterious-method-added-by-scaffold/170079 "2009-06-13T03:47:43Z")

</div>

I have created a blog by following the instructions detailed in the now-famous blog screencast. Now, I’m attempting to increase my knowledge of Rails by accomplishing that same feat in a more hands-on way (i.e., with…

---

## [Find conditions on the model without a new method](https://www.ruby-forum.com/t/find-conditions-on-the-model-without-a-new-method/170153)

<div class="topic-metadata">

**Author:** [@Phoenix\_R](https://www.ruby-forum.com/u/Phoenix_R)\
**Replies:** 2\
**Last updated:** [June 13, 2009, 1:44am UTC](https://www.ruby-forum.com/t/find-conditions-on-the-model-without-a-new-method/170153 "2009-06-13T01:44:51Z")

</div>

I’ve recently implemented an “active” flag on several of my models in a very large codebase, and I’d rather not have to go back and change every Model.find() instance to specify the new conditions - {:active =\> true} …

---

## [A simple problem](https://www.ruby-forum.com/t/a-simple-problem/170152)

<div class="topic-metadata">

**Author:** [@mikben](https://www.ruby-forum.com/u/mikben)\
**Replies:** 2\
**Last updated:** [June 13, 2009, 12:20am UTC](https://www.ruby-forum.com/t/a-simple-problem/170152 "2009-06-13T00:20:00Z")

</div>

Hey guys - thanks for reading this. I’m trying to use the onclick event to redirect the user via a ruby function. The code is within a “view” html.erb file. The original table has an entry that works perfectly fine: …

---

## [Development Question](https://www.ruby-forum.com/t/development-question/170077)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 10\
**Last updated:** [June 12, 2009, 11:08pm UTC](https://www.ruby-forum.com/t/development-question/170077 "2009-06-12T23:08:10Z")

</div>

I have the following: Windows Vista (primary machine) – 1.9.1-p129 and all gems I currently need – using netbeans IDE 6.5 – have a primary project being developed Ubuntu 9.x (VMWare box on primary machine) – 1.9.1-…

---

## [Newbie -- Migration Error](https://www.ruby-forum.com/t/newbie-migration-error/170137)

<div class="topic-metadata">

**Author:** [@carolinecblaker](https://www.ruby-forum.com/u/carolinecblaker)\
**Replies:** 6\
**Last updated:** [June 12, 2009, 10:46pm UTC](https://www.ruby-forum.com/t/newbie-migration-error/170137 "2009-06-12T22:46:28Z")

</div>

I just performed a couple of migrations - one adding database columns: def self.up add\_column :properties\_sfar\_commercial, :auctions\_desc, :string add\_column :properties\_sfar\_commercial, :bank\_owned\_desc, :string add…

---

## [String cutter](https://www.ruby-forum.com/t/string-cutter/170107)

<div class="topic-metadata">

**Author:** [@petan](https://www.ruby-forum.com/u/petan)\
**Replies:** 2\
**Last updated:** [June 12, 2009, 10:36pm UTC](https://www.ruby-forum.com/t/string-cutter/170107 "2009-06-12T22:36:39Z")

</div>

Hey, I am wondering if there is some kind of built in function to strip the text to given length, but I dont want to cut the word in the middle. :slight\_smile: I know that this works, but it cuts the text. \<%= @post.…

---

## [Why does this go nowhere?](https://www.ruby-forum.com/t/why-does-this-go-nowhere/170148)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 3\
**Last updated:** [June 12, 2009, 10:31pm UTC](https://www.ruby-forum.com/t/why-does-this-go-nowhere/170148 "2009-06-12T22:31:13Z")

</div>

Ok, I just cant seem to understand this. I have an ActionMailer model: class Emailer \< ActionMailer::Base def contact(recipient, subject, message, returnadd, sent\_at = Time.now) @subject = subject @recipients = reci…

---

## [Distributed models](https://www.ruby-forum.com/t/distributed-models/170073)

<div class="topic-metadata">

**Author:** [@slava](https://www.ruby-forum.com/u/slava)\
**Replies:** 3\
**Last updated:** [June 12, 2009, 9:46pm UTC](https://www.ruby-forum.com/t/distributed-models/170073 "2009-06-12T21:46:40Z")

</div>

Hello, I am designing a web application that has several tiers including a Flex client, Rails server and SAP back-end. The application is an extension of functionality offered by SAP system. SOAP based web services a…

---

## [Sap4rails](https://www.ruby-forum.com/t/sap4rails/170147)

<div class="topic-metadata">

**Author:** [@slavix](https://www.ruby-forum.com/u/slavix)\
**Replies:** 0\
**Last updated:** [June 12, 2009, 9:41pm UTC](https://www.ruby-forum.com/t/sap4rails/170147 "2009-06-12T21:41:58Z")

</div>

Hello, I need to integrate my Rails app with SAP back-end. I found this library sap4rails, which apperenty is meant to help, but I see that the library has not been modified since 07, and wonder if it is up-to- date. …

---

## [Migrations and production databases](https://www.ruby-forum.com/t/migrations-and-production-databases/170140)

<div class="topic-metadata">

**Author:** [@plambert](https://www.ruby-forum.com/u/plambert)\
**Replies:** 5\
**Last updated:** [June 12, 2009, 9:26pm UTC](https://www.ruby-forum.com/t/migrations-and-production-databases/170140 "2009-06-12T21:26:40Z")

</div>

I was searching around to see how other people handle the issue of updating a production database during a release of new version of an application, and all I could find is that (according to one post) it was typicall…

---

## [Managing Feature Backlogs](https://www.ruby-forum.com/t/managing-feature-backlogs/170138)

<div class="topic-metadata">

**Author:** [@Mark\_ASRichman](https://www.ruby-forum.com/u/Mark_ASRichman)\
**Replies:** 7\
**Last updated:** [June 12, 2009, 9:07pm UTC](https://www.ruby-forum.com/t/managing-feature-backlogs/170138 "2009-06-12T21:07:18Z")

</div>

What techniques and tools do you use to manage your feature backlogs? It could be as low tech as a post-it note, TODO file in your Rails project tree, or as high tech as a web-based collaborative tool. Thanks, Mark

---

## [RESTful routes problem when updating record](https://www.ruby-forum.com/t/restful-routes-problem-when-updating-record/170069)

<div class="topic-metadata">

**Author:** [@lyntaff](https://www.ruby-forum.com/u/lyntaff)\
**Replies:** 5\
**Last updated:** [June 12, 2009, 8:33pm UTC](https://www.ruby-forum.com/t/restful-routes-problem-when-updating-record/170069 "2009-06-12T20:33:50Z")

</div>

I get an error when trying to update a record when using a HTTP request PUT method from a form complying with the RESTful routing for the resource. The error is: Only get and post requests are allowed. Has anybody co…

---

## [Paperclip issues, selecting a specific file, and edit view](https://www.ruby-forum.com/t/paperclip-issues-selecting-a-specific-file-and-edit-view/170143)

<div class="topic-metadata">

**Author:** [@ravenna](https://www.ruby-forum.com/u/ravenna)\
**Replies:** 0\
**Last updated:** [June 12, 2009, 8:17pm UTC](https://www.ruby-forum.com/t/paperclip-issues-selecting-a-specific-file-and-edit-view/170143 "2009-06-12T20:17:42Z")

</div>

I have a basic portfolio CMS app. I have Paperclip handling multiple images just fine, but for display purposes, I need to be able have the CMS admin select a specific image to be displayed for the portfolio page. T…

---

## [ActionMailer Views Confusion](https://www.ruby-forum.com/t/actionmailer-views-confusion/169960)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 5\
**Last updated:** [June 12, 2009, 8:12pm UTC](https://www.ruby-forum.com/t/actionmailer-views-confusion/169960 "2009-06-12T20:12:41Z")

</div>

I have an ActionMailer, which has a corresponding controller (shown below). The form to create the email gets invoked from another form, a list of names and email addresses from another Model. I would like to return t…

---

## [Modules location](https://www.ruby-forum.com/t/modules-location/170136)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 2\
**Last updated:** [June 12, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/modules-location/170136 "2009-06-12T19:36:41Z")

</div>

What dir do you typically put modules into your rails apps?

---

## [5 minutes to save 25,000 model objects?](https://www.ruby-forum.com/t/5-minutes-to-save-25-000-model-objects/170084)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 9\
**Last updated:** [June 12, 2009, 6:32pm UTC](https://www.ruby-forum.com/t/5-minutes-to-save-25-000-model-objects/170084 "2009-06-12T18:32:04Z")

</div>

Hi guys. On my laptop, I’m finding that it’s taking about 5 minutes to save 25,000 model instances. The model has 5 validations, and I’m saving all of the model instances in a single transaction: http://pastie.org/50…

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

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