# Rails

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

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

---

## [RMagick 2.0 win32 install problems](https://www.ruby-forum.com/t/rmagick-2-0-win32-install-problems/124819)

<div class="topic-metadata">

**Author:** [@ss\_1982](https://www.ruby-forum.com/u/ss_1982)\
**Replies:** 4\
**Last updated:** [January 5, 2008, 2:07pm UTC](https://www.ruby-forum.com/t/rmagick-2-0-win32-install-problems/124819 "2008-01-05T14:07:48Z")

</div>

Hi, I have just followed the instructions on installing the new version of RMagick on windows xp, with no error messages. However whenever I attempt to start Mongrel I get the following error message “The applicatio…

---

## [Using IO.popen to capture stderr?](https://www.ruby-forum.com/t/using-io-popen-to-capture-stderr/82155)

<div class="topic-metadata">

**Author:** [@mvargo](https://www.ruby-forum.com/u/mvargo)\
**Replies:** 2\
**Last updated:** [January 5, 2008, 1:10pm UTC](https://www.ruby-forum.com/t/using-io-popen-to-capture-stderr/82155 "2008-01-05T13:10:10Z")

</div>

Hello, I’m trying to write a utility to run an external process and capture it’s stderr. It seems that IO.popen only lets me read the stdout. Any tips for how to read stderr? Mike snippet of code… def process\_fil…

---

## [General troubleshooting](https://www.ruby-forum.com/t/general-troubleshooting/125099)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 0\
**Last updated:** [January 5, 2008, 11:39am UTC](https://www.ruby-forum.com/t/general-troubleshooting/125099 "2008-01-05T11:39:46Z")

</div>

I want to do something like: raise Tag.find\_or\_create\_by\_tag(\[:which\_tag\]) to troubleshoot the add\_some\_tags method of the feeds controller: http://strawr.googlecode.com/svn/trunk/app/controllers/feeds\_controller.rb H…

---

## [Paginate collection bug](https://www.ruby-forum.com/t/paginate-collection-bug/122186)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 4\
**Last updated:** [January 5, 2008, 10:44am UTC](https://www.ruby-forum.com/t/paginate-collection-bug/122186 "2008-01-05T10:44:14Z")

</div>

Hello, I was looking to do pagination for collection and I found this bunch of code. def paginate\_collection(collection, options = {}) default\_options = {:per\_page =\> 5, :page =\> 1} options = default\_options.merge(o…

---

## [Advantage of nested resources?](https://www.ruby-forum.com/t/advantage-of-nested-resources/125092)

<div class="topic-metadata">

**Author:** [@chirag](https://www.ruby-forum.com/u/chirag)\
**Replies:** 0\
**Last updated:** [January 5, 2008, 10:26am UTC](https://www.ruby-forum.com/t/advantage-of-nested-resources/125092 "2008-01-05T10:26:05Z")

</div>

I don’t know if I understand the advantage of a nested REST resource. Is it simply the cleaner URL? This web site shows 6 different steps to get it to work: http://earthcode.com/blog/2007/01/nested\_crud\_resources\_in\_r…

---

## [Timed\_fragment\_cache Slowdown!](https://www.ruby-forum.com/t/timed-fragment-cache-slowdown/124946)

<div class="topic-metadata">

**Author:** [@dcgrigsby](https://www.ruby-forum.com/u/dcgrigsby)\
**Replies:** 1\
**Last updated:** [January 5, 2008, 8:27am UTC](https://www.ruby-forum.com/t/timed-fragment-cache-slowdown/124946 "2008-01-05T08:27:31Z")

</div>

Hi, I’ve implemented timed\_fragment\_cache in an app I’m working on. It works fine, but my entire app has slowed down. Many pages where I use to get 60 req/sec, are now at 15-20 req/sec and the percentage of processing …

---

## [Must have plugins](https://www.ruby-forum.com/t/must-have-plugins/125075)

<div class="topic-metadata">

**Author:** [@arun](https://www.ruby-forum.com/u/arun)\
**Replies:** 3\
**Last updated:** [January 5, 2008, 7:57am UTC](https://www.ruby-forum.com/t/must-have-plugins/125075 "2008-01-05T07:57:02Z")

</div>

I wanted to know what are the most common plugins that experienced rails users have in their toolbox. I have seen attachment\_fu acts\_as\_list acts\_as\_versioned restful\_authentication I am still learning and see so ma…

---

## [One on the issue of the return win32api](https://www.ruby-forum.com/t/one-on-the-issue-of-the-return-win32api/125089)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 5, 2008, 7:09am UTC](https://www.ruby-forum.com/t/one-on-the-issue-of-the-return-win32api/125089 "2008-01-05T07:09:05Z")

</div>

hello,all: The code below: return = Win32API.new(“my.dll”, “myfunction”, “PI”, “P”).call(params) The return value is a type C-Structure For example, struct person{ int age; char\* name; } In the process of ruby,I…

---

## [Problem with Auto Complete](https://www.ruby-forum.com/t/problem-with-auto-complete/125087)

<div class="topic-metadata">

**Author:** [@Damien\_Hunter](https://www.ruby-forum.com/u/Damien_Hunter)\
**Replies:** 0\
**Last updated:** [January 5, 2008, 6:13am UTC](https://www.ruby-forum.com/t/problem-with-auto-complete/125087 "2008-01-05T06:13:35Z")

</div>

I tried posting this in the Ruby on Rails talk group but haven’t been able to get a decent reply. Sorry if this isn’t the appropriate place to be posting this (if someone could tell me where I can post it, I’d be more…

---

## [How to properly nest controllers?](https://www.ruby-forum.com/t/how-to-properly-nest-controllers/125085)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 0\
**Last updated:** [January 5, 2008, 5:38am UTC](https://www.ruby-forum.com/t/how-to-properly-nest-controllers/125085 "2008-01-05T05:38:21Z")

</div>

I hwas just curious what kind of “convention” everyone uses when nesting controllers. Every time I put controllers under a folder I have them extend a controller with the same name. Is this a good practice? For exampl…

---

## [Has\_one belongs\_to?](https://www.ruby-forum.com/t/has-one-belongs-to/125079)

<div class="topic-metadata">

**Author:** [@spokra](https://www.ruby-forum.com/u/spokra)\
**Replies:** 2\
**Last updated:** [January 5, 2008, 4:52am UTC](https://www.ruby-forum.com/t/has-one-belongs-to/125079 "2008-01-05T04:52:58Z")

</div>

ok the models look like this: class User \< ActiveRecord::Base has\_one :address class Address \< ActiveRecord::Base belongs\_to :user and my tables: users has has the normal id field… and the addresses has user\_id. d…

---

## [Server to laptop file syncing?](https://www.ruby-forum.com/t/server-to-laptop-file-syncing/124989)

<div class="topic-metadata">

**Author:** [@mel\_ram](https://www.ruby-forum.com/u/mel_ram)\
**Replies:** 11\
**Last updated:** [January 5, 2008, 4:26am UTC](https://www.ruby-forum.com/t/server-to-laptop-file-syncing/124989 "2008-01-05T04:26:05Z")

</div>

How do you manage your server to laptop file syncing? I’ve got a web server configured and ready to start using a live development server. I have been using sftpdrive and just developing straight on the server… but so…

---

## [Attachment\_fu + mini\_magick troubleshooting](https://www.ruby-forum.com/t/attachment-fu-mini-magick-troubleshooting/125074)

<div class="topic-metadata">

**Author:** [@truetype](https://www.ruby-forum.com/u/truetype)\
**Replies:** 0\
**Last updated:** [January 5, 2008, 1:40am UTC](https://www.ruby-forum.com/t/attachment-fu-mini-magick-troubleshooting/125074 "2008-01-05T01:40:37Z")

</div>

I’ve got a model with :has\_attachment with content of image type. When I’m trying to save an image, the following line in the log appears: Exception working with image: ImageMagick command (identify “C:/ WINDOWS/TEMP…

---

## [String concat person's name](https://www.ruby-forum.com/t/string-concat-persons-name/125059)

<div class="topic-metadata">

**Author:** [@backz](https://www.ruby-forum.com/u/backz)\
**Replies:** 3\
**Last updated:** [January 5, 2008, 12:25am UTC](https://www.ruby-forum.com/t/string-concat-persons-name/125059 "2008-01-05T00:25:02Z")

</div>

Hi, If I have person’s name and I want to concatenate last name only, how do I do that?(They are separated by space.) ex)first\_name last\_name ex)first\_name middle\_name last\_name thanks,

---

## [Unknown column error](https://www.ruby-forum.com/t/unknown-column-error/124702)

<div class="topic-metadata">

**Author:** [@Haris\_G](https://www.ruby-forum.com/u/Haris_G)\
**Replies:** 13\
**Last updated:** [January 5, 2008, 12:13am UTC](https://www.ruby-forum.com/t/unknown-column-error/124702 "2008-01-05T00:13:16Z")

</div>

Hello all, I am getting an unknown column error (mentioned below). What I want to do is, extract the language a person speaks. This column is present in the mhp\_register table, and the profile information is present …

---

## [Undefined method \`content\_type'](https://www.ruby-forum.com/t/undefined-method-content-type/124628)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 3\
**Last updated:** [January 4, 2008, 10:50pm UTC](https://www.ruby-forum.com/t/undefined-method-content-type/124628 "2008-01-04T22:50:46Z")

</div>

I am using form\_remote\_tag to upload a file, but it says … undefined method \`content\_type’ for #String:0x477a930 what could be wrong when it works fine with form\_for?

---

## [Nil error on ActiveRecord::save!](https://www.ruby-forum.com/t/nil-error-on-activerecord-save/124585)

<div class="topic-metadata">

**Author:** [@bluestar](https://www.ruby-forum.com/u/bluestar)\
**Replies:** 14\
**Last updated:** [January 4, 2008, 10:33pm UTC](https://www.ruby-forum.com/t/nil-error-on-activerecord-save/124585 "2008-01-04T22:33:05Z")

</div>

Hi, I am trying to save an ActiveRecord object, and I am getting a strange error - I checked and all of the required fields of the objects seem to be present. Here is what I try to do: self.user.save! And the error …

---

## [In\_vertical\_groups\_of](https://www.ruby-forum.com/t/in-vertical-groups-of/124712)

<div class="topic-metadata">

**Author:** [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Replies:** 7\
**Last updated:** [January 4, 2008, 10:24pm UTC](https://www.ruby-forum.com/t/in-vertical-groups-of/124712 "2008-01-04T22:24:19Z")

</div>

Hi all, Here’s another contribution for anyone interested. In Railscast episode 28, Ryan B. showed us in\_groups\_of which allows you to group array members such as list = \[1, 2, 3, 4, 5, 6, 7\] =\> \[1, 2, 3, 4, 5, 6,…

---

## [Rails 1.2.6 or 2.0](https://www.ruby-forum.com/t/rails-1-2-6-or-2-0/125022)

<div class="topic-metadata">

**Author:** [@limlian](https://www.ruby-forum.com/u/limlian)\
**Replies:** 6\
**Last updated:** [January 4, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/rails-1-2-6-or-2-0/125022 "2008-01-04T22:00:48Z")

</div>

Hi all, If you are starting to develop a new Rails application, which version of rails will you choose, 1.2.6 or 2.0? For me, the reasons to choose 1.2.6 are: I have the book “Agile Web D. With Rails 2nd” at hand f…

---

## [Major Rails events of 2007](https://www.ruby-forum.com/t/major-rails-events-of-2007/124969)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 1\
**Last updated:** [January 4, 2008, 9:50pm UTC](https://www.ruby-forum.com/t/major-rails-events-of-2007/124969 "2008-01-04T21:50:50Z")

</div>

I’m writing an article about the Rails events of the past year. I have all the obvious stuff (1.2 and 2.0 releases, etc.), and I’m looking for suggestions about key site launches and so forth. What are the most notabl…

---

## [Documentation: 1.2.6 or 2.0](https://www.ruby-forum.com/t/documentation-1-2-6-or-2-0/125050)

<div class="topic-metadata">

**Author:** [@Wakazula](https://www.ruby-forum.com/u/Wakazula)\
**Replies:** 2\
**Last updated:** [January 4, 2008, 9:47pm UTC](https://www.ruby-forum.com/t/documentation-1-2-6-or-2-0/125050 "2008-01-04T21:47:54Z")

</div>

Hello. Some projects have different reference manuals/documentation (e.g. MySql 4.1, MySql 5.0, MySql 5.1,…) for each major release. Is there an easy way to read the Rails API documentation (http:// api.rubyonrails.o…

---

## [Making an child before the parent is commited to DB](https://www.ruby-forum.com/t/making-an-child-before-the-parent-is-commited-to-db/124965)

<div class="topic-metadata">

**Author:** [@galeal](https://www.ruby-forum.com/u/galeal)\
**Replies:** 4\
**Last updated:** [January 4, 2008, 9:21pm UTC](https://www.ruby-forum.com/t/making-an-child-before-the-parent-is-commited-to-db/124965 "2008-01-04T21:21:36Z")

</div>

Say I have a model something like this Parent has\_many kids Kid belongs\_to Parent. Now I have view for say a new Parent. I also have provided an AJAX form so that they can fill in all the children they have as well. …

---

## [Layout switching and varialbes](https://www.ruby-forum.com/t/layout-switching-and-varialbes/124784)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 3\
**Last updated:** [January 4, 2008, 9:01pm UTC](https://www.ruby-forum.com/t/layout-switching-and-varialbes/124784 "2008-01-04T21:01:37Z")

</div>

I have a problem with a function, I tried to achieve a layout switching according to the user level that’s logged in (session\[:user\_level\] ) the function looks like this def switch\_layout case session\[:user\_level\].t…

---

## [Which version contains changeset 6850](https://www.ruby-forum.com/t/which-version-contains-changeset-6850/125043)

<div class="topic-metadata">

**Author:** [@Urvashi\_Gadi](https://www.ruby-forum.com/u/Urvashi_Gadi)\
**Replies:** 0\
**Last updated:** [January 4, 2008, 8:03pm UTC](https://www.ruby-forum.com/t/which-version-contains-changeset-6850/125043 "2008-01-04T20:03:41Z")

</div>

I m unable to figure out. Thanks

---

## [Difference between self.field and self\[:field\] in model callbacks?](https://www.ruby-forum.com/t/difference-between-self-field-and-self-field-in-model-callbacks/125037)

<div class="topic-metadata">

**Author:** [@ajs](https://www.ruby-forum.com/u/ajs)\
**Replies:** 0\
**Last updated:** [January 4, 2008, 7:14pm UTC](https://www.ruby-forum.com/t/difference-between-self-field-and-self-field-in-model-callbacks/125037 "2008-01-04T19:14:56Z")

</div>

I have a before\_save callback that does a bit of housekeeping to the model data before it’s saved. The Rails documentation often attests the use of self.field to change data before it’s saved, eg: def before\_save se…

---

## [Ruby and FBML](https://www.ruby-forum.com/t/ruby-and-fbml/125036)

<div class="topic-metadata">

**Author:** [@Haris\_G](https://www.ruby-forum.com/u/Haris_G)\
**Replies:** 0\
**Last updated:** [January 4, 2008, 6:56pm UTC](https://www.ruby-forum.com/t/ruby-and-fbml/125036 "2008-01-04T18:56:10Z")

</div>

Hello all, I am developing a facebook application using FBML/RFacebook. My index.rhtmlfile only contains \<fb:profile-pic uid=loggedinuser\>. This is working in FBML test console provided by facebook. This also works o…

---

## [Form\_tag issues after Rails upgrade to 2.0.2](https://www.ruby-forum.com/t/form-tag-issues-after-rails-upgrade-to-2-0-2/124948)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 7\
**Last updated:** [January 4, 2008, 6:40pm UTC](https://www.ruby-forum.com/t/form-tag-issues-after-rails-upgrade-to-2-0-2/124948 "2008-01-04T18:40:58Z")

</div>

Any idea why this form\_tag is broken after moving from Rails 1.2.6 → 2.0.2? \<% form\_tag :controller =\> ‘login’, :action =\> ‘login’ do -%\> I get the error: wrong number of arguments (1 for 2) I have tried several ot…

---

## [Sorting Index](https://www.ruby-forum.com/t/sorting-index/125033)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 0\
**Last updated:** [January 4, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/sorting-index/125033 "2008-01-04T18:31:33Z")

</div>

Hi, I have a question about sorting a RESTful application. On my index page there are several types of videos I would like to sort, ranging from new, to top rated and more, and beyond that I would like the user to, fo…

---

## [Localization plugin function in viewer issue](https://www.ruby-forum.com/t/localization-plugin-function-in-viewer-issue/124995)

<div class="topic-metadata">

**Author:** [@myst\_tt](https://www.ruby-forum.com/u/myst_tt)\
**Replies:** 1\
**Last updated:** [January 4, 2008, 6:25pm UTC](https://www.ruby-forum.com/t/localization-plugin-function-in-viewer-issue/124995 "2008-01-04T18:25:07Z")

</div>

Hello, dudes: My app utilises “Localization” plugin, and in the view, I added a link as follow: \<%= link\_to \_ ‘Sign up’, :controller =\> ‘account’, :action =\> ‘signup’ %\> \_ 'Sign up' , this part, it does translate th…

---

## [Easy Array Question](https://www.ruby-forum.com/t/easy-array-question/125032)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 1\
**Last updated:** [January 4, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/easy-array-question/125032 "2008-01-04T18:17:30Z")

</div>

I have part of my code where I get an array full of user\_ids, sort of like this: @user\_ids = \[1,3,44,5,6\] Is there a way for me to do something like @the users = User.find\_all\_by\_id(@user\_ids) that will get all thos…

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

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