# Rails

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

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

---

## [Model Methods](https://www.ruby-forum.com/t/model-methods/157599)

<div class="topic-metadata">

**Author:** [@sa125](https://www.ruby-forum.com/u/sa125)\
**Replies:** 3\
**Last updated:** [January 14, 2009, 7:59am UTC](https://www.ruby-forum.com/t/model-methods/157599 "2009-01-14T07:59:55Z")

</div>

I would like to write a few custom methods for my model, but keep getting an error saying the method is not defined for the model (playing in the console). For example, I have a product model, and I want a method call…

---

## [Thread safety in 2.2.2 - Thread.new { do\_sth } to do background job?](https://www.ruby-forum.com/t/thread-safety-in-2-2-2-thread-new-do-sth-to-do-background-job/157505)

<div class="topic-metadata">

**Author:** [@hubertlepicki](https://www.ruby-forum.com/u/hubertlepicki)\
**Replies:** 6\
**Last updated:** [January 14, 2009, 4:50am UTC](https://www.ruby-forum.com/t/thread-safety-in-2-2-2-thread-new-do-sth-to-do-background-job/157505 "2009-01-14T04:50:35Z")

</div>

Hi guys, I am writing application that is converting files from one format to another. The process takes some time for larger files, and I want to run it in backround. My application is running in threaded mode (enab…

---

## [Number of entries](https://www.ruby-forum.com/t/number-of-entries/157619)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 6\
**Last updated:** [January 14, 2009, 4:19am UTC](https://www.ruby-forum.com/t/number-of-entries/157619 "2009-01-14T04:19:37Z")

</div>

I use will\_paginate to get results: @results = Users.paginate(:all, :conditions =\> "… But how can I get a number of reults?

---

## [Updating multiple databases at the same time](https://www.ruby-forum.com/t/updating-multiple-databases-at-the-same-time/157630)

<div class="topic-metadata">

**Author:** [@yannimac](https://www.ruby-forum.com/u/yannimac)\
**Replies:** 9\
**Last updated:** [January 14, 2009, 3:26am UTC](https://www.ruby-forum.com/t/updating-multiple-databases-at-the-same-time/157630 "2009-01-14T03:26:34Z")

</div>

I have an application that is load balanced. I have a master database which I update once a day. Then I push the raw mysql files to all other servers so they are the same as the master. This works fine, but there a…

---

## [Virtual Atrributes + error\_message\_for ploblem?](https://www.ruby-forum.com/t/virtual-atrributes-error-message-for-ploblem/157551)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 1\
**Last updated:** [January 14, 2009, 3:23am UTC](https://www.ruby-forum.com/t/virtual-atrributes-error-message-for-ploblem/157551 "2009-01-14T03:23:36Z")

</div>

Hello there, I used a screencast ( #16 Virtual Attributes - RailsCasts ) to make a Nested form. The problem is that when I will show the error\_messages\_for I will just get a single line of error for each element that…

---

## [Restful Authentication Uninitialized Constant in Production](https://www.ruby-forum.com/t/restful-authentication-uninitialized-constant-in-production/157477)

<div class="topic-metadata">

**Author:** [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Replies:** 5\
**Last updated:** [January 14, 2009, 2:56am UTC](https://www.ruby-forum.com/t/restful-authentication-uninitialized-constant-in-production/157477 "2009-01-14T02:56:41Z")

</div>

rake db:migrate RAILS\_ENV=production rake aborted! uninitialized constant User::Authentication The preceding I encounter when attempting to migrate to the production database. My google powers have escaped me. Everyw…

---

## [Connect multiple DB in rails project using AR](https://www.ruby-forum.com/t/connect-multiple-db-in-rails-project-using-ar/157587)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 2\
**Last updated:** [January 14, 2009, 2:42am UTC](https://www.ruby-forum.com/t/connect-multiple-db-in-rails-project-using-ar/157587 "2009-01-14T02:42:02Z")

</div>

Dear all I have a rails project which database connection is defined in database.yml. There is a table call “servers” which have about 40 records, which is a collection of database setting (i.e. Server.name, Server.p…

---

## [ROR - Excel Export Example](https://www.ruby-forum.com/t/ror-excel-export-example/157637)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 1\
**Last updated:** [January 14, 2009, 2:34am UTC](https://www.ruby-forum.com/t/ror-excel-export-example/157637 "2009-01-14T02:34:52Z")

</div>

If you are running on Windows you can use create and read speadsheets using the ‘win32ole’ require This sample should give you the basic idea def export require ‘win32ole’ @sort\_by = 'last\_name' current\_user = '…

---

## [\[ANN\] SURVEY: Rails Hosting in 2009](https://www.ruby-forum.com/t/ann-survey-rails-hosting-in-2009/157622)

<div class="topic-metadata">

**Author:** [@robby247365](https://www.ruby-forum.com/u/robby247365)\
**Replies:** 2\
**Last updated:** [January 14, 2009, 12:40am UTC](https://www.ruby-forum.com/t/ann-survey-rails-hosting-in-2009/157622 "2009-01-14T00:40:46Z")

</div>

Hello all! We’re running a survey over the coming weeks to collect information about how you all are currently deploying and hosting your Ruby on Rails applications. The data will be published for the entire communit…

---

## [Free Web Icons](https://www.ruby-forum.com/t/free-web-icons/157636)

<div class="topic-metadata">

**Author:** [@daz](https://www.ruby-forum.com/u/daz)\
**Replies:** 0\
**Last updated:** [January 13, 2009, 11:23pm UTC](https://www.ruby-forum.com/t/free-web-icons/157636 "2009-01-13T23:23:22Z")

</div>

I’ve made some icons that are suitable for use on websites and thought that some people on here might want to use them in their web apps. There are 60 48x48 png icons altogether and released under the MIT license, so …

---

## [Theory/opinion question: What are good RESTful archive URLs?](https://www.ruby-forum.com/t/theory-opinion-question-what-are-good-restful-archive-urls/157552)

<div class="topic-metadata">

**Author:** [@sven](https://www.ruby-forum.com/u/sven)\
**Replies:** 1\
**Last updated:** [January 13, 2009, 10:37pm UTC](https://www.ruby-forum.com/t/theory-opinion-question-what-are-good-restful-archive-urls/157552 "2009-01-13T22:37:32Z")

</div>

Suppose I have a weblog application with RESTful resources accessible at the following URLs: GET /posts GET /posts/1 GET /categories/ GET /categories/1 GET /categories/1/posts As implemented the semantics of /post…

---

## [Newbie question](https://www.ruby-forum.com/t/newbie-question/157575)

<div class="topic-metadata">

**Author:** [@technology](https://www.ruby-forum.com/u/technology)\
**Replies:** 4\
**Last updated:** [January 13, 2009, 10:32pm UTC](https://www.ruby-forum.com/t/newbie-question/157575 "2009-01-13T22:32:49Z")

</div>

I’m on OS X 10.5.6 and am trying to run the blog demo app at http://guides.rubyonrails.org/getting\_started\_with\_rails.html . (I have installed rails 2.2) But there seems to be a problem with sqlite. After starting the…

---

## [Purpose of gems.rubyonrails.org](https://www.ruby-forum.com/t/purpose-of-gems-rubyonrails-org/157633)

<div class="topic-metadata">

**Author:** [@chrisf](https://www.ruby-forum.com/u/chrisf)\
**Replies:** 0\
**Last updated:** [January 13, 2009, 10:18pm UTC](https://www.ruby-forum.com/t/purpose-of-gems-rubyonrails-org/157633 "2009-01-13T22:18:42Z")

</div>

Is this gems repo supposed to be in sync with gems.rubyforge.org or is the rubyonrails.org gem server a regular build of the HEAD Rails revision? For example, I noticed that actionmailer version 2.2.2 is different on …

---

## [Got an error on returning data as json format when the data is nil](https://www.ruby-forum.com/t/got-an-error-on-returning-data-as-json-format-when-the-data-is-nil/157419)

<div class="topic-metadata">

**Author:** [@wolfgang](https://www.ruby-forum.com/u/wolfgang)\
**Replies:** 2\
**Last updated:** [January 13, 2009, 10:06pm UTC](https://www.ruby-forum.com/t/got-an-error-on-returning-data-as-json-format-when-the-data-is-nil/157419 "2009-01-13T22:06:55Z")

</div>

Hi there, One of my app’s actions returns data as a json format. If the data exists, everything works perfect. But if the data is nil, I get the following error. ActionView::MissingTemplate (Missing template user/show…

---

## [I18n available Transalation Databases](https://www.ruby-forum.com/t/i18n-available-transalation-databases/157626)

<div class="topic-metadata">

**Author:** [@croese](https://www.ruby-forum.com/u/croese)\
**Replies:** 0\
**Last updated:** [January 13, 2009, 8:28pm UTC](https://www.ruby-forum.com/t/i18n-available-transalation-databases/157626 "2009-01-13T20:28:59Z")

</div>

Hi Folks, i have a little Problem, i want my application to autogenerate a liste of available languages/translation databases, somewhere on the net somebody mentioned the use of I18n.candidates, unfortunatly that does…

---

## [Automatically detect client's locale setting](https://www.ruby-forum.com/t/automatically-detect-clients-locale-setting/155321)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 1\
**Last updated:** [January 13, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/automatically-detect-clients-locale-setting/155321 "2009-01-13T20:25:43Z")

</div>

Hi, Does I18n provide any easy feature to detect the client’s browser locale?

---

## [Rake aborted! You have a nil object when you didn't expect i](https://www.ruby-forum.com/t/rake-aborted-you-have-a-nil-object-when-you-didnt-expect-i/79649)

<div class="topic-metadata">

**Author:** [@toro04](https://www.ruby-forum.com/u/toro04)\
**Replies:** 20\
**Last updated:** [January 13, 2009, 8:09pm UTC](https://www.ruby-forum.com/t/rake-aborted-you-have-a-nil-object-when-you-didnt-expect-i/79649 "2009-01-13T20:09:54Z")

</div>

Hi Guys, I am following the Agile Web D. with Rails 2nd ed pdf - I have just started Chapter 5 - the “depot” application. I keep hitting a problem when I execute this command: rake db:migrate I get: == AddPrice: m…

---

## [Help with deploying my app!](https://www.ruby-forum.com/t/help-with-deploying-my-app/157588)

<div class="topic-metadata">

**Author:** [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Replies:** 10\
**Last updated:** [January 13, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/help-with-deploying-my-app/157588 "2009-01-13T19:37:57Z")

</div>

Hi all - I’m a noob when it comes to deploying a rails app and my Hosting service providers offer almost no assistance. All the help I’ve had so far has been misinformation from their Indian ‘technical advisers’ I’m …

---

## [Accessing SharePoint using soap4r](https://www.ruby-forum.com/t/accessing-sharepoint-using-soap4r/157616)

<div class="topic-metadata">

**Author:** [@partydrone](https://www.ruby-forum.com/u/partydrone)\
**Replies:** 0\
**Last updated:** [January 13, 2009, 7:23pm UTC](https://www.ruby-forum.com/t/accessing-sharepoint-using-soap4r/157616 "2009-01-13T19:23:11Z")

</div>

I’m trying to access SharePoint using soap4r in my app. At the moment, I can’t even authenticate. Has anyone had success with this?

---

## [Easy searching by hierarchical category](https://www.ruby-forum.com/t/easy-searching-by-hierarchical-category/157577)

<div class="topic-metadata">

**Author:** [@adamfowleruk](https://www.ruby-forum.com/u/adamfowleruk)\
**Replies:** 1\
**Last updated:** [January 13, 2009, 7:02pm UTC](https://www.ruby-forum.com/t/easy-searching-by-hierarchical-category/157577 "2009-01-13T19:02:24Z")

</div>

I recently wanted to come up with a solution to searching by a category (E.g. Shoes), sub category (E.g. Shoes \> Blue), or sub sub category to any depth. This represents an obvious DB challenge not to mention model ob…

---

## [Quick validation question](https://www.ruby-forum.com/t/quick-validation-question/157604)

<div class="topic-metadata">

**Author:** [@drsharp](https://www.ruby-forum.com/u/drsharp)\
**Replies:** 2\
**Last updated:** [January 13, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/quick-validation-question/157604 "2009-01-13T18:25:11Z")

</div>

Hi, I have a model which contains a boolean value. I would like to set a validation which only allows this value to be set to true for one record at a time in the table. Is it possible to do this with validates\_uniq…

---

## [Pre Custom Objects and Stuff - Easy Answer im sure](https://www.ruby-forum.com/t/pre-custom-objects-and-stuff-easy-answer-im-sure/157517)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 2\
**Last updated:** [January 13, 2009, 6:06pm UTC](https://www.ruby-forum.com/t/pre-custom-objects-and-stuff-easy-answer-im-sure/157517 "2009-01-13T18:06:09Z")

</div>

Hi Guys, When I create a project I would like to be able to create a default set of tasks for that project. One could have a line for each task to manually add each project\_task in the projects controller when creati…

---

## [Extracting hash tags from string](https://www.ruby-forum.com/t/extracting-hash-tags-from-string/157578)

<div class="topic-metadata">

**Author:** [@mcarlson](https://www.ruby-forum.com/u/mcarlson)\
**Replies:** 1\
**Last updated:** [January 13, 2009, 3:49pm UTC](https://www.ruby-forum.com/t/extracting-hash-tags-from-string/157578 "2009-01-13T15:49:09Z")

</div>

Hello, I am playing around with the Twitter API and I am trying to extract the hash tags from the updates. Something like this: “This is the string that I want to pull #tags #out #of” I have the regex that gets the t…

---

## [What's this called (nuby on rails question)](https://www.ruby-forum.com/t/whats-this-called-nuby-on-rails-question/157574)

<div class="topic-metadata">

**Author:** [@sweb](https://www.ruby-forum.com/u/sweb)\
**Replies:** 2\
**Last updated:** [January 13, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/whats-this-called-nuby-on-rails-question/157574 "2009-01-13T15:22:38Z")

</div>

When your server does 1 Ruby operation a day without anyone having to visit the site to make it happen. Let’s say the operation would be to create an automatic blog post on your blog site every 24 hours. This is an ex…

---

## [Sqlite3 no longer found after upgrading to Rails 2.2 on MacOS](https://www.ruby-forum.com/t/sqlite3-no-longer-found-after-upgrading-to-rails-2-2-on-macos/153893)

<div class="topic-metadata">

**Author:** [@ncancelliere](https://www.ruby-forum.com/u/ncancelliere)\
**Replies:** 9\
**Last updated:** [January 13, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/sqlite3-no-longer-found-after-upgrading-to-rails-2-2-on-macos/153893 "2009-01-13T15:22:03Z")

</div>

I’ve updated to the Rails 2.2 gem and now I can’t run Rails because I get an error it cannot find SQLite3. I was running just fine under 2.1.2 with SQlite3. I’m on a Mac OS X 10.5 (Leopard) system. gem list rails …

---

## [Problem with layout for partials](https://www.ruby-forum.com/t/problem-with-layout-for-partials/157595)

<div class="topic-metadata">

**Author:** [@morgler](https://www.ruby-forum.com/u/morgler)\
**Replies:** 6\
**Last updated:** [January 13, 2009, 2:57pm UTC](https://www.ruby-forum.com/t/problem-with-layout-for-partials/157595 "2009-01-13T14:57:19Z")

</div>

I like the feature to have layouts even for partials now. But I have a problem related to this topic: My controller sets the variable @my\_profile somewhere before rendering. In the view I have the following code: \<%=…

---

## [Posting to rails app from another process - authenticity problems](https://www.ruby-forum.com/t/posting-to-rails-app-from-another-process-authenticity-problems/157580)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 7\
**Last updated:** [January 13, 2009, 2:39pm UTC](https://www.ruby-forum.com/t/posting-to-rails-app-from-another-process-authenticity-problems/157580 "2009-01-13T14:39:03Z")

</div>

Hi, I am trying to post some data to our existing Rails application from a seperate java application. I am running into the problem of not having a valid authenticity token. How can I get around this? The java app is…

---

## [Problem with using super\_in\_place\_controls](https://www.ruby-forum.com/t/problem-with-using-super-in-place-controls/157524)

<div class="topic-metadata">

**Author:** [@sa125](https://www.ruby-forum.com/u/sa125)\
**Replies:** 1\
**Last updated:** [January 13, 2009, 1:16pm UTC](https://www.ruby-forum.com/t/problem-with-using-super-in-place-controls/157524 "2009-01-13T13:16:05Z")

</div>

Anyone successfully used super\_in\_place\_controls (http://os.flvorful.com/super\_in\_place\_controls/download)? I’ve tried to add them to my project, but whenever I update something it sets the css display property of the…

---

## [Conceptual confusion with facebook connect](https://www.ruby-forum.com/t/conceptual-confusion-with-facebook-connect/157540)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 3\
**Last updated:** [January 13, 2009, 12:28pm UTC](https://www.ruby-forum.com/t/conceptual-confusion-with-facebook-connect/157540 "2009-01-13T12:28:12Z")

</div>

Slightly off topic, but I’m exploring FB connect integration with my rails site. Right now I have an application with a User model, and that user model links to all of my other models, such as comments, votes, etc. A…

---

## [Problem with my rails 2.2.2](https://www.ruby-forum.com/t/problem-with-my-rails-2-2-2/157585)

<div class="topic-metadata">

**Author:** [@nike](https://www.ruby-forum.com/u/nike)\
**Replies:** 1\
**Last updated:** [January 13, 2009, 11:29am UTC](https://www.ruby-forum.com/t/problem-with-my-rails-2-2-2/157585 "2009-01-13T11:29:48Z")

</div>

I have installed rails 2.2.2.when i created my rails project with version 2.2.2 its throwing error Missing the Rails 2.2.2 gem. Please gem install -v=2.2.2 rails, update your RAILS\_GEM\_VERSION setting in config/envir…

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

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