# Rails

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

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

---

## [Rake test takes too much memory, starts swapping](https://www.ruby-forum.com/t/rake-test-takes-too-much-memory-starts-swapping/165824)

<div class="topic-metadata">

**Author:** [@chillexistence](https://www.ruby-forum.com/u/chillexistence)\
**Replies:** 0\
**Last updated:** [April 17, 2009, 10:03pm UTC](https://www.ruby-forum.com/t/rake-test-takes-too-much-memory-starts-swapping/165824 "2009-04-17T22:03:33Z")

</div>

I’ve noticed with a large rails project with lots of tests, when you run them all the amount of memory the ruby process allocates is a lot. It seems like every object in every test is being retained. Like the garbage…

---

## [Caches\_action for ajax call](https://www.ruby-forum.com/t/caches-action-for-ajax-call/165823)

<div class="topic-metadata">

**Author:** [@mekdigital](https://www.ruby-forum.com/u/mekdigital)\
**Replies:** 0\
**Last updated:** [April 17, 2009, 9:42pm UTC](https://www.ruby-forum.com/t/caches-action-for-ajax-call/165823 "2009-04-17T21:42:06Z")

</div>

Hi all! I have an action called app/xxx that correctly creates cache when directly hit, not when invoked by an ajax call, but the ajax call will return the cached version of the action when cache is created. Should…

---

## [How to download the source](https://www.ruby-forum.com/t/how-to-download-the-source/165715)

<div class="topic-metadata">

**Author:** [@vaibhav\_darji](https://www.ruby-forum.com/u/vaibhav_darji)\
**Replies:** 3\
**Last updated:** [April 17, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/how-to-download-the-source/165715 "2009-04-17T21:18:04Z")

</div>

How to download the source from rails cast (www.railscasts.com)web site, i have seen the will\_paginate(episode -51) rails cast but, i unable to download the source coad of that screen cast, plz tell me the method to d…

---

## [Explorer like tree view in rails?](https://www.ruby-forum.com/t/explorer-like-tree-view-in-rails/165821)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [April 17, 2009, 9:13pm UTC](https://www.ruby-forum.com/t/explorer-like-tree-view-in-rails/165821 "2009-04-17T21:13:57Z")

</div>

Hello, I am looking for recommendations on a plugin or javascript lib that support building an explorer type tree view. I am somewhat afraid that the more extensive things available are fairly complex, and we want to …

---

## [Depot App Who Bought Enhancements](https://www.ruby-forum.com/t/depot-app-who-bought-enhancements/165720)

<div class="topic-metadata">

**Author:** [@eengnerd](https://www.ruby-forum.com/u/eengnerd)\
**Replies:** 3\
**Last updated:** [April 17, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/depot-app-who-bought-enhancements/165720 "2009-04-17T19:37:40Z")

</div>

I’ve completed the chapter on Internationalization successfully, but found out just recently that the “Who Bought” function produces an error page that looks very ugly when someone enters a product ID that does not ex…

---

## [Run a single test with Test::Unit?](https://www.ruby-forum.com/t/run-a-single-test-with-test-unit/165804)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 1\
**Last updated:** [April 17, 2009, 7:02pm UTC](https://www.ruby-forum.com/t/run-a-single-test-with-test-unit/165804 "2009-04-17T19:02:30Z")

</div>

Hi, I have tests written as: test “some test” do … end But when I want to run a single test it doesn’t work like before: $ ruby test/functional/some\_controller\_test.rb -n some\_test Iget 0 test, 0 assertions… I al…

---

## [Virtual Host issue](https://www.ruby-forum.com/t/virtual-host-issue/165808)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [April 17, 2009, 6:33pm UTC](https://www.ruby-forum.com/t/virtual-host-issue/165808 "2009-04-17T18:33:43Z")

</div>

Hey, I’m having sort of an issue configuring virtual hosts with passenger I want domain.com and www.domain.com to point to one rails app (simple cms) and \*.domain.com to point to another rails app (the actual thing) …

---

## [Stubbing an ApplicationController before\_filter](https://www.ruby-forum.com/t/stubbing-an-applicationcontroller-before-filter/165708)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 7\
**Last updated:** [April 17, 2009, 4:50pm UTC](https://www.ruby-forum.com/t/stubbing-an-applicationcontroller-before-filter/165708 "2009-04-17T16:50:27Z")

</div>

Hi, I am writing a functional test for a controller. The problem I have is that a before filter defined in ApplicationController is hit and I don’t know how to stub it. I tried controller.expects(:find\_site).returns(@…

---

## [File upload -\> save outside the rails project](https://www.ruby-forum.com/t/file-upload-save-outside-the-rails-project/165741)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 8\
**Last updated:** [April 17, 2009, 4:35pm UTC](https://www.ruby-forum.com/t/file-upload-save-outside-the-rails-project/165741 "2009-04-17T16:35:16Z")

</div>

i currently have an app that uploads a file and saves it into the file system… the one thing i cannot figure out how to do is save it outside the project… for instance… it currently uploads it to: ~/rails\_project/p…

---

## [A frustrating and strange error when config.action\_controller.perform\_caching = true](https://www.ruby-forum.com/t/a-frustrating-and-strange-error-when-config-action-controller-perform-caching-true/165793)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 0\
**Last updated:** [April 17, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/a-frustrating-and-strange-error-when-config-action-controller-perform-caching-true/165793 "2009-04-17T14:46:29Z")

</div>

Hello all. I am having a hell of a problem and it’s driving me nuts. I get the following error (undefined method \`controller\_name’ for nil:NilClass): but only when config.action\_controller.perform\_caching = true I g…

---

## [Rails and Sphinx](https://www.ruby-forum.com/t/rails-and-sphinx/165641)

<div class="topic-metadata">

**Author:** [@mix](https://www.ruby-forum.com/u/mix)\
**Replies:** 3\
**Last updated:** [April 17, 2009, 2:13pm UTC](https://www.ruby-forum.com/t/rails-and-sphinx/165641 "2009-04-17T14:13:39Z")

</div>

Hi, i’m currently using ferret+acts\_as\_ferret for doing some searches in the db (not so big for now, just 40k~ records, but they will be near 2M+ soon). For now ferret it’s working quite well, but sometimes i’ve index…

---

## [How to call javascript function in text\_field\_tag](https://www.ruby-forum.com/t/how-to-call-javascript-function-in-text-field-tag/165769)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 2\
**Last updated:** [April 17, 2009, 2:13pm UTC](https://www.ruby-forum.com/t/how-to-call-javascript-function-in-text-field-tag/165769 "2009-04-17T14:13:04Z")

</div>

Dear all Sorry for dummy question. How can I convert a text input in form to upper case letter in view? Can I call the javascript function toUpperCase() in text\_field\_tag?? \<%= text\_field\_tag(:sometext, nil, :size =\> …

---

## [Facing a problem with rails version](https://www.ruby-forum.com/t/facing-a-problem-with-rails-version/165787)

<div class="topic-metadata">

**Author:** [@charanya](https://www.ruby-forum.com/u/charanya)\
**Replies:** 1\
**Last updated:** [April 17, 2009, 2:09pm UTC](https://www.ruby-forum.com/t/facing-a-problem-with-rails-version/165787 "2009-04-17T14:09:32Z")

</div>

I hava an app completely developed in rails 2.1.3 and i have another app developed in Rails 2.3.2. Now I have to run the rails app 2.1.3 in my system which has rails 2.3.2. But i am not able to run it.it gives version…

---

## [Is it possible game with RESTful architecture?](https://www.ruby-forum.com/t/is-it-possible-game-with-restful-architecture/165781)

<div class="topic-metadata">

**Author:** [@serenobs](https://www.ruby-forum.com/u/serenobs)\
**Replies:** 1\
**Last updated:** [April 17, 2009, 12:26pm UTC](https://www.ruby-forum.com/t/is-it-possible-game-with-restful-architecture/165781 "2009-04-17T12:26:52Z")

</div>

Hi. I recently studying web-development to make a game like o-game. I read a book about REST and some articles. Still, however, I don’t know how to apply ROA(Resource oriented architecture) to design my game. Anyway…

---

## [Stack level too deep](https://www.ruby-forum.com/t/stack-level-too-deep/165768)

<div class="topic-metadata">

**Author:** [@chirantan](https://www.ruby-forum.com/u/chirantan)\
**Replies:** 3\
**Last updated:** [April 17, 2009, 12:23pm UTC](https://www.ruby-forum.com/t/stack-level-too-deep/165768 "2009-04-17T12:23:20Z")

</div>

In my application there are 2 models - Profile and Topic. Profiles can be attached to topics and hence I have a many to many relationship between them. Things were good until recently I encountered a problem that said…

---

## [Need Help with Rails 2.3 Four Level Nested Form Javascript Function](https://www.ruby-forum.com/t/need-help-with-rails-2-3-four-level-nested-form-javascript-function/165783)

<div class="topic-metadata">

**Author:** [@todd](https://www.ruby-forum.com/u/todd)\
**Replies:** 0\
**Last updated:** [April 17, 2009, 12:11pm UTC](https://www.ruby-forum.com/t/need-help-with-rails-2-3-four-level-nested-form-javascript-function/165783 "2009-04-17T12:11:01Z")

</div>

Hi I’m using Alloy’s Complex Form Example found here(http://github.com/ alloy/complex-form-examples/tree/master). The example he provides is a two level hierarchy and I’m trying to expand it to four. He has javascript…

---

## [Relative\_path\_from error](https://www.ruby-forum.com/t/relative-path-from-error/165782)

<div class="topic-metadata">

**Author:** [@roger22](https://www.ruby-forum.com/u/roger22)\
**Replies:** 0\
**Last updated:** [April 17, 2009, 12:10pm UTC](https://www.ruby-forum.com/t/relative-path-from-error/165782 "2009-04-17T12:10:20Z")

</div>

Hello, i tried to run the command ruby script/generate scaffold Item Manage , but i got the following error: ruby script/generate scaffold Item Manage D:/eclipseSE/eclipse/plugins/org.jruby\_1.1.6.8388p3/lib/ruby/…

---

## [Flash integration](https://www.ruby-forum.com/t/flash-integration/165776)

<div class="topic-metadata">

**Author:** [@mikec](https://www.ruby-forum.com/u/mikec)\
**Replies:** 0\
**Last updated:** [April 17, 2009, 10:54am UTC](https://www.ruby-forum.com/t/flash-integration/165776 "2009-04-17T10:54:10Z")

</div>

Does anyone here know any good sites/tutorials on how to integrate Adobe Flash and Rails? I know there’s stuff out there for Flex, but I’m looking for just Flash.

---

## [Saving parent record before child](https://www.ruby-forum.com/t/saving-parent-record-before-child/165771)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [April 17, 2009, 10:09am UTC](https://www.ruby-forum.com/t/saving-parent-record-before-child/165771 "2009-04-17T10:09:41Z")

</div>

I am on Rails 2.2 and want to save an artist object with a child attribute called artist\_mood\_concepts. I can update fine but when I do an @artist.save, it gives me an error about saving the parent before the child (…

---

## [Multiple Check Box](https://www.ruby-forum.com/t/multiple-check-box/165764)

<div class="topic-metadata">

**Author:** [@psnavaneethan](https://www.ruby-forum.com/u/psnavaneethan)\
**Replies:** 1\
**Last updated:** [April 17, 2009, 10:04am UTC](https://www.ruby-forum.com/t/multiple-check-box/165764 "2009-04-17T10:04:55Z")

</div>

I had given like Java\<%=check\_box\_tag “employees”, “skills\[\]”, “Java” %\> Rails\<%=check\_box\_tag “employees”, “skills\[\]”, “Rails” %\> C\<%=check\_box\_tag “employees”, “skills\[\]”, “C” %\> since it belongs to the “employe…

---

## [\>require 'RMagick' is not working](https://www.ruby-forum.com/t/require-rmagick-is-not-working/165766)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 0\
**Last updated:** [April 17, 2009, 9:55am UTC](https://www.ruby-forum.com/t/require-rmagick-is-not-working/165766 "2009-04-17T09:55:44Z")

</div>

os -redhat 5.3 $ irb -rrubygems -rRMagick Magick working fine but $ irb require ‘rubygems’ require ‘rmagick’ or require ‘RMagick’ is not working

---

## [Complex query](https://www.ruby-forum.com/t/complex-query/165767)

<div class="topic-metadata">

**Author:** [@random-query](https://www.ruby-forum.com/u/random-query)\
**Replies:** 0\
**Last updated:** [April 17, 2009, 9:45am UTC](https://www.ruby-forum.com/t/complex-query/165767 "2009-04-17T09:45:48Z")

</div>

Hi, Part of my Invoice table looks like this: create\_table “invoices”, :force =\> true do |t| t.datetime “sent\_at”, t.datetime “received\_payment\_at”, t.integer “total\_fee” … end I want to put together view with m…

---

## [\[Propose\] decimal columns propagates scale into BigDecimal](https://www.ruby-forum.com/t/propose-decimal-columns-propagates-scale-into-bigdecimal/84244)

<div class="topic-metadata">

**Author:** [@Ricardo\_PSSSSrez](https://www.ruby-forum.com/u/Ricardo_PSSSSrez)\
**Replies:** 1\
**Last updated:** [April 17, 2009, 8:54am UTC](https://www.ruby-forum.com/t/propose-decimal-columns-propagates-scale-into-bigdecimal/84244 "2009-04-17T08:54:17Z")

</div>

decimal(x,y) columns in Rails 1.2 are mapped to BigDecimal object. They works well, but it could be better. For example, one column: price decimal(5,2) for an “articles” table is mapped to a BigDecimal object, but th…

---

## [How to get the enclosure' url value when reading the rss feed](https://www.ruby-forum.com/t/how-to-get-the-enclosure-url-value-when-reading-the-rss-feed/165726)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 2\
**Last updated:** [April 17, 2009, 6:03am UTC](https://www.ruby-forum.com/t/how-to-get-the-enclosure-url-value-when-reading-the-rss-feed/165726 "2009-04-17T06:03:53Z")

</div>

how to get the enclosure’ url value when reading the rss feed? I define a help method to judge if there is a enclosure in a rss item,and use it in a view,the codes are following: ######## module EncodeHelper def enc…

---

## [How can i copy file to rails public folder when install gem](https://www.ruby-forum.com/t/how-can-i-copy-file-to-rails-public-folder-when-install-gem/165759)

<div class="topic-metadata">

**Author:** [@eiffelqiu](https://www.ruby-forum.com/u/eiffelqiu)\
**Replies:** 0\
**Last updated:** [April 17, 2009, 5:21am UTC](https://www.ruby-forum.com/t/how-can-i-copy-file-to-rails-public-folder-when-install-gem/165759 "2009-04-17T05:21:23Z")

</div>

I wrote a rails plugin, and i wish to make it as a gem. it seems easy when i use it as a libary code. but it will copy some js, css file to rails public folder. as a rails plugin, Install.rb will copy file during th…

---

## [Notification Messages plugin?](https://www.ruby-forum.com/t/notification-messages-plugin/165761)

<div class="topic-metadata">

**Author:** [@fcruxen](https://www.ruby-forum.com/u/fcruxen)\
**Replies:** 0\
**Last updated:** [April 17, 2009, 4:20am UTC](https://www.ruby-forum.com/t/notification-messages-plugin/165761 "2009-04-17T04:20:12Z")

</div>

I am about to code something for a Rails app of mine and didn’t want to reinvent the wheel, hence my question: Do you guys know any Rails Plugin that would allow an application to display notification messages that co…

---

## [Injecting Ruby code into a javascript file?](https://www.ruby-forum.com/t/injecting-ruby-code-into-a-javascript-file/165629)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 5\
**Last updated:** [April 17, 2009, 1:17am UTC](https://www.ruby-forum.com/t/injecting-ruby-code-into-a-javascript-file/165629 "2009-04-17T01:17:35Z")

</div>

Hi, as far as I know it’s possible to inject Ruby code into javascript code if the javascript code is included in a view/page. But is this also possible when the javascript code is in a separate .js file that is loca…

---

## [Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)](https://www.ruby-forum.com/t/uninitialized-constant-activesupport-mutex-nameerror/165644)

<div class="topic-metadata">

**Author:** [@marcbey](https://www.ruby-forum.com/u/marcbey)\
**Replies:** 1\
**Last updated:** [April 17, 2009, 12:38am UTC](https://www.ruby-forum.com/t/uninitialized-constant-activesupport-mutex-nameerror/165644 "2009-04-17T00:38:23Z")

</div>

I’m on debian etch w/ ruby1.8, activesupport-2.3.2, getting this on the first line of code which is require ‘active\_support’ : /var/lib/gems/1.8/gems/activesupport-2.3.2/lib/active\_support/dependencies.rb:55: uninitia…

---

## [Keep 404's out of my logs](https://www.ruby-forum.com/t/keep-404s-out-of-my-logs/165736)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 2\
**Last updated:** [April 16, 2009, 10:39pm UTC](https://www.ruby-forum.com/t/keep-404s-out-of-my-logs/165736 "2009-04-16T22:39:27Z")

</div>

So every time something requests something from my rails (2.x) app that doesn’t actually map to a controller, I wind up with an error in my production.log. ActionController::RoutingError or ActionController::UnknownAc…

---

## [Route to static resource?](https://www.ruby-forum.com/t/route-to-static-resource/165734)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 6\
**Last updated:** [April 16, 2009, 9:56pm UTC](https://www.ruby-forum.com/t/route-to-static-resource/165734 "2009-04-16T21:56:37Z")

</div>

Is there any way to write a route that delivers a static resource? For some reason something (looks like Google Toolbar according to the user-agent string) is requesting favicon.ico at all sorts of weird places, not j…

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

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