# Rails

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

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

---

## [How to download a file uploaded through attachment\_fu?](https://www.ruby-forum.com/t/how-to-download-a-file-uploaded-through-attachment-fu/143906)

<div class="topic-metadata">

**Author:** [@rahulonrails](https://www.ruby-forum.com/u/rahulonrails)\
**Replies:** 1\
**Last updated:** [July 28, 2008, 8:28am UTC](https://www.ruby-forum.com/t/how-to-download-a-file-uploaded-through-attachment-fu/143906 "2008-07-28T08:28:20Z")

</div>

Hi, I’m new to rails world. I tried out simple example using attachment\_fu. I have successfully uploaded a file and also can delete the file just by giving the id. I need help in downloading the file saved in the fil…

---

## [Downgrading rubygems](https://www.ruby-forum.com/t/downgrading-rubygems/144098)

<div class="topic-metadata">

**Author:** [@swamy\_g](https://www.ruby-forum.com/u/swamy_g)\
**Replies:** 3\
**Last updated:** [July 28, 2008, 8:16am UTC](https://www.ruby-forum.com/t/downgrading-rubygems/144098 "2008-07-28T08:16:32Z")

</div>

Hi, When I did a gem -v, it showed me the version as 1.0.1. I want to downgrade this to version 0.9.0. How can I do this? Thanks a lot

---

## [Fastercsv, parse columns into hash/array](https://www.ruby-forum.com/t/fastercsv-parse-columns-into-hash-array/144275)

<div class="topic-metadata">

**Author:** [@biqut2](https://www.ruby-forum.com/u/biqut2)\
**Replies:** 1\
**Last updated:** [July 28, 2008, 6:46am UTC](https://www.ruby-forum.com/t/fastercsv-parse-columns-into-hash-array/144275 "2008-07-28T06:46:14Z")

</div>

I am importing a csv file with the following code. I need to be able to load the file into a hash or an array so that I can access the values in each column and row individually. There aore 14 columns in each row and …

---

## [REST and extra actions](https://www.ruby-forum.com/t/rest-and-extra-actions/144264)

<div class="topic-metadata">

**Author:** [@DS\_Mick](https://www.ruby-forum.com/u/DS_Mick)\
**Replies:** 1\
**Last updated:** [July 28, 2008, 4:15am UTC](https://www.ruby-forum.com/t/rest-and-extra-actions/144264 "2008-07-28T04:15:30Z")

</div>

Hi, I’m trying to implement some charts in my REST application. But I can’t seem to use an extra action like “chart” in my controller. Becouse of the rest approach, it sees the action name as an id. Does anyone know …

---

## [Error message: ActionView::TemplateError (No :secret given t](https://www.ruby-forum.com/t/error-message-actionview-templateerror-no-secret-given-t/144276)

<div class="topic-metadata">

**Author:** [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Replies:** 0\
**Last updated:** [July 28, 2008, 3:59am UTC](https://www.ruby-forum.com/t/error-message-actionview-templateerror-no-secret-given-t/144276 "2008-07-28T03:59:23Z")

</div>

Hi all I am getting this error message on the log, and I do not unserstand it. I am using rails 2.0. Please advice ActionView::TemplateError (No :secret given to the #protect\_from\_forgery call. Set that or use a se…

---

## [Switching between projects?](https://www.ruby-forum.com/t/switching-between-projects/144273)

<div class="topic-metadata">

**Author:** [@pepa007](https://www.ruby-forum.com/u/pepa007)\
**Replies:** 3\
**Last updated:** [July 28, 2008, 3:43am UTC](https://www.ruby-forum.com/t/switching-between-projects/144273 "2008-07-28T03:43:35Z")

</div>

Hi, sorry for newbie question: how do I switch between projects on command line? I know ‘rails projectA’ creates projectA. but if I have another projectB in another folder, how do I make this one active? Thank you

---

## [One Rails App - thousands of vHosts pointing to it](https://www.ruby-forum.com/t/one-rails-app-thousands-of-vhosts-pointing-to-it/144272)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 5\
**Last updated:** [July 28, 2008, 2:53am UTC](https://www.ruby-forum.com/t/one-rails-app-thousands-of-vhosts-pointing-to-it/144272 "2008-07-28T02:53:37Z")

</div>

I have a new client with a project that will be organized a lot like “blogspot.com” (aka blogger) where there are a large number of content providers, and each one of those people gets their own subdomain off the main…

---

## [Combo Mysql/Rails/DBD question - How do I do rankings?](https://www.ruby-forum.com/t/combo-mysql-rails-dbd-question-how-do-i-do-rankings/144194)

<div class="topic-metadata">

**Author:** [@armstheykill](https://www.ruby-forum.com/u/armstheykill)\
**Replies:** 3\
**Last updated:** [July 28, 2008, 1:55am UTC](https://www.ruby-forum.com/t/combo-mysql-rails-dbd-question-how-do-i-do-rankings/144194 "2008-07-28T01:55:10Z")

</div>

So I’m trying to be jack of all trades on a project, and instead i am mastering none. Let’s say I have a table of users. Each user has a popularity score which is a non-negative float. On each user’s homepage I want…

---

## [Subclass does not call super in constructor](https://www.ruby-forum.com/t/subclass-does-not-call-super-in-constructor/144226)

<div class="topic-metadata">

**Author:** [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Replies:** 1\
**Last updated:** [July 28, 2008, 1:33am UTC](https://www.ruby-forum.com/t/subclass-does-not-call-super-in-constructor/144226 "2008-07-28T01:33:33Z")

</div>

I am working with the book agile Web D. second edition, and in page 110 there is an example i how to create the model CartItem. I am using rails 2.0 and after adding the class CartItem I get an error at the construct…

---

## [Two peculiarities with Rails.cache.fetch()](https://www.ruby-forum.com/t/two-peculiarities-with-rails-cache-fetch/144270)

<div class="topic-metadata">

**Author:** [@robb](https://www.ruby-forum.com/u/robb)\
**Replies:** 0\
**Last updated:** [July 28, 2008, 12:15am UTC](https://www.ruby-forum.com/t/two-peculiarities-with-rails-cache-fetch/144270 "2008-07-28T00:15:14Z")

</div>

Hi, I’m experimenting with using this inside of models which provide mostly static data from the database. However, both cases where I wanted to use it, it seems to not work; I’m not sure if it’s me, or the library: …

---

## [Additional parameter for nested resources](https://www.ruby-forum.com/t/additional-parameter-for-nested-resources/144193)

<div class="topic-metadata">

**Author:** [@julian](https://www.ruby-forum.com/u/julian)\
**Replies:** 5\
**Last updated:** [July 27, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/additional-parameter-for-nested-resources/144193 "2008-07-27T22:44:31Z")

</div>

Hi I’m working with rails 2.1.0 and with nested resources. My links i generate with the following helper: link\_to @state.name, \[@country, @state\] Everything works fine and the urls are correctly generated. But now I…

---

## [Text not rendering as html](https://www.ruby-forum.com/t/text-not-rendering-as-html/144210)

<div class="topic-metadata">

**Author:** [@messismore](https://www.ruby-forum.com/u/messismore)\
**Replies:** 5\
**Last updated:** [July 27, 2008, 9:37pm UTC](https://www.ruby-forum.com/t/text-not-rendering-as-html/144210 "2008-07-27T21:37:37Z")

</div>

Hi, I initially posted this in the Rails Deployment section by accident. I have set up TinyMCE as an inkine javascript text editor on my text areas, but when I open show.html.erb it renders out, for example, bold tag…

---

## [\[newbie prob\] Errno::ECONNREFUSED in SayController#hello](https://www.ruby-forum.com/t/newbie-prob-errno-econnrefused-in-saycontroller-hello/144239)

<div class="topic-metadata">

**Author:** [@luckyzenn](https://www.ruby-forum.com/u/luckyzenn)\
**Replies:** 3\
**Last updated:** [July 27, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/newbie-prob-errno-econnrefused-in-saycontroller-hello/144239 "2008-07-27T20:45:43Z")

</div>

hello! i created a controller named ‘Say’ and added an action ‘hello’ into it. now i just wanted to call it with localhost:3000/say/hello but i get this error msg: Errno::ECONNREFUSED in SayController#hello here is …

---

## [Finding users in a group returned query](https://www.ruby-forum.com/t/finding-users-in-a-group-returned-query/143381)

<div class="topic-metadata">

**Author:** [@GearSSS\_id\_OSCealla](https://www.ruby-forum.com/u/GearSSS_id_OSCealla)\
**Replies:** 11\
**Last updated:** [July 27, 2008, 8:11pm UTC](https://www.ruby-forum.com/t/finding-users-in-a-group-returned-query/143381 "2008-07-27T20:11:08Z")

</div>

I’m relatively new to rails and am setting up a system which contains bands and users. Both bands and users has and belongs to many of the other. In the bands “show” view, I want to list all the users within a band. …

---

## [Mongrel freeze](https://www.ruby-forum.com/t/mongrel-freeze/143297)

<div class="topic-metadata">

**Author:** [@billv](https://www.ruby-forum.com/u/billv)\
**Replies:** 1\
**Last updated:** [July 27, 2008, 7:25pm UTC](https://www.ruby-forum.com/t/mongrel-freeze/143297 "2008-07-27T19:25:49Z")

</div>

Hi, I am having a problem with mongrel not responding after a period of inactivity. Searching the various logs and such, it seems to be a problem with mysql. The facts: I am running CentOS5 I do not have a warning…

---

## [Is RoR dependent on JavaScript?](https://www.ruby-forum.com/t/is-ror-dependent-on-javascript/144200)

<div class="topic-metadata">

**Author:** [@tinney](https://www.ruby-forum.com/u/tinney)\
**Replies:** 9\
**Last updated:** [July 27, 2008, 7:01pm UTC](https://www.ruby-forum.com/t/is-ror-dependent-on-javascript/144200 "2008-07-27T19:01:39Z")

</div>

Hello everyone, I was wondering, is Ruby on Rails dependent on JavaScript? A little background to this question: I created a link that would remove an element from the database. Thus, this link has a :method =\> :dele…

---

## [AR model using a table form another database](https://www.ruby-forum.com/t/ar-model-using-a-table-form-another-database/144215)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 1\
**Last updated:** [July 27, 2008, 6:57pm UTC](https://www.ruby-forum.com/t/ar-model-using-a-table-form-another-database/144215 "2008-07-27T18:57:33Z")

</div>

Is there a way to configure an ActiveRecord model to use table in another database? I ask this becouse our user table is a centralized one, used by many other applications. These applications use various ways/abstra…

---

## [Access denied for root@localhost](https://www.ruby-forum.com/t/access-denied-for-root-localhost/144238)

<div class="topic-metadata">

**Author:** [@joeyboy](https://www.ruby-forum.com/u/joeyboy)\
**Replies:** 5\
**Last updated:** [July 27, 2008, 6:14pm UTC](https://www.ruby-forum.com/t/access-denied-for-root-localhost/144238 "2008-07-27T18:14:38Z")

</div>

hi! when i run this command: rake db:schema:load i get: access denied for root@localhost iâ€™m 101% sure i entered the correct login name and password in config\\database.yml. i can go inside mysql environment using t…

---

## [Awesome\_nested\_set](https://www.ruby-forum.com/t/awesome-nested-set/144252)

<div class="topic-metadata">

**Author:** [@subv3](https://www.ruby-forum.com/u/subv3)\
**Replies:** 0\
**Last updated:** [July 27, 2008, 5:51pm UTC](https://www.ruby-forum.com/t/awesome-nested-set/144252 "2008-07-27T17:51:30Z")

</div>

Hi, I’ve been trying to setup a threaded comments system all weekend using various plugins and I’m now trying to use awesome\_nested\_set (http:// GitHub - collectiveidea/awesome\_nested\_set: An awesome replacement for a…

---

## [Rails Cookbook review](https://www.ruby-forum.com/t/rails-cookbook-review/144237)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 2\
**Last updated:** [July 27, 2008, 5:35pm UTC](https://www.ruby-forum.com/t/rails-cookbook-review/144237 "2008-07-27T17:35:42Z")

</div>

Guys: Stuck at the mall today, and just had to crack Rails Cookbook, by O’Reilly. It had a recipe for accepting dynamically created forms. The recipe resolved to build a grid on a page, and submit it with enumerable…

---

## [Unable to change the database](https://www.ruby-forum.com/t/unable-to-change-the-database/144243)

<div class="topic-metadata">

**Author:** [@ramu](https://www.ruby-forum.com/u/ramu)\
**Replies:** 11\
**Last updated:** [July 27, 2008, 5:31pm UTC](https://www.ruby-forum.com/t/unable-to-change-the-database/144243 "2008-07-27T17:31:01Z")

</div>

Hi All, I have started to learn RoR couple of days back. I am using Aptana editor for Rails. I created a new project called users and the database called users\_development. I have added the controller called which i…

---

## [Finding the most similar topics through tags](https://www.ruby-forum.com/t/finding-the-most-similar-topics-through-tags/144227)

<div class="topic-metadata">

**Author:** [@peter](https://www.ruby-forum.com/u/peter)\
**Replies:** 1\
**Last updated:** [July 27, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/finding-the-most-similar-topics-through-tags/144227 "2008-07-27T15:49:07Z")

</div>

I have posts, and those posts have tags. Now what i would like to do is find, for a given post, the most similar posts based on the tags they have. I’d like to retrieve a list with all the posts from all the tags that…

---

## [Error configuring s3 with attachment\_fu](https://www.ruby-forum.com/t/error-configuring-s3-with-attachment-fu/144046)

<div class="topic-metadata">

**Author:** [@seanhussey](https://www.ruby-forum.com/u/seanhussey)\
**Replies:** 2\
**Last updated:** [July 27, 2008, 2:45pm UTC](https://www.ruby-forum.com/t/error-configuring-s3-with-attachment-fu/144046 "2008-07-27T14:45:16Z")

</div>

Hi everyone, I’m configuring attachment\_fu to use s3, but I’m getting an error: Image.new NoMethodError: You have a nil object when you didn’t expect it! The error occurred while evaluating nil.tmp\_dh\_callback= fr…

---

## [Restful\_authentication issue](https://www.ruby-forum.com/t/restful-authentication-issue/144224)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 1\
**Last updated:** [July 27, 2008, 2:30pm UTC](https://www.ruby-forum.com/t/restful-authentication-issue/144224 "2008-07-27T14:30:03Z")

</div>

I cloned from github, can the generator with the --include-activation option Now when I go to create a new user account the following method in app/models/user\_observer.rb fails: def after\_save(user) UserMailer.deli…

---

## [Rails Cookbook review](https://www.ruby-forum.com/t/rails-cookbook-review/144235)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 0\
**Last updated:** [July 27, 2008, 7:12am UTC](https://www.ruby-forum.com/t/rails-cookbook-review/144235 "2008-07-27T07:12:50Z")

</div>

Guys: Stuck at the mall today, and just had to crack Rails Cookbook, by O’Reily. It had a recipe for accepting dynamically created forms. The sample output looked like this (reconstructed): p params\[:my\_form\] \[“1…

---

## [Is find(params\[:id\]) safe?](https://www.ruby-forum.com/t/is-find-params-id-safe/144221)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 4\
**Last updated:** [July 27, 2008, 6:56am UTC](https://www.ruby-forum.com/t/is-find-params-id-safe/144221 "2008-07-27T06:56:47Z")

</div>

Hi, I’m doing some basic changes related to security like the ones below: Avoiding mass assignment substituting: @comment = @tab.comments.build\[params\[:comment\]) With: @comment.body = params\[:comment\]\[:body\] Avoidi…

---

## [Help - "Cannot start a transaction within a transaction"](https://www.ruby-forum.com/t/help-cannot-start-a-transaction-within-a-transaction/144229)

<div class="topic-metadata">

**Author:** [@leeredwards](https://www.ruby-forum.com/u/leeredwards)\
**Replies:** 0\
**Last updated:** [July 27, 2008, 2:16am UTC](https://www.ruby-forum.com/t/help-cannot-start-a-transaction-within-a-transaction/144229 "2008-07-27T02:16:40Z")

</div>

This is my first Rails app, and things are going pretty well with he exception of an error that seems to be configuration-related. I’m getting a strange error on my (Railsplayground) deployed app using fast-cgi, Ruby …

---

## [Acts\_as\_versioned and Rails 2.1](https://www.ruby-forum.com/t/acts-as-versioned-and-rails-2-1/139606)

<div class="topic-metadata">

**Author:** [@toby\_privett](https://www.ruby-forum.com/u/toby_privett)\
**Replies:** 5\
**Last updated:** [July 27, 2008, 2:16am UTC](https://www.ruby-forum.com/t/acts-as-versioned-and-rails-2-1/139606 "2008-07-27T02:16:39Z")

</div>

Hello Is anyone having issues with acts\_as\_versioned and Rails 2.1 ? On saving an Active Record object using acts\_as\_versioned “NoMethodError: You have a nil object when you didn’t expect it!” and: from /opt/l…

---

## [Fixtures, how to set a serialized Hash object](https://www.ruby-forum.com/t/fixtures-how-to-set-a-serialized-hash-object/144209)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [July 26, 2008, 11:43pm UTC](https://www.ruby-forum.com/t/fixtures-how-to-set-a-serialized-hash-object/144209 "2008-07-26T23:43:23Z")

</div>

I defined in my model : … serialize :unavailables … which is set like this (Hash : “year” =\> 2-dimensional Array) {“2008” =\> Array.new(13).map!{ Array.new(32, 1)} } In my fixture I need to initiliaze this field…

---

## [Save without calling the after\_create](https://www.ruby-forum.com/t/save-without-calling-the-after-create/144217)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 0\
**Last updated:** [July 26, 2008, 9:21pm UTC](https://www.ruby-forum.com/t/save-without-calling-the-after-create/144217 "2008-07-26T21:21:03Z")

</div>

I have an observer class called AttendanceObserver which sends an email everytime a record is inserted into the Attendance table. But there are several other actions when I also save into that table but I don’t want t…

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

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