# Rails

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

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

---

## [Newbie question - failed to allocate memory](https://www.ruby-forum.com/t/newbie-question-failed-to-allocate-memory/186041)

<div class="topic-metadata">

**Author:** [@jman1977](https://www.ruby-forum.com/u/jman1977)\
**Replies:** 0\
**Last updated:** [March 30, 2010, 7:39pm UTC](https://www.ruby-forum.com/t/newbie-question-failed-to-allocate-memory/186041 "2010-03-30T19:39:47Z")

</div>

Hi, I am pretty new in Ruby and Rails programming. I am trying to simply output data of a really large table with many columns (around 30 columns) in an XML document using erb. I am able to loop through all the recor…

---

## [Using haml in internationalisation with haml views](https://www.ruby-forum.com/t/using-haml-in-internationalisation-with-haml-views/186040)

<div class="topic-metadata">

**Author:** [@Rob\_A](https://www.ruby-forum.com/u/Rob_A)\
**Replies:** 0\
**Last updated:** [March 30, 2010, 7:27pm UTC](https://www.ruby-forum.com/t/using-haml-in-internationalisation-with-haml-views/186040 "2010-03-30T19:27:21Z")

</div>

I’m trying to use haml in my locale files but cant get it to parse. en.yml page: content: " %p some paragraph %p another paragraph " view.html.haml ------------------- (works) =Haml::Engine.new(t('page.content…

---

## [Highcharts-rails from github not successfully installing](https://www.ruby-forum.com/t/highcharts-rails-from-github-not-successfully-installing/186035)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 0\
**Last updated:** [March 30, 2010, 7:00pm UTC](https://www.ruby-forum.com/t/highcharts-rails-from-github-not-successfully-installing/186035 "2010-03-30T19:00:43Z")

</div>

Hey all, I tried to install the highcharts-rails plugin from github as specified in the instructions: Installation Get the plugin: script/plugin install git://github.com/loudpixel/highcharts-rails.git Run the rake …

---

## [Setting up has\_many](https://www.ruby-forum.com/t/setting-up-has-many/186033)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 2\
**Last updated:** [March 30, 2010, 7:00pm UTC](https://www.ruby-forum.com/t/setting-up-has-many/186033 "2010-03-30T19:00:25Z")

</div>

Do I have to manually set a column in a dependent table for the id of the object to which it belongs? I have a collection of objects called photos that are owned by a analysis object. When I try to show an attribute …

---

## [Rounding problem](https://www.ruby-forum.com/t/rounding-problem/186004)

<div class="topic-metadata">

**Author:** [@JanneKo](https://www.ruby-forum.com/u/JanneKo)\
**Replies:** 6\
**Last updated:** [March 30, 2010, 6:05pm UTC](https://www.ruby-forum.com/t/rounding-problem/186004 "2010-03-30T18:05:23Z")

</div>

Hi, I have a strange problem with number rounding: If I try “a\_number.round(2)” in console - it works, but the same line thru passenger fails: “wrong number of arguments (1 for 0)”. Any ideas why? I’m running rails …

---

## [SystemTimer not installing correctly](https://www.ruby-forum.com/t/systemtimer-not-installing-correctly/186031)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 0\
**Last updated:** [March 30, 2010, 6:00pm UTC](https://www.ruby-forum.com/t/systemtimer-not-installing-correctly/186031 "2010-03-30T18:00:07Z")

</div>

Here is the output when I try to install the gem: Building native extensions. This could take a while… Successfully installed SystemTimer-1.2 1 gem installed Installing ri documentation for SystemTimer-1.2… Updatin…

---

## [Installing imagemagick](https://www.ruby-forum.com/t/installing-imagemagick/186026)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 0\
**Last updated:** [March 30, 2010, 5:01pm UTC](https://www.ruby-forum.com/t/installing-imagemagick/186026 "2010-03-30T17:01:33Z")

</div>

I installed ImageMagick and I have this in my model: has\_attached\_file :image, :style =\> { :small =\> “150x150\>”} then in show I have \<%= image\_tag @analysis.image.url(:small) %\> But the name of the file is displaying…

---

## [List of gems and plugins available in ROR](https://www.ruby-forum.com/t/list-of-gems-and-plugins-available-in-ror/186021)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 1\
**Last updated:** [March 30, 2010, 3:12pm UTC](https://www.ruby-forum.com/t/list-of-gems-and-plugins-available-in-ror/186021 "2010-03-30T15:12:15Z")

</div>

Hi, Can I get the list of all gems and plugins avaliable for ror? Can anyone know URl where I can find list? Thanks Tushar

---

## [Debugger problems](https://www.ruby-forum.com/t/debugger-problems/185742)

<div class="topic-metadata">

**Author:** [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Replies:** 20\
**Last updated:** [March 30, 2010, 3:10pm UTC](https://www.ruby-forum.com/t/debugger-problems/185742 "2010-03-30T15:10:42Z")

</div>

Hi, I’m trying to debug my web application using the ‘debugger’ method, unfortunately I get an error that the debugger method could not be found. I have installed ruby-debu and started it with ‘ruby script/server --de…

---

## [To translate this query to railsway](https://www.ruby-forum.com/t/to-translate-this-query-to-railsway/185992)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 3\
**Last updated:** [March 30, 2010, 2:49pm UTC](https://www.ruby-forum.com/t/to-translate-this-query-to-railsway/185992 "2010-03-30T14:49:43Z")

</div>

Hi I have the tables users, roles, memberships( join table between users and roles. Between users and roles there is has\_many :through relation ship) privileges, permissions (join table between roles and privileges. …

---

## [Selenium-client - get matching elements and their attributes](https://www.ruby-forum.com/t/selenium-client-get-matching-elements-and-their-attributes/186020)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [March 30, 2010, 2:21pm UTC](https://www.ruby-forum.com/t/selenium-client-get-matching-elements-and-their-attributes/186020 "2010-03-30T14:21:35Z")

</div>

hi all I’m using selenium-client with selenium rspec. I’m trying to build a helper method that will, given this html on the page… \<div id="flashes"\> \<p id="flash\_notice" class="messages notice"\>good things\</p\> …

---

## [Send updates to facebook](https://www.ruby-forum.com/t/send-updates-to-facebook/186017)

<div class="topic-metadata">

**Author:** [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Replies:** 0\
**Last updated:** [March 30, 2010, 1:46pm UTC](https://www.ruby-forum.com/t/send-updates-to-facebook/186017 "2010-03-30T13:46:45Z")

</div>

Hi, I want to send updates to facebook, when user adds a song, video, images etc in the website. This should happen without intervention of user. I am using facebooker plugin. I am able to send the updates when the …

---

## [Searching two form at once](https://www.ruby-forum.com/t/searching-two-form-at-once/185931)

<div class="topic-metadata">

**Author:** [@newnw](https://www.ruby-forum.com/u/newnw)\
**Replies:** 7\
**Last updated:** [March 30, 2010, 1:03pm UTC](https://www.ruby-forum.com/t/searching-two-form-at-once/185931 "2010-03-30T13:03:43Z")

</div>

Hi, I have a controllers called x and y. I want to search and display “y” tables data using X’s primary key, this key is a foreign key for Y. eg- when I click "show " option in the X table’s index , I want to displ…

---

## [Medium to large sites using SQL Server](https://www.ruby-forum.com/t/medium-to-large-sites-using-sql-server/186010)

<div class="topic-metadata">

**Author:** [@stewsnooze](https://www.ruby-forum.com/u/stewsnooze)\
**Replies:** 0\
**Last updated:** [March 30, 2010, 12:50pm UTC](https://www.ruby-forum.com/t/medium-to-large-sites-using-sql-server/186010 "2010-03-30T12:50:06Z")

</div>

Hi, What sites exist within the rails community that use SQL Server 05 or 08. I have to plug my new rails site into an existing SQL Server 2008 database and want to know that this path has been trodden on a site tha…

---

## [How to deal with array of checkbox values in Ruby 1.9.1?](https://www.ruby-forum.com/t/how-to-deal-with-array-of-checkbox-values-in-ruby-1-9-1/186012)

<div class="topic-metadata">

**Author:** [@mikrogroove](https://www.ruby-forum.com/u/mikrogroove)\
**Replies:** 0\
**Last updated:** [March 30, 2010, 12:49pm UTC](https://www.ruby-forum.com/t/how-to-deal-with-array-of-checkbox-values-in-ruby-1-9-1/186012 "2010-03-30T12:49:31Z")

</div>

In Ruby 1.9.1 strings are no longer enumerable and string.each is undefined. This causes a problem when parsing values for an array of generated checkboxes since the field value, when submitted, becomes an array of st…

---

## [Auto\_complete: if no results returned, what gets submitted?](https://www.ruby-forum.com/t/auto-complete-if-no-results-returned-what-gets-submitted/185761)

<div class="topic-metadata">

**Author:** [@Wim\_Van\_D](https://www.ruby-forum.com/u/Wim_Van_D)\
**Replies:** 3\
**Last updated:** [March 30, 2010, 11:30am UTC](https://www.ruby-forum.com/t/auto-complete-if-no-results-returned-what-gets-submitted/185761 "2010-03-30T11:30:44Z")

</div>

Hi, I’m a rails noob, tring to teach myself, so feel free to point me to the correct FM if need be :wink: I’m playing with the auto\_complete plugin. I have a page to manage expenses, and there’s field ‘supplier’ to w…

---

## [404 error while testing the console](https://www.ruby-forum.com/t/404-error-while-testing-the-console/185959)

<div class="topic-metadata">

**Author:** [@raghu\_muni](https://www.ruby-forum.com/u/raghu_muni)\
**Replies:** 1\
**Last updated:** [March 30, 2010, 10:19am UTC](https://www.ruby-forum.com/t/404-error-while-testing-the-console/185959 "2010-03-30T10:19:43Z")

</div>

Hi, I’m just practising ROR creating short applications.I tried to test the console for my sample application and get a different return code from the code its mentioned in the textbook… here is the code $script con…

---

## [Validating message](https://www.ruby-forum.com/t/validating-message/185853)

<div class="topic-metadata">

**Author:** [@rahul\_m](https://www.ruby-forum.com/u/rahul_m)\
**Replies:** 12\
**Last updated:** [March 30, 2010, 10:14am UTC](https://www.ruby-forum.com/t/validating-message/185853 "2010-03-30T10:14:27Z")

</div>

Hi all, I’m new here. However, I’m so happy because I got Ruby on Rails to work on my host. Now there’s just a problem with displaying validation error message , in my view i have used the form\_tag code is as follow …

---

## [Inheritance](https://www.ruby-forum.com/t/inheritance/185997)

<div class="topic-metadata">

**Author:** [@brianp](https://www.ruby-forum.com/u/brianp)\
**Replies:** 4\
**Last updated:** [March 30, 2010, 10:03am UTC](https://www.ruby-forum.com/t/inheritance/185997 "2010-03-30T10:03:55Z")

</div>

I’ve done some reading on Single Table Inheritance. I think I need something a little more though. Classic example. class Animal \< ActiveRecord::Base // db fields: name: string age: int type: string breed: string …

---

## [Executing jar files from within rails app](https://www.ruby-forum.com/t/executing-jar-files-from-within-rails-app/185896)

<div class="topic-metadata">

**Author:** [@gautam](https://www.ruby-forum.com/u/gautam)\
**Replies:** 6\
**Last updated:** [March 30, 2010, 9:52am UTC](https://www.ruby-forum.com/t/executing-jar-files-from-within-rails-app/185896 "2010-03-30T09:52:48Z")

</div>

I have a rails app and a jar file. I want my jar file to execute when the user presses a button on the webpage. Please tell me how to do that. Any help will be highly appreciated. Thanks in anticipation. :slight\_smi…

---

## [Overriding active record methods](https://www.ruby-forum.com/t/overriding-active-record-methods/185984)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [March 30, 2010, 9:46am UTC](https://www.ruby-forum.com/t/overriding-active-record-methods/185984 "2010-03-30T09:46:21Z")

</div>

Hi, My application is running fine but now I had an requirement like when somebody tries to delete the record from database using delete or delete\_all I should not delete the record rather I should set the delete fla…

---

## [Seed\_fu and has\_many :through](https://www.ruby-forum.com/t/seed-fu-and-has-many-through/185938)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 3\
**Last updated:** [March 30, 2010, 9:44am UTC](https://www.ruby-forum.com/t/seed-fu-and-has-many-through/185938 "2010-03-30T09:44:35Z")

</div>

Hi In my application to seed data I am using seed\_fu (GitHub - mbleigh/seed-fu: Advanced seed data handling for Rails, combining the best practices of several methods together.) I have tables roles,privileges and perm…

---

## [Updating records](https://www.ruby-forum.com/t/updating-records/185962)

<div class="topic-metadata">

**Author:** [@xman2000](https://www.ruby-forum.com/u/xman2000)\
**Replies:** 6\
**Last updated:** [March 30, 2010, 9:29am UTC](https://www.ruby-forum.com/t/updating-records/185962 "2010-03-30T09:29:57Z")

</div>

So I would like to be able to update a record without having to load the edit page. Lets use checking out a book as an example. From the front page of my application I would like to be able to have a form field wher…

---

## [Switched to a has\_many :through, now User can't be blank error](https://www.ruby-forum.com/t/switched-to-a-has-many-through-now-user-cant-be-blank-error/185983)

<div class="topic-metadata">

**Author:** [@GoodGets](https://www.ruby-forum.com/u/GoodGets)\
**Replies:** 0\
**Last updated:** [March 30, 2010, 4:22am UTC](https://www.ruby-forum.com/t/switched-to-a-has-many-through-now-user-cant-be-blank-error/185983 "2010-03-30T04:22:40Z")

</div>

I just changed from a normal has\_many :blogs, belongs\_to :user relationship to a has\_many through relationship. I created a new model (subscription) and belongs\_to’d it both blog and user, and set up their has\_many :…

---

## [Can the .read method execute any files?](https://www.ruby-forum.com/t/can-the-read-method-execute-any-files/185916)

<div class="topic-metadata">

**Author:** [@GoodGets](https://www.ruby-forum.com/u/GoodGets)\
**Replies:** 3\
**Last updated:** [March 30, 2010, 2:16am UTC](https://www.ruby-forum.com/t/can-the-read-method-execute-any-files/185916 "2010-03-30T02:16:50Z")

</div>

I need to read (and parse) a user uploaded file. I check it’s MIME types, as well to see if includes proper headers by reading the file, but I was wondering can something like params\[:uploaded\_file\].read trigger any …

---

## [Routing optimisation](https://www.ruby-forum.com/t/routing-optimisation/185951)

<div class="topic-metadata">

**Author:** [@droopy](https://www.ruby-forum.com/u/droopy)\
**Replies:** 1\
**Last updated:** [March 30, 2010, 2:15am UTC](https://www.ruby-forum.com/t/routing-optimisation/185951 "2010-03-30T02:15:40Z")

</div>

I’m kind of a newbie, so I don’t understand all the power of routes and implicit render that can be found in scaffolding I have an application that have several views which are quite different but based on the contro…

---

## [Autocalculate field in a form](https://www.ruby-forum.com/t/autocalculate-field-in-a-form/185978)

<div class="topic-metadata">

**Author:** [@newnw](https://www.ruby-forum.com/u/newnw)\
**Replies:** 0\
**Last updated:** [March 30, 2010, 2:00am UTC](https://www.ruby-forum.com/t/autocalculate-field-in-a-form/185978 "2010-03-30T02:00:29Z")

</div>

Hi All, I have a form with three field X,Y and Z. I want to filed Z automatically according to the X and Y values. x and y option fileds. eg if x filed value is “j” and Y field value “m” then Z field value must fil…

---

## [Engines as Gems](https://www.ruby-forum.com/t/engines-as-gems/185976)

<div class="topic-metadata">

**Author:** [@Ray\_Boutotte](https://www.ruby-forum.com/u/Ray_Boutotte)\
**Replies:** 0\
**Last updated:** [March 29, 2010, 11:39pm UTC](https://www.ruby-forum.com/t/engines-as-gems/185976 "2010-03-29T23:39:25Z")

</div>

I have a rails engine that works quite well. We use it internally for creating all our web apps to conform to the same UI look and feel, widgets, etc… Problem is that we want to deploy it as a gem for versioning. Is …

---

## [Trying to update one collection\_select with the selection of another](https://www.ruby-forum.com/t/trying-to-update-one-collection-select-with-the-selection-of-another/185974)

<div class="topic-metadata">

**Author:** [@maximulus](https://www.ruby-forum.com/u/maximulus)\
**Replies:** 0\
**Last updated:** [March 29, 2010, 10:49pm UTC](https://www.ruby-forum.com/t/trying-to-update-one-collection-select-with-the-selection-of-another/185974 "2010-03-29T22:49:41Z")

</div>

Hello, I’ve seen numerous tutorials on this but have yet to get anything working. It’s been about 5 days, and I am getting a little frustrated, so here goes Here is the model: items has\_many inventories inventory h…

---

## [Custom resource routes](https://www.ruby-forum.com/t/custom-resource-routes/185964)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 2\
**Last updated:** [March 29, 2010, 10:42pm UTC](https://www.ruby-forum.com/t/custom-resource-routes/185964 "2010-03-29T22:42:26Z")

</div>

Hi all, this might be a dumb question, but how can you produce custom resource routes? Lets say you want to add extra parameters in your url but you want your url to stay pritty? edit\_resource\_path(:param1 =\> :value…

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

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