# Rails

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

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

---

## [Undefined method \`query' for class \`Mysql'](https://www.ruby-forum.com/t/undefined-method-query-for-class-mysql/181131)

<div class="topic-metadata">

**Author:** [@thelemcke](https://www.ruby-forum.com/u/thelemcke)\
**Replies:** 2\
**Last updated:** [January 6, 2010, 8:35am UTC](https://www.ruby-forum.com/t/undefined-method-query-for-class-mysql/181131 "2010-01-06T08:35:06Z")

</div>

help! Just installed clean install of rails (2.3.2), ruby (1.8.7), and mysql (5.1), and when I try to run “rake db:migrate” on an existing rails app I get the following error: undefined method query' for classMysql’

---

## [API integration with Rails or Other Language](https://www.ruby-forum.com/t/api-integration-with-rails-or-other-language/181140)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 3\
**Last updated:** [January 6, 2010, 8:11am UTC](https://www.ruby-forum.com/t/api-integration-with-rails-or-other-language/181140 "2010-01-06T08:11:47Z")

</div>

Hi All, I need the API integration for the following site 1\] https://www.alamo.com/ 2\] http://www.avis.com 3\] http://www.thrifty.com/ 4\] http://www.hertz.com If any one know anything regarding any of the above plea…

---

## [Alias\_method\_chain on a boolean attribute not calling](https://www.ruby-forum.com/t/alias-method-chain-on-a-boolean-attribute-not-calling/181085)

<div class="topic-metadata">

**Author:** [@Curtis\_Jennings\_Sch](https://www.ruby-forum.com/u/Curtis_Jennings_Sch)\
**Replies:** 2\
**Last updated:** [January 6, 2010, 6:28am UTC](https://www.ruby-forum.com/t/alias-method-chain-on-a-boolean-attribute-not-calling/181085 "2010-01-06T06:28:05Z")

</div>

I have the below code - I cannot use alias\_method\_chain unless I declare :accepted= before using it - i suppost the attribute methods are added latter - I suspect that this case is blowing away my alias\_method\_chain …

---

## [Multiple sessions & Authlogic](https://www.ruby-forum.com/t/multiple-sessions-authlogic/181138)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 0\
**Last updated:** [January 6, 2010, 4:54am UTC](https://www.ruby-forum.com/t/multiple-sessions-authlogic/181138 "2010-01-06T04:54:56Z")

</div>

From GitHub - binarylogic/authlogic\_example: An example rails app using the Authlogic authentication library So lets assume you are setting up a session for your User model. You can call this anything you want, but I …

---

## [Multiple independent sets of validations with validation\_scopes gem](https://www.ruby-forum.com/t/multiple-independent-sets-of-validations-with-validation-scopes-gem/181116)

<div class="topic-metadata">

**Author:** [@dasil003](https://www.ruby-forum.com/u/dasil003)\
**Replies:** 3\
**Last updated:** [January 6, 2010, 4:05am UTC](https://www.ruby-forum.com/t/multiple-independent-sets-of-validations-with-validation-scopes-gem/181116 "2010-01-06T04:05:51Z")

</div>

Being able to have groups of validations, partial validations, or validations that don’t prevent saving an object are common needs w/ ActiveRecord. Last week I did an exhaustive search of the available plugins, and I…

---

## [Problem with associating comments with blog posts on same page](https://www.ruby-forum.com/t/problem-with-associating-comments-with-blog-posts-on-same-page/181130)

<div class="topic-metadata">

**Author:** [@jdgriffith](https://www.ruby-forum.com/u/jdgriffith)\
**Replies:** 0\
**Last updated:** [January 6, 2010, 1:00am UTC](https://www.ruby-forum.com/t/problem-with-associating-comments-with-blog-posts-on-same-page/181130 "2010-01-06T01:00:53Z")

</div>

Hi, I will admit I am very new to ruby and I am trying to do something that is not in any tutorials I have found. If you see a more conventional way to do some of the things I am trying to do, please let me know. Wh…

---

## [Trouble with Imagemagick and Rails 2.3.5](https://www.ruby-forum.com/t/trouble-with-imagemagick-and-rails-2-3-5/181128)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [January 6, 2010, 12:19am UTC](https://www.ruby-forum.com/t/trouble-with-imagemagick-and-rails-2-3-5/181128 "2010-01-06T00:19:19Z")

</div>

After upgrading to Rails 2.3.5 I got a runtime error message from a previously running well application (w Passenger) dont’ see where to start looking for a solution… help appreciated ;-)) error message from Passenge…

---

## [Oracle adapter problem? How to fix this?](https://www.ruby-forum.com/t/oracle-adapter-problem-how-to-fix-this/180841)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 9\
**Last updated:** [January 6, 2010, 12:15am UTC](https://www.ruby-forum.com/t/oracle-adapter-problem-how-to-fix-this/180841 "2010-01-06T00:15:48Z")

</div>

Hi, My setup is: Ruby 1.8.6 Rails 2.3.5 activerecord-oracle-adapter (1.0.0.9250) I upgraded Rails and the adapter recently and I just went through hell trying to find a problem while inserting a record in a table. …

---

## [Is it possible to use link\_to\_function to increment value onclick?](https://www.ruby-forum.com/t/is-it-possible-to-use-link-to-function-to-increment-value-onclick/181084)

<div class="topic-metadata">

**Author:** [@AlwaysCharging](https://www.ruby-forum.com/u/AlwaysCharging)\
**Replies:** 5\
**Last updated:** [January 5, 2010, 11:52pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-use-link-to-function-to-increment-value-onclick/181084 "2010-01-05T23:52:23Z")

</div>

Currently, I allow my users to dynamically add new fields to a form using the link\_to\_function variable. However, whenever a new field is added, its inputs have the same names as the previous fields. I solved this b…

---

## [Delete multiple files in RAILS\_ROOT/tmp/pdfs/](https://www.ruby-forum.com/t/delete-multiple-files-in-rails-root-tmp-pdfs/181110)

<div class="topic-metadata">

**Author:** [@frank\_programmer](https://www.ruby-forum.com/u/frank_programmer)\
**Replies:** 6\
**Last updated:** [January 5, 2010, 10:52pm UTC](https://www.ruby-forum.com/t/delete-multiple-files-in-rails-root-tmp-pdfs/181110 "2010-01-05T22:52:07Z")

</div>

Whats the best way to delete multiple files with a given prefix in the ‘tmp’ folder of a RAILS application? File.delete works great if I have just one file and I know what the file name is. But I’m creating PDF docum…

---

## [Seeking best practise advise](https://www.ruby-forum.com/t/seeking-best-practise-advise/181122)

<div class="topic-metadata">

**Author:** [@johnny](https://www.ruby-forum.com/u/johnny)\
**Replies:** 1\
**Last updated:** [January 5, 2010, 10:24pm UTC](https://www.ruby-forum.com/t/seeking-best-practise-advise/181122 "2010-01-05T22:24:36Z")

</div>

I am doing this app, account - project - category orientated. Category can belong to an account (url: account.example.com/categories) or specific to a project (url: account.example.com/projects/1/ categories), my ques…

---

## [\[JOBS\] WorkBeast is Hiring!](https://www.ruby-forum.com/t/jobs-workbeast-is-hiring/181123)

<div class="topic-metadata">

**Author:** [@TRTRTR](https://www.ruby-forum.com/u/TRTRTR)\
**Replies:** 0\
**Last updated:** [January 5, 2010, 10:21pm UTC](https://www.ruby-forum.com/t/jobs-workbeast-is-hiring/181123 "2010-01-05T22:21:05Z")

</div>

Do you like using recruiters to find jobs or hire? We donâ€™t like it either. WorkBeast has created a business model that uses technology to change how people hire, and vastly improves the process. Consultants will e…

---

## [Thin server claims I don't have correct rails gem installed](https://www.ruby-forum.com/t/thin-server-claims-i-dont-have-correct-rails-gem-installed/181119)

<div class="topic-metadata">

**Author:** [@zettabyte](https://www.ruby-forum.com/u/zettabyte)\
**Replies:** 6\
**Last updated:** [January 5, 2010, 9:50pm UTC](https://www.ruby-forum.com/t/thin-server-claims-i-dont-have-correct-rails-gem-installed/181119 "2010-01-05T21:50:39Z")

</div>

Hi everyone, I need some insight into a problem I just started having. I’m running ruby 1.8.6 on an ubuntu box with the following gems installed: $ sudo gem list --local \*\*\* LOCAL GEMS \*\*\* actionmailer (2.3.5, 2.3.4…

---

## [Update\_attribute, alias\_method\_chain on a setter](https://www.ruby-forum.com/t/update-attribute-alias-method-chain-on-a-setter/181118)

<div class="topic-metadata">

**Author:** [@Curtis\_Jennings\_Sch](https://www.ruby-forum.com/u/Curtis_Jennings_Sch)\
**Replies:** 0\
**Last updated:** [January 5, 2010, 9:00pm UTC](https://www.ruby-forum.com/t/update-attribute-alias-method-chain-on-a-setter/181118 "2010-01-05T21:00:54Z")

</div>

update\_attribute(:accepted,true) is calling accepted\_with\_create\_curated\_video= update\_attribute(:accepted\_without\_create\_curated\_video,true) is calling accepted= No where is :accepted getting set to true. Any ideas…

---

## [Add external data at new record creation time](https://www.ruby-forum.com/t/add-external-data-at-new-record-creation-time/181041)

<div class="topic-metadata">

**Author:** [@qaswm](https://www.ruby-forum.com/u/qaswm)\
**Replies:** 5\
**Last updated:** [January 5, 2010, 8:19pm UTC](https://www.ruby-forum.com/t/add-external-data-at-new-record-creation-time/181041 "2010-01-05T20:19:21Z")

</div>

In my project i require a bit.ly link for each new product entered in the database. Please guide me on how to do this? Note: I am using a standard rails app with basic actions to test this code I plan on writing a he…

---

## [To\_parm and how it can be used in a helper](https://www.ruby-forum.com/t/to-parm-and-how-it-can-be-used-in-a-helper/181043)

<div class="topic-metadata">

**Author:** [@qaswm](https://www.ruby-forum.com/u/qaswm)\
**Replies:** 2\
**Last updated:** [January 5, 2010, 7:55pm UTC](https://www.ruby-forum.com/t/to-parm-and-how-it-can-be-used-in-a-helper/181043 "2010-01-05T19:55:34Z")

</div>

is there a way to pass the data returned by the to\_parm function in a helper? i followed the info provided at Best Online Casino in Australia | Top Licensed Casinos for Gamblers and am able to successfully get the co…

---

## [Smalltalk youtube channel](https://www.ruby-forum.com/t/smalltalk-youtube-channel/181113)

<div class="topic-metadata">

**Author:** [@brasspen](https://www.ruby-forum.com/u/brasspen)\
**Replies:** 0\
**Last updated:** [January 5, 2010, 7:27pm UTC](https://www.ruby-forum.com/t/smalltalk-youtube-channel/181113 "2010-01-05T19:27:15Z")

</div>

Found this on YouTube. I don’t think these people realize we’ve superseded them. Chris

---

## [Noob question:controller-model problem](https://www.ruby-forum.com/t/noob-question-controller-model-problem/181108)

<div class="topic-metadata">

**Author:** [@radu\_puspana](https://www.ruby-forum.com/u/radu_puspana)\
**Replies:** 2\
**Last updated:** [January 5, 2010, 6:24pm UTC](https://www.ruby-forum.com/t/noob-question-controller-model-problem/181108 "2010-01-05T18:24:37Z")

</div>

hi guys, hope u are all out there… so this is my controller method that creates a new product(and stores into the db) def create vendor\_id = session\[:user\_id\] @product = Product.new(params\[:product\]) @product.add\_v…

---

## [Mysql username isn't sent](https://www.ruby-forum.com/t/mysql-username-isnt-sent/181054)

<div class="topic-metadata">

**Author:** [@Tass](https://www.ruby-forum.com/u/Tass)\
**Replies:** 1\
**Last updated:** [January 5, 2010, 5:53pm UTC](https://www.ruby-forum.com/t/mysql-username-isnt-sent/181054 "2010-01-05T17:53:36Z")

</div>

database.yml: http://pastie.org/766054 ActiveRecord::Base.connection\_pool.spec =\> #\<ActiveRecord::Base::ConnectionSpecification:0x7fd5f25aa238 @config= {:password=\>nil, :username=\>“developer”, :database=\>“foobar”, …

---

## [Number limited redirects](https://www.ruby-forum.com/t/number-limited-redirects/181089)

<div class="topic-metadata">

**Author:** [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Replies:** 6\
**Last updated:** [January 5, 2010, 5:05pm UTC](https://www.ruby-forum.com/t/number-limited-redirects/181089 "2010-01-05T17:05:06Z")

</div>

The following is simply for testing and educational purposes: def new if request.get? @album = Album.new(:artist\_id =\> params\[:artist\]) else @album = Album.new(params\[:album\]) if @album.save flash\[:notice\] = “Albu…

---

## [Errno::ENETUNREACH (Network is unreachable - connect(2)):](https://www.ruby-forum.com/t/errno-enetunreach-network-is-unreachable-connect-2/181102)

<div class="topic-metadata">

**Author:** [@rtacconi](https://www.ruby-forum.com/u/rtacconi)\
**Replies:** 1\
**Last updated:** [January 5, 2010, 4:51pm UTC](https://www.ruby-forum.com/t/errno-enetunreach-network-is-unreachable-connect-2/181102 "2010-01-05T16:51:33Z")

</div>

I am trying to run my first app on the Solaris server, in a production environment. I get a network unreachable. Why? Does it belongs to database.yml config? Processing CategoriesController#index (for 10.3.70.129 at 2…

---

## [Conditional named\_scope chaining with params (Need help)](https://www.ruby-forum.com/t/conditional-named-scope-chaining-with-params-need-help/181095)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 2\
**Last updated:** [January 5, 2010, 3:57pm UTC](https://www.ruby-forum.com/t/conditional-named-scope-chaining-with-params-need-help/181095 "2010-01-05T15:57:47Z")

</div>

Hello there, I have a model that has more then one named\_scope. In my action Index of the controller that handle this model I want to do this in a drier way: if params\[:ownership\] == "mine" @posts = Post.tagged\_w…

---

## [(PRAWN) PDF created but PDF won't download](https://www.ruby-forum.com/t/prawn-pdf-created-but-pdf-wont-download/181101)

<div class="topic-metadata">

**Author:** [@frank\_programmer](https://www.ruby-forum.com/u/frank_programmer)\
**Replies:** 3\
**Last updated:** [January 5, 2010, 3:45pm UTC](https://www.ruby-forum.com/t/prawn-pdf-created-but-pdf-wont-download/181101 "2010-01-05T15:45:24Z")

</div>

I can create a PDF document using PRAWN, but when I try to download as an attachment via a link, nothing appears to happen. When I go into the /tmp/pdfs/ directory of my rails app, I can see the created PDF document. …

---

## [Using test data generators -- valid / invalid data](https://www.ruby-forum.com/t/using-test-data-generators-valid-invalid-data/180764)

<div class="topic-metadata">

**Author:** [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Replies:** 14\
**Last updated:** [January 5, 2010, 12:29pm UTC](https://www.ruby-forum.com/t/using-test-data-generators-valid-invalid-data/180764 "2010-01-05T12:29:52Z")

</div>

I’m investigating moving from fixtures to generated data (using Machinist right now, though this question is probably generic to any generator) but I seem to be missing one essential point: If I use a fixture, I can t…

---

## [Generators](https://www.ruby-forum.com/t/generators/181050)

<div class="topic-metadata">

**Author:** [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Replies:** 4\
**Last updated:** [January 5, 2010, 12:24pm UTC](https://www.ruby-forum.com/t/generators/181050 "2010-01-05T12:24:09Z")

</div>

Could anyone tell me (or link me to) the best place to learn about RoR Module Generators?

---

## [Good product companies in India using Ruby/Rails?](https://www.ruby-forum.com/t/good-product-companies-in-india-using-ruby-rails/181094)

<div class="topic-metadata">

**Author:** [@saideep\_a.v.s](https://www.ruby-forum.com/u/saideep_a.v.s)\
**Replies:** 0\
**Last updated:** [January 5, 2010, 12:21pm UTC](https://www.ruby-forum.com/t/good-product-companies-in-india-using-ruby-rails/181094 "2010-01-05T12:21:05Z")

</div>

Hi All, I am trying to find out what all companies in India/Bangalore use Ruby/Rails as their platform, shouldn’t these companies come forward to take active part in organizing events like RubyConfIndia ? List of pr…

---

## [Authlogic giving problem](https://www.ruby-forum.com/t/authlogic-giving-problem/181091)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 0\
**Last updated:** [January 5, 2010, 11:45am UTC](https://www.ruby-forum.com/t/authlogic-giving-problem/181091 "2010-01-05T11:45:23Z")

</div>

Hi, I have an application running. I have exsting users which are created by using the “Restful Authentication”. Right now we modified our autnentication to “Authlogic”, due to that our exsiting user are not able to…

---

## [User and status table definition and relation](https://www.ruby-forum.com/t/user-and-status-table-definition-and-relation/181086)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 3\
**Last updated:** [January 5, 2010, 10:50am UTC](https://www.ruby-forum.com/t/user-and-status-table-definition-and-relation/181086 "2010-01-05T10:50:55Z")

</div>

Hi I have models user and user\_status An user always elongs to a particular status at any time Status table has predefined values like “pending”,“approved” etc My question is what should be the table structure and re…

---

## [Ruy 1.8.6 and rails 2.3.5](https://www.ruby-forum.com/t/ruy-1-8-6-and-rails-2-3-5/181088)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 0\
**Last updated:** [January 5, 2010, 10:30am UTC](https://www.ruby-forum.com/t/ruy-1-8-6-and-rails-2-3-5/181088 "2010-01-05T10:30:46Z")

</div>

Hi I have ruby version ruby 1.8.6 (2007-09-24 patchlevel 111) \[i386-mswin32\] and rails 2.3.5 on machine .Now i have created a new rails project and setup dataase.yml When issue rake db:create I get error c:/ruby/li…

---

## [Rake dependency error](https://www.ruby-forum.com/t/rake-dependency-error/152615)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 3\
**Last updated:** [January 5, 2010, 7:27am UTC](https://www.ruby-forum.com/t/rake-dependency-error/152615 "2010-01-05T07:27:19Z")

</div>

Rake no longer works for me at all. I think this is a result of having upgraded some gems (including the RubyGem system itself), but not others, some kind of dependency problem. (I actually didn’t mean to upgrade this…

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

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