# Rails

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

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

---

## [ActionController : Exception caught](https://www.ruby-forum.com/t/actioncontroller-exception-caught/162202)

<div class="topic-metadata">

**Author:** [@intern\_ruby](https://www.ruby-forum.com/u/intern_ruby)\
**Replies:** 4\
**Last updated:** [March 8, 2009, 5:46am UTC](https://www.ruby-forum.com/t/actioncontroller-exception-caught/162202 "2009-03-08T05:46:33Z")

</div>

I am running MySql 5.0.77 and Ruby 2.2.2 I am able to add records - howeevr when I start the server, I am geting following error message. Please help. I am anot able to see the GUI. ArgumentError in UsersController#in…

---

## [Logging question](https://www.ruby-forum.com/t/logging-question/162292)

<div class="topic-metadata">

**Author:** [@errolsiegel](https://www.ruby-forum.com/u/errolsiegel)\
**Replies:** 0\
**Last updated:** [March 8, 2009, 5:30am UTC](https://www.ruby-forum.com/t/logging-question/162292 "2009-03-08T05:30:29Z")

</div>

I have been using the Slantwise Fetcher plugin for a while now. I have run into some problems lately and it’s a bit of a pain to troubleshoot because it is not clear where (or if) it logs anything. Can anybody give me…

---

## [Routes.rb problem](https://www.ruby-forum.com/t/routes-rb-problem/162189)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 5\
**Last updated:** [March 8, 2009, 4:53am UTC](https://www.ruby-forum.com/t/routes-rb-problem/162189 "2009-03-08T04:53:29Z")

</div>

I am having problem with routes.rb I want to access same page using two different url’s for that i had done following in routes.rb 1\] map.connect ‘projects/:project\_id/issues/:action’, :controller =\> ‘issues’ so w…

---

## [RESTful nested resources and polymorphism?](https://www.ruby-forum.com/t/restful-nested-resources-and-polymorphism/162287)

<div class="topic-metadata">

**Author:** [@neubyr](https://www.ruby-forum.com/u/neubyr)\
**Replies:** 2\
**Last updated:** [March 8, 2009, 3:45am UTC](https://www.ruby-forum.com/t/restful-nested-resources-and-polymorphism/162287 "2009-03-08T03:45:09Z")

</div>

With ref to my previous post: RESTful app and refactoring code in different controllers - Rails - Ruby-Forum I am now able to access items from topics controller. However, now I need to add sub-item e.g.: An item itsel…

---

## [About cache and will\_paginate](https://www.ruby-forum.com/t/about-cache-and-will-paginate/162289)

<div class="topic-metadata">

**Author:** [@rustam](https://www.ruby-forum.com/u/rustam)\
**Replies:** 0\
**Last updated:** [March 8, 2009, 3:40am UTC](https://www.ruby-forum.com/t/about-cache-and-will-paginate/162289 "2009-03-08T03:40:04Z")

</div>

Hi all , recently i have create a project with rails 2.1 and it works very well include will\_paginate ,once i have add action\_cache to the activecontroller ,the will\_paginate was out of function , i don\`t know why ,ca…

---

## [\[ANN\] ActiveRecord .from\_xml upgrade](https://www.ruby-forum.com/t/ann-activerecord-from-xml-upgrade/162284)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 0\
**Last updated:** [March 8, 2009, 2:48am UTC](https://www.ruby-forum.com/t/ann-activerecord-from-xml-upgrade/162284 "2009-03-08T02:48:53Z")

</div>

Rubies: The gist of this tiny code snip… 75525’s gists · GitHub …is a light but flexible DSL that converts XML - typically output by to\_xml() into an ActiveRecord object model. ==create or update records== Here’s…

---

## [Modrails - rogue instances using 100% cpu](https://www.ruby-forum.com/t/modrails-rogue-instances-using-100-cpu/162281)

<div class="topic-metadata">

**Author:** [@lamplighter](https://www.ruby-forum.com/u/lamplighter)\
**Replies:** 0\
**Last updated:** [March 8, 2009, 2:12am UTC](https://www.ruby-forum.com/t/modrails-rogue-instances-using-100-cpu/162281 "2009-03-08T02:12:07Z")

</div>

I am using modrails and have been randomly getting rogue ruby instances utilizing 100% cpu (4 cpus on server). The pid is not listed in passenger-status so passenger can’t take care of it. Any ideas on how to fix thi…

---

## [\[JOBS\] OzÃ©ias Sant'ana for hire](https://www.ruby-forum.com/t/jobs-oza-ias-santana-for-hire/162279)

<div class="topic-metadata">

**Author:** [@OzSSSSias\_SantSana](https://www.ruby-forum.com/u/OzSSSSias_SantSana)\
**Replies:** 0\
**Last updated:** [March 8, 2009, 1:55am UTC](https://www.ruby-forum.com/t/jobs-oza-ias-santana-for-hire/162279 "2009-03-08T01:55:40Z")

</div>

If you’re looking to hire someone with strong Rails skills, give Ozéias a look. http://railsbox.org/2009/3/4/ozeias-sant-ana-for-hire I can be contacted at removed\_email\_address@domain.invalid

---

## [Where to put my JS stuff?](https://www.ruby-forum.com/t/where-to-put-my-js-stuff/162275)

<div class="topic-metadata">

**Author:** [@mathieu\_r](https://www.ruby-forum.com/u/mathieu_r)\
**Replies:** 0\
**Last updated:** [March 8, 2009, 12:48am UTC](https://www.ruby-forum.com/t/where-to-put-my-js-stuff/162275 "2009-03-08T00:48:23Z")

</div>

Hello, I’d link to know your opinion about where should I put some JS logic, In a form i put it all in the submit button, and in another I put it in the controller. See: First way: Form: \<%= submit\_to\_remote ‘Save…

---

## [Be careful of BIGINT primary key fields in MySQL. Will cause problems with ActiveRecord create (but](https://www.ruby-forum.com/t/be-careful-of-bigint-primary-key-fields-in-mysql-will-cause-problems-with-activerecord-create-but/162271)

<div class="topic-metadata">

**Author:** [@chrisf](https://www.ruby-forum.com/u/chrisf)\
**Replies:** 0\
**Last updated:** [March 7, 2009, 11:28pm UTC](https://www.ruby-forum.com/t/be-careful-of-bigint-primary-key-fields-in-mysql-will-cause-problems-with-activerecord-create-but/162271 "2009-03-07T23:28:09Z")

</div>

The MySQL/Ruby library doesn’t properly handle inserts into tables with the primary key being a BIGINT If the ID returned to the MySQL/Ruby library is LARGER than the INT range, the value is returned to Ruby truncated…

---

## [RJS: pass javascript variables in ruby calls](https://www.ruby-forum.com/t/rjs-pass-javascript-variables-in-ruby-calls/162269)

<div class="topic-metadata">

**Author:** [@deadinplastic](https://www.ruby-forum.com/u/deadinplastic)\
**Replies:** 0\
**Last updated:** [March 7, 2009, 9:45pm UTC](https://www.ruby-forum.com/t/rjs-pass-javascript-variables-in-ruby-calls/162269 "2009-03-07T21:45:43Z")

</div>

Hey, I have this link\_to\_function which takes an RJS block as follows: page.insert\_html :bottom, :documents, :partial =\> “upload\_fields”, :locals =\> { :doc =\> Document.new, :index =\> ‘UNIQUE\_ID’ } It adds a partial …

---

## [Gem update problem](https://www.ruby-forum.com/t/gem-update-problem/162158)

<div class="topic-metadata">

**Author:** [@chimorito](https://www.ruby-forum.com/u/chimorito)\
**Replies:** 3\
**Last updated:** [March 7, 2009, 8:45pm UTC](https://www.ruby-forum.com/t/gem-update-problem/162158 "2009-03-07T20:45:50Z")

</div>

Hi, firs at all sorry if my english is not the best. I’m working with OSX and i have a problem trying to launc localhost. In mongrel.log i can see this message: Agent Log is found in /Users/jose/rankia/log/newrelic\_ag…

---

## [Sending multiple checkboxes values clicking a link](https://www.ruby-forum.com/t/sending-multiple-checkboxes-values-clicking-a-link/162266)

<div class="topic-metadata">

**Author:** [@kinunt](https://www.ruby-forum.com/u/kinunt)\
**Replies:** 1\
**Last updated:** [March 7, 2009, 8:24pm UTC](https://www.ruby-forum.com/t/sending-multiple-checkboxes-values-clicking-a-link/162266 "2009-03-07T20:24:49Z")

</div>

Hi, I have multiple checkboxes in a table each one representing an item. They are like this: \[…\] \<%= check\_box "incidencias\_ids", incidencia.id %\> \<%=h incidencia.cliente.nombre %\> \[...\] In the controller I have: in…

---

## [I cannt able to save the data.?](https://www.ruby-forum.com/t/i-cannt-able-to-save-the-data/162264)

<div class="topic-metadata">

**Author:** [@haneef5k](https://www.ruby-forum.com/u/haneef5k)\
**Replies:** 5\
**Last updated:** [March 7, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/i-cannt-able-to-save-the-data/162264 "2009-03-07T19:39:36Z")

</div>

ActiveRecord::StatementInvalid in PublicController#create Mysql::Error: Unknown column ‘albums.artist’ in ‘where clause’: SELECT FROM albums WHERE (albums.artist IS NULL) LIMIT 1

---

## [Re: OpenFlash Chart not able to load the flash](https://www.ruby-forum.com/t/re-openflash-chart-not-able-to-load-the-flash/162260)

<div class="topic-metadata">

**Author:** [@rainer54](https://www.ruby-forum.com/u/rainer54)\
**Replies:** 0\
**Last updated:** [March 7, 2009, 6:02pm UTC](https://www.ruby-forum.com/t/re-openflash-chart-not-able-to-load-the-flash/162260 "2009-03-07T18:02:12Z")

</div>

Had a similar issue, solution was to place the “call” for the chart into the view: \<%= javascript\_include\_tag “swfobject.js” %\> \<% chart\_action = “/flash\_charts/#{@offer.id}/price\_quantity\_chart” %\> \<% @graph = open…

---

## [Parsing html files =\> putting them in fixtures for testing](https://www.ruby-forum.com/t/parsing-html-files-putting-them-in-fixtures-for-testing/162248)

<div class="topic-metadata">

**Author:** [@costi](https://www.ruby-forum.com/u/costi)\
**Replies:** 2\
**Last updated:** [March 7, 2009, 5:45pm UTC](https://www.ruby-forum.com/t/parsing-html-files-putting-them-in-fixtures-for-testing/162248 "2009-03-07T17:45:47Z")

</div>

I’m using Hpricot parser to scrape web pages. I saved two of these pages for a test in lack of a better way, I put the html files in the fixtures like this: dl\_found\_tickets: html: “\<%= File.read( ‘test/fixtures/html…

---

## [Counter cache problem](https://www.ruby-forum.com/t/counter-cache-problem/162246)

<div class="topic-metadata">

**Author:** [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Replies:** 2\
**Last updated:** [March 7, 2009, 5:20pm UTC](https://www.ruby-forum.com/t/counter-cache-problem/162246 "2009-03-07T17:20:32Z")

</div>

Here is the problem There is a gallery model and image model gallery has many images gallery has images\_count. When I change image from one gallery to another i have to update the counter cache(It does not happen au…

---

## [Plugin Announce: active\_record\_random\_find (finding random models with ActiveRecord)](https://www.ruby-forum.com/t/plugin-announce-active-record-random-find-finding-random-models-with-activerecord/162256)

<div class="topic-metadata">

**Author:** [@rooster](https://www.ruby-forum.com/u/rooster)\
**Replies:** 0\
**Last updated:** [March 7, 2009, 4:58pm UTC](https://www.ruby-forum.com/t/plugin-announce-active-record-random-find-finding-random-models-with-activerecord/162256 "2009-03-07T16:58:51Z")

</div>

Need to get a random record from the database using Active Record? Use the spiffy new plugin Active Record Random Find, which uses no vendor-specific database function calls. I wrote a little bit about it here: htt…

---

## [How to access the binding of the caller within a method](https://www.ruby-forum.com/t/how-to-access-the-binding-of-the-caller-within-a-method/161761)

<div class="topic-metadata">

**Author:** [@clive](https://www.ruby-forum.com/u/clive)\
**Replies:** 1\
**Last updated:** [March 7, 2009, 3:36pm UTC](https://www.ruby-forum.com/t/how-to-access-the-binding-of-the-caller-within-a-method/161761 "2009-03-07T15:36:49Z")

</div>

Probably this is a ruby trick instead of Rails’. But the context of my question is in Rails. There are a lot of prompt to user in our Rails app. I don’t want to hard-code those prompt every where, since they will be c…

---

## [Upgrade to Rails 2](https://www.ruby-forum.com/t/upgrade-to-rails-2/161898)

<div class="topic-metadata">

**Author:** [@anrake](https://www.ruby-forum.com/u/anrake)\
**Replies:** 12\
**Last updated:** [March 7, 2009, 2:42pm UTC](https://www.ruby-forum.com/t/upgrade-to-rails-2/161898 "2009-03-07T14:42:23Z")

</div>

Hi, I’m a little bit behind the curve I guess. I need to upgrade my app from Rails 1.2.6 to the most recent version 2.2.2. Are there any complete guides (including Peepcodes or Pragmatic pdf books) that give you a …

---

## [OzÃ©ias Sant'ana for hire](https://www.ruby-forum.com/t/oza-ias-santana-for-hire/162249)

<div class="topic-metadata">

**Author:** [@OzSSSSias\_SantSana](https://www.ruby-forum.com/u/OzSSSSias_SantSana)\
**Replies:** 0\
**Last updated:** [March 7, 2009, 1:35pm UTC](https://www.ruby-forum.com/t/oza-ias-santana-for-hire/162249 "2009-03-07T13:35:37Z")

</div>

If you’re looking to hire someone with strong Ruby/Rails skills, give Ozéias a look. http://railsbox.org/2009/3/4/ozeias-sant-ana-for-hire I can be contacted at removed\_email\_address@domain.invalid

---

## [How would I extract data from this hash?](https://www.ruby-forum.com/t/how-would-i-extract-data-from-this-hash/162228)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 6\
**Last updated:** [March 7, 2009, 1:35pm UTC](https://www.ruby-forum.com/t/how-would-i-extract-data-from-this-hash/162228 "2009-03-07T13:35:35Z")

</div>

I’m trying to convert a simple: @teams = Team.all into this form: @teams\_created = { 1.day.ago =\> { :teams\_created =\> 100 }, 2.day.ago =\> { :teams\_created =\> 200 } } Know how I would do it? I’m googling for the an…

---

## [Setting header in views?](https://www.ruby-forum.com/t/setting-header-in-views/157655)

<div class="topic-metadata">

**Author:** [@wanyixue](https://www.ruby-forum.com/u/wanyixue)\
**Replies:** 1\
**Last updated:** [March 7, 2009, 1:32pm UTC](https://www.ruby-forum.com/t/setting-header-in-views/157655 "2009-03-07T13:32:39Z")

</div>

currently iam using FasterCSV to render csv pages format.csv do csv\_string = FasterCSV.generate do |csv| # header row csv \<\< @query\_result\[0\].keys @query\_result.each do |x| csv \<\< x.values end …

---

## [Playing videos](https://www.ruby-forum.com/t/playing-videos/162243)

<div class="topic-metadata">

**Author:** [@himdel](https://www.ruby-forum.com/u/himdel)\
**Replies:** 0\
**Last updated:** [March 7, 2009, 12:52pm UTC](https://www.ruby-forum.com/t/playing-videos/162243 "2009-03-07T12:52:13Z")

</div>

I’m working on a project that involves the playing of .avi files from a huge source library. Meta data about the files is stored in a database and the files are stored elsewhere in a file structure that is easy to acc…

---

## [Turn off profiling in tests](https://www.ruby-forum.com/t/turn-off-profiling-in-tests/162240)

<div class="topic-metadata">

**Author:** [@tobi](https://www.ruby-forum.com/u/tobi)\
**Replies:** 0\
**Last updated:** [March 7, 2009, 11:58am UTC](https://www.ruby-forum.com/t/turn-off-profiling-in-tests/162240 "2009-03-07T11:58:13Z")

</div>

Hi all, Is there a way to turn off profiling output when running app tests? It can be done by rake test 2\>/dev/null because profiling output is written to STDERR, but I want it off per default. Thanks Tobi

---

## [OpenFlash Chart not able to load the flash](https://www.ruby-forum.com/t/openflash-chart-not-able-to-load-the-flash/162236)

<div class="topic-metadata">

**Author:** [@Sahil\_D](https://www.ruby-forum.com/u/Sahil_D)\
**Replies:** 0\
**Last updated:** [March 7, 2009, 8:47am UTC](https://www.ruby-forum.com/t/openflash-chart-not-able-to-load-the-flash/162236 "2009-03-07T08:47:11Z")

</div>

hi guys, i am trying to create a simple pie chart using open flash chart v2. But i am getting this error: Open Flash Chart IO ERROR Loading test data Error #2032 This is the URL that I tried to open:/deals/graph\_…

---

## [Link\_to\_remote options to set href value](https://www.ruby-forum.com/t/link-to-remote-options-to-set-href-value/90607)

<div class="topic-metadata">

**Author:** [@senthil](https://www.ruby-forum.com/u/senthil)\
**Replies:** 1\
**Last updated:** [March 7, 2009, 7:34am UTC](https://www.ruby-forum.com/t/link-to-remote-options-to-set-href-value/90607 "2009-03-07T07:34:35Z")

</div>

HI all, i am using link\_to\_remote ajax call.I want to set the href value so that i can use the # to make it as a position tag.Basically i want to change the position after the ajax call. how to do it?? can any one he…

---

## [ArgumentError (wrong number of arguments (1 for 0)):](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments-1-for-0/162080)

<div class="topic-metadata">

**Author:** [@EduardoChinchilla](https://www.ruby-forum.com/u/EduardoChinchilla)\
**Replies:** 8\
**Last updated:** [March 7, 2009, 6:16am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments-1-for-0/162080 "2009-03-07T06:16:11Z")

</div>

Hi folks: In my create action I´m getting this messagge: ArgumentError (wrong number of arguments (1 for 0)): What does this means? Do i´m passing more or less parameters than needed? Any guidance would be very appr…

---

## [How to fix radius of the open flash chart in ruby](https://www.ruby-forum.com/t/how-to-fix-radius-of-the-open-flash-chart-in-ruby/161858)

<div class="topic-metadata">

**Author:** [@radha](https://www.ruby-forum.com/u/radha)\
**Replies:** 4\
**Last updated:** [March 7, 2009, 5:12am UTC](https://www.ruby-forum.com/t/how-to-fix-radius-of-the-open-flash-chart-in-ruby/161858 "2009-03-07T05:12:44Z")

</div>

Hello friends, i m using open flash chart plugin in my rails application to generate multiple pie charts. I want pie charts to be of equal size. Does anyone know how to set the equal radius for all the charts. i crea…

---

## [Strange rails/db performance issue](https://www.ruby-forum.com/t/strange-rails-db-performance-issue/162218)

<div class="topic-metadata">

**Author:** [@Tomim](https://www.ruby-forum.com/u/Tomim)\
**Replies:** 10\
**Last updated:** [March 7, 2009, 3:41am UTC](https://www.ruby-forum.com/t/strange-rails-db-performance-issue/162218 "2009-03-07T03:41:15Z")

</div>

I’ve got a strange problem with rails/db performance http://www.pastie.org/409654 The problem is that some queries take more than 1sek! - and i’ve got no idea why. This doesnt happen on my localhost (sqlite/mysql). T…

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

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