# Rails

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

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

---

## [OS X rails path problem](https://www.ruby-forum.com/t/os-x-rails-path-problem/172789)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 4\
**Last updated:** [July 29, 2009, 1:27am UTC](https://www.ruby-forum.com/t/os-x-rails-path-problem/172789 "2009-07-29T01:27:29Z")

</div>

I have had rails up and running for about 2 years now, but while troubleshooting an arduino problem, I inadvertently changed something related to my path variable that caused scrip/server to no longer run, after a rei…

---

## [Legacy database with column named 'type'](https://www.ruby-forum.com/t/legacy-database-with-column-named-type/172830)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 8\
**Last updated:** [July 29, 2009, 1:18am UTC](https://www.ruby-forum.com/t/legacy-database-with-column-named-type/172830 "2009-07-29T01:18:07Z")

</div>

I have a problem with a table that has a field named ‘type’ When I try to use active record in a console, I get this error… ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the s…

---

## [Migrating a column to foreign key and foreign table](https://www.ruby-forum.com/t/migrating-a-column-to-foreign-key-and-foreign-table/172849)

<div class="topic-metadata">

**Author:** [@ate50eggs](https://www.ruby-forum.com/u/ate50eggs)\
**Replies:** 2\
**Last updated:** [July 29, 2009, 1:04am UTC](https://www.ruby-forum.com/t/migrating-a-column-to-foreign-key-and-foreign-table/172849 "2009-07-29T01:04:37Z")

</div>

I’m attempting to write a migration that adds a foreign key column to a table to replace an existing attribute (a string to an object). I’d like to add the column, convert the existing data into a new entry on the for…

---

## [Belongs\_:to association](https://www.ruby-forum.com/t/belongs-to-association/172839)

<div class="topic-metadata">

**Author:** [@cocozz](https://www.ruby-forum.com/u/cocozz)\
**Replies:** 4\
**Last updated:** [July 28, 2009, 9:45pm UTC](https://www.ruby-forum.com/t/belongs-to-association/172839 "2009-07-28T21:45:39Z")

</div>

class Shopcategory0 \< ActiveRecord::Base set\_table\_name “shopcategories\_0” has\_many :shopcategory1s, :foreign\_key =\> :parentcategory\_id end class Shopcategory1 \< ActiveRecord::Base set\_table\_name “shopcategories\_1…

---

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

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 1\
**Last updated:** [July 28, 2009, 9:33pm UTC](https://www.ruby-forum.com/t/complex-find/172840 "2009-07-28T21:33:56Z")

</div>

I have class Debtortrans \< ActiveRecord::Base has\_many :debtortranstaxes, :foreign\_key =\> ‘debtortransid’, :class\_name =\> ‘debtortranstaxes’ belongs\_to :debtor, :foreign\_key =\> ‘debtorno’ and class Debtortra…

---

## [Getting ActionController::InvalidAuthenticityToken error Please help tried to run thru the solution](https://www.ruby-forum.com/t/getting-actioncontroller-invalidauthenticitytoken-error-please-help-tried-to-run-thru-the-solution/171812)

<div class="topic-metadata">

**Author:** [@saurabh](https://www.ruby-forum.com/u/saurabh)\
**Replies:** 2\
**Last updated:** [July 28, 2009, 9:30pm UTC](https://www.ruby-forum.com/t/getting-actioncontroller-invalidauthenticitytoken-error-please-help-tried-to-run-thru-the-solution/171812 "2009-07-28T21:30:26Z")

</div>

Hi , I am trying to test spot.us on my local machine , I installed it and have rails 2.3.2 but when i register a new user i get the following error ActionController::InvalidAuthenticityToken. I am pasting the traces …

---

## [\[PAPERCLIP\] How to avoid image crop in paperclip styles](https://www.ruby-forum.com/t/paperclip-how-to-avoid-image-crop-in-paperclip-styles/172824)

<div class="topic-metadata">

**Author:** [@san2821](https://www.ruby-forum.com/u/san2821)\
**Replies:** 1\
**Last updated:** [July 28, 2009, 9:29pm UTC](https://www.ruby-forum.com/t/paperclip-how-to-avoid-image-crop-in-paperclip-styles/172824 "2009-07-28T21:29:15Z")

</div>

Hello All, I am using rails paperclip plugin for image upload. my image has different styles and the original image gets cropped while processing styled image. I dont want image to be cropped. Is there any way ??? …

---

## [Email forms](https://www.ruby-forum.com/t/email-forms/172842)

<div class="topic-metadata">

**Author:** [@mpaxton](https://www.ruby-forum.com/u/mpaxton)\
**Replies:** 2\
**Last updated:** [July 28, 2009, 9:26pm UTC](https://www.ruby-forum.com/t/email-forms/172842 "2009-07-28T21:26:03Z")

</div>

Does anyone have a good email web form tutorial for rails? Possibly a generator example. Thanks

---

## [No Method Error - Active Record](https://www.ruby-forum.com/t/no-method-error-active-record/172843)

<div class="topic-metadata">

**Author:** [@intellections](https://www.ruby-forum.com/u/intellections)\
**Replies:** 1\
**Last updated:** [July 28, 2009, 8:57pm UTC](https://www.ruby-forum.com/t/no-method-error-active-record/172843 "2009-07-28T20:57:21Z")

</div>

I posted this in the Ruby forum but I was told it would be more at home here. I’m very new to ruby so for all I know this could be ridiculously easy. Thank you in advance for any and all suggestions! Here is the erro…

---

## [Authenticity\_token](https://www.ruby-forum.com/t/authenticity-token/172791)

<div class="topic-metadata">

**Author:** [@mistressjanna](https://www.ruby-forum.com/u/mistressjanna)\
**Replies:** 2\
**Last updated:** [July 28, 2009, 7:46pm UTC](https://www.ruby-forum.com/t/authenticity-token/172791 "2009-07-28T19:46:13Z")

</div>

How can I override the need for the authenticity\_token or bypass it altogether? -Janna B

---

## [Update collection\_select](https://www.ruby-forum.com/t/update-collection-select/172744)

<div class="topic-metadata">

**Author:** [@coldie](https://www.ruby-forum.com/u/coldie)\
**Replies:** 5\
**Last updated:** [July 28, 2009, 7:21pm UTC](https://www.ruby-forum.com/t/update-collection-select/172744 "2009-07-28T19:21:02Z")

</div>

Hi there, I’m storing serveral values in my database through collection\_select. Saving the value works fine but getting the saved value by using the update-form and setting it as “default-selected” doesn’t work. I tr…

---

## [Displaying Friends Activity](https://www.ruby-forum.com/t/displaying-friends-activity/172746)

<div class="topic-metadata">

**Author:** [@Arun\_kumar\_Agrahri](https://www.ruby-forum.com/u/Arun_kumar_Agrahri)\
**Replies:** 1\
**Last updated:** [July 28, 2009, 7:09pm UTC](https://www.ruby-forum.com/t/displaying-friends-activity/172746 "2009-07-28T19:09:19Z")

</div>

Hi, I’m wondering the popular methods to display friends activity on user’s profile page. Any docs or tutorial will be helpful. I’m a newbie in RoR Thanks, Arun

---

## ["rake db:migrate" generates error](https://www.ruby-forum.com/t/rake-db-migrate-generates-error/172805)

<div class="topic-metadata">

**Author:** [@neo](https://www.ruby-forum.com/u/neo)\
**Replies:** 3\
**Last updated:** [July 28, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-generates-error/172805 "2009-07-28T17:56:44Z")

</div>

Hi. When after runnig scaffold script server command I run the “rake db:migrate”, it displays no such sqlite found. I have already bound the sqlite with ruby successfully and yet it displays error… Please help me… tha…

---

## [Remote function: poor performance when erasing a div with lots of elements](https://www.ruby-forum.com/t/remote-function-poor-performance-when-erasing-a-div-with-lots-of-elements/172826)

<div class="topic-metadata">

**Author:** [@kghose](https://www.ruby-forum.com/u/kghose)\
**Replies:** 1\
**Last updated:** [July 28, 2009, 5:53pm UTC](https://www.ruby-forum.com/t/remote-function-poor-performance-when-erasing-a-div-with-lots-of-elements/172826 "2009-07-28T17:53:13Z")

</div>

Hi, I have a controller action that just has to replace a div with nothing: Controller - def contract render :text =\> “” end ------- I would think that this action would operate at the same speed regardless of wha…

---

## [Trouble installing mocha](https://www.ruby-forum.com/t/trouble-installing-mocha/172820)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [July 28, 2009, 5:53pm UTC](https://www.ruby-forum.com/t/trouble-installing-mocha/172820 "2009-07-28T17:53:13Z")

</div>

I am trying to install mocha on my OS X MBP and when I use sudo gem install mocha I get this error: ERROR: While executing gem … (Gem::RemoteFetcher::FetchError) Errno::ETIMEDOUT: Operation timed out - connect(2) (h…

---

## [How to integrate attachment\_fu with tinymce](https://www.ruby-forum.com/t/how-to-integrate-attachment-fu-with-tinymce/172829)

<div class="topic-metadata">

**Author:** [@Xiahong\_G](https://www.ruby-forum.com/u/Xiahong_G)\
**Replies:** 0\
**Last updated:** [July 28, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/how-to-integrate-attachment-fu-with-tinymce/172829 "2009-07-28T17:49:42Z")

</div>

Hi, I’m using tinyMCE plugin. I want to add image upload functionality - the standard tinyMCE image pop-up doesn’t really provide a great user experience. Are there any rails friendly plugins to allow for a image br…

---

## [Rails search engine without additional running server?](https://www.ruby-forum.com/t/rails-search-engine-without-additional-running-server/172828)

<div class="topic-metadata">

**Author:** [@ray](https://www.ruby-forum.com/u/ray)\
**Replies:** 0\
**Last updated:** [July 28, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/rails-search-engine-without-additional-running-server/172828 "2009-07-28T17:49:42Z")

</div>

Is this possible? I’ve looked at ferret and was dismayed to find that it has some major issues with index corruption. Is this still the case? Are my only alternatives to date Sphinx and Solr? I don’t wish to setup a …

---

## [Rails on OS X problem](https://www.ruby-forum.com/t/rails-on-os-x-problem/172810)

<div class="topic-metadata">

**Author:** [@wjvander](https://www.ruby-forum.com/u/wjvander)\
**Replies:** 2\
**Last updated:** [July 28, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/rails-on-os-x-problem/172810 "2009-07-28T17:25:06Z")

</div>

Hi All, So far I have been unable to get rails working on a 10.5.6 OS X installation. Every ‘rails’ command ends with the following error: /Library/Ruby/Site/1.8/rubygems.rb:827:in \`report\_activate\_error’: RubyGem ve…

---

## [Send\_file](https://www.ruby-forum.com/t/send-file/172822)

<div class="topic-metadata">

**Author:** [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Replies:** 2\
**Last updated:** [July 28, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/send-file/172822 "2009-07-28T17:15:44Z")

</div>

Hi, I have a fyle object which is using paperclip plugin to store filz. I want of ofcourse download the file from the application. Now the problem I face is my application is not being able to find the function send\_…

---

## [RJS-Template and link\_to\_remote](https://www.ruby-forum.com/t/rjs-template-and-link-to-remote/172806)

<div class="topic-metadata">

**Author:** [@Drrrrrr](https://www.ruby-forum.com/u/Drrrrrr)\
**Replies:** 4\
**Last updated:** [July 28, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/rjs-template-and-link-to-remote/172806 "2009-07-28T17:15:44Z")

</div>

Hi, I am quite new to rails and can’t use any rjs-templates. The problem is, that he can’t use/find the methods in that template e.g. ‘page’ or ‘replace\_html’. I get an error message on these methods. Here’s what I g…

---

## [Environment.rb GEM\_PATH -- problem deploying to shared host](https://www.ruby-forum.com/t/environment-rb-gem-path-problem-deploying-to-shared-host/172727)

<div class="topic-metadata">

**Author:** [@Danny\_Owens](https://www.ruby-forum.com/u/Danny_Owens)\
**Replies:** 4\
**Last updated:** [July 28, 2009, 5:05pm UTC](https://www.ruby-forum.com/t/environment-rb-gem-path-problem-deploying-to-shared-host/172727 "2009-07-28T17:05:12Z")

</div>

I’m a long time listener, first time caller – this is the first time I’ve deployed a rails app to a shared host so please bear with me. I’ve gotten all my GEM\_PATH variables set up in .bash\_profile, .gemrc, etc. and e…

---

## [FasterCSV](https://www.ruby-forum.com/t/fastercsv/172819)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 3\
**Last updated:** [July 28, 2009, 5:05pm UTC](https://www.ruby-forum.com/t/fastercsv/172819 "2009-07-28T17:05:12Z")

</div>

have problem with getting output. I get an error no matter how I try to get output… NoMethodError in Reports#commissions\_export Showing app/views/reports/commissions\_export.erb where line #26 raised: undefined method…

---

## [Plugin tests not running](https://www.ruby-forum.com/t/plugin-tests-not-running/172787)

<div class="topic-metadata">

**Author:** [@Cynthia\_K](https://www.ruby-forum.com/u/Cynthia_K)\
**Replies:** 4\
**Last updated:** [July 28, 2009, 4:55pm UTC](https://www.ruby-forum.com/t/plugin-tests-not-running/172787 "2009-07-28T16:55:50Z")

</div>

I want to build a plugin by extracting some code from an existing app. I figured the first thing I should do is get comfortable working on a plugin, so I generated a Rails 2.3.3 app, and from inside that, I generated …

---

## [Need help viewing my first App](https://www.ruby-forum.com/t/need-help-viewing-my-first-app/172652)

<div class="topic-metadata">

**Author:** [@veganopolis](https://www.ruby-forum.com/u/veganopolis)\
**Replies:** 5\
**Last updated:** [July 28, 2009, 4:33pm UTC](https://www.ruby-forum.com/t/need-help-viewing-my-first-app/172652 "2009-07-28T16:33:27Z")

</div>

Hi All, I am new to ROR and I am experiencing a few problems viewing my first app. Can anyone pls help me to get my first app up and running? I created a rails application called my\_app. I created a controller called…

---

## [File upload problem - blank page after submission](https://www.ruby-forum.com/t/file-upload-problem-blank-page-after-submission/172815)

<div class="topic-metadata">

**Author:** [@christopher\_e](https://www.ruby-forum.com/u/christopher_e)\
**Replies:** 1\
**Last updated:** [July 28, 2009, 3:45pm UTC](https://www.ruby-forum.com/t/file-upload-problem-blank-page-after-submission/172815 "2009-07-28T15:45:34Z")

</div>

Hi, The form definition below seems to work fine on the “GET” request, but when I post, control is not passed to the action controller’s method modify. The return render is a blank page. There is nothing in the devel…

---

## [Basic question map.root question](https://www.ruby-forum.com/t/basic-question-map-root-question/172804)

<div class="topic-metadata">

**Author:** [@MRG46](https://www.ruby-forum.com/u/MRG46)\
**Replies:** 2\
**Last updated:** [July 28, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/basic-question-map-root-question/172804 "2009-07-28T15:22:44Z")

</div>

Hi I’m brand new to RoR and just started the intro tutorial. When trying to set the application home page like this: The server won’t start and gives the following errors (below) I’m surprised to run into this erro…

---

## [Has\_many through join table - join three tables?](https://www.ruby-forum.com/t/has-many-through-join-table-join-three-tables/172814)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 2\
**Last updated:** [July 28, 2009, 2:07pm UTC](https://www.ruby-forum.com/t/has-many-through-join-table-join-three-tables/172814 "2009-07-28T14:07:38Z")

</div>

Hi Is it feasible or horribly wrong to include a boolean column to a join table in order to ‘junction’ a join? Imagine you want to map a journey that will comprise multiple flights and train journeys. train.rb fligh…

---

## [Replace special chars with new special char](https://www.ruby-forum.com/t/replace-special-chars-with-new-special-char/172625)

<div class="topic-metadata">

**Author:** [@priyadharsini](https://www.ruby-forum.com/u/priyadharsini)\
**Replies:** 3\
**Last updated:** [July 28, 2009, 1:24pm UTC](https://www.ruby-forum.com/t/replace-special-chars-with-new-special-char/172625 "2009-07-28T13:24:30Z")

</div>

Hi all, I have a string, which contains some special characters. From that i need to replace first 3 special chars with another special char. Eg:- “ler-2545654-45-an-audience-with—corporate\_counsel” is original stri…

---

## [Pdf export](https://www.ruby-forum.com/t/pdf-export/172798)

<div class="topic-metadata">

**Author:** [@anandhkumar](https://www.ruby-forum.com/u/anandhkumar)\
**Replies:** 1\
**Last updated:** [July 28, 2009, 1:06pm UTC](https://www.ruby-forum.com/t/pdf-export/172798 "2009-07-28T13:06:56Z")

</div>

can xml’s be exported to PDF with ruby… Any suggestion would be helpful… Thanks in advance Anandh

---

## ['double' nest form fields with accepts\_nested\_attributes\_for](https://www.ruby-forum.com/t/double-nest-form-fields-with-accepts-nested-attributes-for/172811)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 0\
**Last updated:** [July 28, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/double-nest-form-fields-with-accepts-nested-attributes-for/172811 "2009-07-28T12:57:14Z")

</div>

Hi Is it possible to ‘double’ nest form fields with accepts\_nested\_attributes\_for? Something like: \<% form\_for parent do |parent\_form| %\> \<% parent\_form.fields\_for parent\_children do |parent\_children\_fields| %\> …

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

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