# Rails

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

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

---

## [Paperclip: Adding attachment to model on update not working](https://www.ruby-forum.com/t/paperclip-adding-attachment-to-model-on-update-not-working/176159)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 0\
**Last updated:** [September 25, 2009, 2:17pm UTC](https://www.ruby-forum.com/t/paperclip-adding-attachment-to-model-on-update-not-working/176159 "2009-09-25T14:17:44Z")

</div>

Hi, This is a bit of a special case. Ive got a POST form for a posts model which has a preview functionality. So if the user clicks on “Preview”, then the model is saved and a new window opens with the preview. And t…

---

## [Memcache-client error though i have memcache-client gem installed](https://www.ruby-forum.com/t/memcache-client-error-though-i-have-memcache-client-gem-installed/176160)

<div class="topic-metadata">

**Author:** [@san2821](https://www.ruby-forum.com/u/san2821)\
**Replies:** 0\
**Last updated:** [September 25, 2009, 1:56pm UTC](https://www.ruby-forum.com/t/memcache-client-error-though-i-have-memcache-client-gem-installed/176160 "2009-09-25T13:56:40Z")

</div>

Hi My application was using rails 2.1.0 that i changed to rails 2.3.3 then i did rake rails:update. while script/server start it gives me error memcache-client error. Sandip – Ruby on Rails Developer http://brand…

---

## [Getting the server port number during initialization](https://www.ruby-forum.com/t/getting-the-server-port-number-during-initialization/176117)

<div class="topic-metadata">

**Author:** [@jjrussell](https://www.ruby-forum.com/u/jjrussell)\
**Replies:** 4\
**Last updated:** [September 25, 2009, 1:50pm UTC](https://www.ruby-forum.com/t/getting-the-server-port-number-during-initialization/176117 "2009-09-25T13:50:13Z")

</div>

In the environment.rb I need to use the port number that the server is being started under in an after\_initialize block in order to register my server with another server. I’ve looked in config (Rails:Configuration) a…

---

## [Looking for .rhml.r488 instead .rhtml page](https://www.ruby-forum.com/t/looking-for-rhml-r488-instead-rhtml-page/176156)

<div class="topic-metadata">

**Author:** [@priyasaini](https://www.ruby-forum.com/u/priyasaini)\
**Replies:** 6\
**Last updated:** [September 25, 2009, 1:35pm UTC](https://www.ruby-forum.com/t/looking-for-rhml-r488-instead-rhtml-page/176156 "2009-09-25T13:35:24Z")

</div>

Hi All: I am experiencing a strange error. The action request instead of displaying the usual .rhml file is searching for some .rhml.r488 file… log says… A Errno::ENOENT occurred in invoices#list: No such file or d…

---

## [Categories and articles plug-in, act\_as\_tree, act\_as\_list](https://www.ruby-forum.com/t/categories-and-articles-plug-in-act-as-tree-act-as-list/176149)

<div class="topic-metadata">

**Author:** [@rtacconi](https://www.ruby-forum.com/u/rtacconi)\
**Replies:** 3\
**Last updated:** [September 25, 2009, 1:35pm UTC](https://www.ruby-forum.com/t/categories-and-articles-plug-in-act-as-tree-act-as-list/176149 "2009-09-25T13:35:00Z")

</div>

This is my first message, so hello to everybody! I would like to have a simple intranet with categories and articles management. I think to use act\_as\_tree for the categories and act\_as\_list for the articles, but any …

---

## [Attachment\_fu](https://www.ruby-forum.com/t/attachment-fu/176067)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 3\
**Last updated:** [September 25, 2009, 1:15pm UTC](https://www.ruby-forum.com/t/attachment-fu/176067 "2009-09-25T13:15:05Z")

</div>

Hello, I have a functionality where i need to upload an image, So for that i am using attachment\_fu + acts\_as\_state\_machine,. and every thing is working fine. But now from the view front i want to display as an thum…

---

## [Rails Library for Generating Graphs and Charts](https://www.ruby-forum.com/t/rails-library-for-generating-graphs-and-charts/176020)

<div class="topic-metadata">

**Author:** [@Piyush\_with\_Rails](https://www.ruby-forum.com/u/Piyush_with_Rails)\
**Replies:** 1\
**Last updated:** [September 25, 2009, 12:59pm UTC](https://www.ruby-forum.com/t/rails-library-for-generating-graphs-and-charts/176020 "2009-09-25T12:59:03Z")

</div>

Hello Friends, Hope all are doing well. I was seeking some guidance on open-source, stable, efficient and better library (plugin/gem) for generating chars and graphs in rails. here i am looking for graphs/charts with…

---

## [Generate model error](https://www.ruby-forum.com/t/generate-model-error/176148)

<div class="topic-metadata">

**Author:** [@guwenqign](https://www.ruby-forum.com/u/guwenqign)\
**Replies:** 1\
**Last updated:** [September 25, 2009, 10:41am UTC](https://www.ruby-forum.com/t/generate-model-error/176148 "2009-09-25T10:41:08Z")

</div>

I’m new on rails, and I encountered a problem when I am doing a tutorial: that’s a simple application without a database. First “rails simple\_app” And modify “enviroment.rb” Skip frameworks you’re not going to use. T…

---

## [Chained Polymorphic Association and the missing type field](https://www.ruby-forum.com/t/chained-polymorphic-association-and-the-missing-type-field/176146)

<div class="topic-metadata">

**Author:** [@swoolley](https://www.ruby-forum.com/u/swoolley)\
**Replies:** 0\
**Last updated:** [September 25, 2009, 9:41am UTC](https://www.ruby-forum.com/t/chained-polymorphic-association-and-the-missing-type-field/176146 "2009-09-25T09:41:59Z")

</div>

I have a chained polymorphic relationship. I will try to describe it as best as I can. Imagine: Group (polymorphic) \\ | Tag (polymorphic) \\ …

---

## [Rails plugins?](https://www.ruby-forum.com/t/rails-plugins/176142)

<div class="topic-metadata">

**Author:** [@Sebastian\_von\_Conra](https://www.ruby-forum.com/u/Sebastian_von_Conra)\
**Replies:** 0\
**Last updated:** [September 25, 2009, 8:03am UTC](https://www.ruby-forum.com/t/rails-plugins/176142 "2009-09-25T08:03:04Z")

</div>

Hi everyone, I’m trying to set up a plugin structure where I have a main module (for argument’s sake called “Abc”), which I want to be able to access in my controllers. So far, so good. I can invoke Abc.method\_name w…

---

## [Rails Library for Generating Graphs and Charts](https://www.ruby-forum.com/t/rails-library-for-generating-graphs-and-charts/197000)

<div class="topic-metadata">

**Author:** [@Piyush\_with\_Rails](https://www.ruby-forum.com/u/Piyush_with_Rails)\
**Replies:** 12\
**Last updated:** [September 25, 2009, 7:49am UTC](https://www.ruby-forum.com/t/rails-library-for-generating-graphs-and-charts/197000 "2009-09-25T07:49:01Z")

</div>

Hello Friends, Hope all are doing well. I was seeking some guidance on open-source, stable, efficient and better library (plugin/gem) for generating chars and graphs in rails. here i am looking for graphs/charts with…

---

## [Action Controller ::MethodNotAllowed](https://www.ruby-forum.com/t/action-controller-methodnotallowed/176075)

<div class="topic-metadata">

**Author:** [@nisha](https://www.ruby-forum.com/u/nisha)\
**Replies:** 4\
**Last updated:** [September 25, 2009, 7:21am UTC](https://www.ruby-forum.com/t/action-controller-methodnotallowed/176075 "2009-09-25T07:21:30Z")

</div>

Hi, Iam getting the following error ActionController::MethodNotAllowed Only get, put and delete requests are allowed. Actually, Iam trying to have multiple actions for a form to create new record. The actions for t…

---

## [WWW::Mechanize and Rails console not playing well](https://www.ruby-forum.com/t/www-mechanize-and-rails-console-not-playing-well/176139)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 0\
**Last updated:** [September 25, 2009, 6:15am UTC](https://www.ruby-forum.com/t/www-mechanize-and-rails-console-not-playing-well/176139 "2009-09-25T06:15:56Z")

</div>

I can run this code just fine in irb, but when I run it in rails script/console, I get an error: res = agent.submit(search\_form, search\_form.buttons.first) ArgumentError: one hash required from /home/jwoods/NetBean…

---

## [Iterators in ruby](https://www.ruby-forum.com/t/iterators-in-ruby/176088)

<div class="topic-metadata">

**Author:** [@Ramana\_V](https://www.ruby-forum.com/u/Ramana_V)\
**Replies:** 3\
**Last updated:** [September 25, 2009, 6:15am UTC](https://www.ruby-forum.com/t/iterators-in-ruby/176088 "2009-09-25T06:15:20Z")

</div>

hi i am new to rails would u tell me types of each iterator i used some of each iterators like each,each\_index… Thanks – Regards, Ramanavel Selvaraju,

---

## [How to generate password automatically using authlogic](https://www.ruby-forum.com/t/how-to-generate-password-automatically-using-authlogic/197099)

<div class="topic-metadata">

**Author:** [@thriving](https://www.ruby-forum.com/u/thriving)\
**Replies:** 2\
**Last updated:** [September 25, 2009, 4:57am UTC](https://www.ruby-forum.com/t/how-to-generate-password-automatically-using-authlogic/197099 "2009-09-25T04:57:16Z")

</div>

I have problem , i want to generate password automatically where can i manipulate :password and :confirm\_password in action create def create @user = User.new(params\[:user\]) if @user.save flash\[:notice\] = “Registrat…

---

## [Acts\_as\_tree error](https://www.ruby-forum.com/t/acts-as-tree-error/175878)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 2\
**Last updated:** [September 25, 2009, 4:42am UTC](https://www.ruby-forum.com/t/acts-as-tree-error/175878 "2009-09-25T04:42:17Z")

</div>

I am getting the following error when I attempt to use acts\_as\_tree. I am new to this relationship and am stuck. undefined method \`acts\_as\_tree’ Model class Rental \< ActiveRecord::Base acts\_as\_tree :order =\> “sort\_o…

---

## [Overriding a single Rails core file (batches.rb)](https://www.ruby-forum.com/t/overriding-a-single-rails-core-file-batches-rb/176127)

<div class="topic-metadata">

**Author:** [@Sebastian\_von\_Conra](https://www.ruby-forum.com/u/Sebastian_von_Conra)\
**Replies:** 3\
**Last updated:** [September 25, 2009, 4:03am UTC](https://www.ruby-forum.com/t/overriding-a-single-rails-core-file-batches-rb/176127 "2009-09-25T04:03:04Z")

</div>

Hi everyone, I’m trying to find a way to implement a diff I found into my application (Tickets - Ruby on Rails - rails 2137-allow-find\_batches-to-use-order-limit-and-offset). It is imperative that I use find\_in\_batch…

---

## [Overriding AR read/write\_attribute - Overridden write\_attribute Is Never Called](https://www.ruby-forum.com/t/overriding-ar-read-write-attribute-overridden-write-attribute-is-never-called/176045)

<div class="topic-metadata">

**Author:** [@MaggotChild](https://www.ruby-forum.com/u/MaggotChild)\
**Replies:** 5\
**Last updated:** [September 25, 2009, 3:19am UTC](https://www.ruby-forum.com/t/overriding-ar-read-write-attribute-overridden-write-attribute-is-never-called/176045 "2009-09-25T03:19:11Z")

</div>

Could someone explain this? #config/initializers/ar\_attributes.rb module ActiveRecord module AttributeMethods alias\_method :ar\_read\_attribute, :read\_attribute def read\_attribute(attr\_name) p "read\_override" …

---

## [How ActiveRecords create tables](https://www.ruby-forum.com/t/how-activerecords-create-tables/176033)

<div class="topic-metadata">

**Author:** [@cristie](https://www.ruby-forum.com/u/cristie)\
**Replies:** 4\
**Last updated:** [September 25, 2009, 2:45am UTC](https://www.ruby-forum.com/t/how-activerecords-create-tables/176033 "2009-09-25T02:45:50Z")

</div>

I’ll start off by saying I am new to Ruby and Rails… Suppose I run the following; $ script/generate model person which creates: class CreatePeople \< ActiveRecord::Migration def self.up create\_table :people do |t| …

---

## [Activerecord issue - all\_hashes error](https://www.ruby-forum.com/t/activerecord-issue-all-hashes-error/176061)

<div class="topic-metadata">

**Author:** [@cgsfree](https://www.ruby-forum.com/u/cgsfree)\
**Replies:** 1\
**Last updated:** [September 25, 2009, 1:20am UTC](https://www.ruby-forum.com/t/activerecord-issue-all-hashes-error/176061 "2009-09-25T01:20:18Z")

</div>

Hi All, I’m trying to run a simple Activerecord query (I’m still learning) but I’m running into a brick wall on the following error: e\[4;36;1mProduct Load (0.0ms)e\[0m e\[0;1mSELECT \* FROM products LIMIT 1e\[0m (eval…

---

## [Should fields\_for for has\_many association execute block even if the collection is empty?](https://www.ruby-forum.com/t/should-fields-for-for-has-many-association-execute-block-even-if-the-collection-is-empty/176113)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 0\
**Last updated:** [September 24, 2009, 10:50pm UTC](https://www.ruby-forum.com/t/should-fields-for-for-has-many-association-execute-block-even-if-the-collection-is-empty/176113 "2009-09-24T22:50:24Z")

</div>

Hi, I had a problem where fields\_for block was executed once, even if the association collection was empty - child\_form.object was nil of course. Adding accepts\_nested\_attributes to parent model solved the problem - …

---

## [Running asynchronous processes - non-ruby binaries](https://www.ruby-forum.com/t/running-asynchronous-processes-non-ruby-binaries/176107)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 0\
**Last updated:** [September 24, 2009, 10:09pm UTC](https://www.ruby-forum.com/t/running-asynchronous-processes-non-ruby-binaries/176107 "2009-09-24T22:09:25Z")

</div>

I’m looking at “Advanced Rails Recipes,” and there’s one in here called “Process Asynchronous State-Based Workflows.” It seems to describe a workflow that is written in Ruby. I have a binary (written in C++) which I w…

---

## [Auto\_complete text field not showing drop-down box properly](https://www.ruby-forum.com/t/auto-complete-text-field-not-showing-drop-down-box-properly/175965)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 4\
**Last updated:** [September 24, 2009, 10:07pm UTC](https://www.ruby-forum.com/t/auto-complete-text-field-not-showing-drop-down-box-properly/175965 "2009-09-24T22:07:04Z")

</div>

This may be more of an Ajax question than a Rails question, but I’m pretty new to Rails and know approximately zero JS. I’d love if someone could give me a little direction. I’m using pat shaughnessy’s nested text\_fie…

---

## [Ruby 1.9.1 & Rails 2.3.4 generate code show wrong](https://www.ruby-forum.com/t/ruby-1-9-1-rails-2-3-4-generate-code-show-wrong/176079)

<div class="topic-metadata">

**Author:** [@ouwsh](https://www.ruby-forum.com/u/ouwsh)\
**Replies:** 4\
**Last updated:** [September 24, 2009, 8:22pm UTC](https://www.ruby-forum.com/t/ruby-1-9-1-rails-2-3-4-generate-code-show-wrong/176079 "2009-09-24T20:22:17Z")

</div>

My computer build on windows Ruby 1.9.1 ï¼Œrails 2.3.4 mysql I am follow agile\_web\_development\_with\_rails\_3rd\_edition book to build my site ruby script/generate scaffold recipe title:string author:string descripti…

---

## [Editing Tutorials Copy thread as the other one seems to have glitched](https://www.ruby-forum.com/t/editing-tutorials-copy-thread-as-the-other-one-seems-to-have-glitched/176100)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 1\
**Last updated:** [September 24, 2009, 8:17pm UTC](https://www.ruby-forum.com/t/editing-tutorials-copy-thread-as-the-other-one-seems-to-have-glitched/176100 "2009-09-24T20:17:18Z")

</div>

This was my post but the thread has glitched (to my understanding) so here it is again (please delete if the other one starts working…) … Hi, Ive recently bene trying to find a way to edit my tutorials (which are …

---

## [Search Pluging , Acts\_as\_ferret with conditions](https://www.ruby-forum.com/t/search-pluging-acts-as-ferret-with-conditions/176059)

<div class="topic-metadata">

**Author:** [@neetal](https://www.ruby-forum.com/u/neetal)\
**Replies:** 4\
**Last updated:** [September 24, 2009, 7:19pm UTC](https://www.ruby-forum.com/t/search-pluging-acts-as-ferret-with-conditions/176059 "2009-09-24T19:19:38Z")

</div>

I have a search feature in my application. I was using acts\_as\_ferret , i tried all possible ways to include the conditions with it. Model.find\_with\_ferret(query, :conditions =\>{}) But dint succeed in it. So please s…

---

## [Testing: 'test "..." do' works but not 'def test...'](https://www.ruby-forum.com/t/testing-test-do-works-but-not-def-test/176094)

<div class="topic-metadata">

**Author:** [@drewB](https://www.ruby-forum.com/u/drewB)\
**Replies:** 2\
**Last updated:** [September 24, 2009, 6:43pm UTC](https://www.ruby-forum.com/t/testing-test-do-works-but-not-def-test/176094 "2009-09-24T18:43:56Z")

</div>

I have just encountered a funny situation. I have a number of functional and unit cases that are all written with the notation: def ---- #test case end I just created a new model and controller with test cases writ…

---

## [Watir testing and watir-on-rails](https://www.ruby-forum.com/t/watir-testing-and-watir-on-rails/176074)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 2\
**Last updated:** [September 24, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/watir-testing-and-watir-on-rails/176074 "2009-09-24T18:31:07Z")

</div>

I’m trying to get testing setup with Watir (safariwatir) specifically and watir-on-rails. gem list safariwatir (0.3.3) I updated the template here. cat vendor/plugins/watir-on-rails/generators/watir/templates/watir…

---

## [Secure ruby, rails programming](https://www.ruby-forum.com/t/secure-ruby-rails-programming/176041)

<div class="topic-metadata">

**Author:** [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Replies:** 2\
**Last updated:** [September 24, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/secure-ruby-rails-programming/176041 "2009-09-24T17:54:45Z")

</div>

\[This is a cross-post, was told I would have better luck here than on ruby-talk\] Hello Community, I am just learning Ruby and Rails and would like to know what good security ruby gems are out there that will help me …

---

## [Autoincrement](https://www.ruby-forum.com/t/autoincrement/176027)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 6\
**Last updated:** [September 24, 2009, 5:53pm UTC](https://www.ruby-forum.com/t/autoincrement/176027 "2009-09-24T17:53:34Z")

</div>

I am using SQLite 3. I have deleted all of the rows of a member table but one. The one row that remains is for the administrative user and has an id of 0. I’d sure like to zero out the autoincrement counter. The do…

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

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