# Rails

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

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

---

## [Find\_where and pagination](https://www.ruby-forum.com/t/find-where-and-pagination/130197)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 0\
**Last updated:** [February 26, 2008, 9:45am UTC](https://www.ruby-forum.com/t/find-where-and-pagination/130197 "2008-02-26T09:45:40Z")

</div>

Hi I hacve been using find\_where (plugin ez-where) successfully instead of the find method rails provide.My problem is how to make pagination posible with this Please help Sijo

---

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

<div class="topic-metadata">

**Author:** [@patrickreilly](https://www.ruby-forum.com/u/patrickreilly)\
**Replies:** 4\
**Last updated:** [February 26, 2008, 9:39am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments/128589 "2008-02-26T09:39:24Z")

</div>

Dear all, I’m trying to build SimpleTicket - the latest build of which is available at simpleticket.net - This website is for sale! - simpleticket Resources and Information.. During the rake migrate, I encounter what…

---

## [Using includes twice](https://www.ruby-forum.com/t/using-includes-twice/186760)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [February 26, 2008, 8:54am UTC](https://www.ruby-forum.com/t/using-includes-twice/186760 "2008-02-26T08:54:56Z")

</div>

Hello, Is there a way to handle includes twice? Basic models, Group and User. Group has many users, users belong to group. Users have a ‘role’, which can be manager/developer and stuff like that. Say I want to find…

---

## [NoMethodError: undefined method \`\<=\>' for :zip:Symbol](https://www.ruby-forum.com/t/nomethoderror-undefined-method-for-symbol/186757)

<div class="topic-metadata">

**Author:** [@kyleh](https://www.ruby-forum.com/u/kyleh)\
**Replies:** 1\
**Last updated:** [February 26, 2008, 8:41am UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-for-symbol/186757 "2008-02-26T08:41:26Z")

</div>

Long time programmer, but I just started learning RoR last week. I am going through some examples in the book “Ruby on Rails: Up and Running”. The example I am on had me add a table to the database that looks like so…

---

## [Rmagic install Problem on linux/Ubuntu](https://www.ruby-forum.com/t/rmagic-install-problem-on-linux-ubuntu/130185)

<div class="topic-metadata">

**Author:** [@chirag\_shah](https://www.ruby-forum.com/u/chirag_shah)\
**Replies:** 3\
**Last updated:** [February 26, 2008, 8:03am UTC](https://www.ruby-forum.com/t/rmagic-install-problem-on-linux-ubuntu/130185 "2008-02-26T08:03:48Z")

</div>

Hi, Please help me for installing Rmagic… I got an error while i am going to install rmagic is “ERROR: While executing gem … (RuntimeError) ERROR: Failed to build gem native extension.” So what is the problem is the…

---

## [2-way associations](https://www.ruby-forum.com/t/2-way-associations/186761)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [February 26, 2008, 8:00am UTC](https://www.ruby-forum.com/t/2-way-associations/186761 "2008-02-26T08:00:52Z")

</div>

Hello, I was wondering if there is an easy way to handle this N+1 problem. class Post \< ActiveRecord::Base has\_many :comments end class Comment \< ActiveRecord::Base belongs\_to :post def full\_name “comment on #{po…

---

## [Any way to generate scaffold controller from existing model?](https://www.ruby-forum.com/t/any-way-to-generate-scaffold-controller-from-existing-model/130182)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 1\
**Last updated:** [February 26, 2008, 7:47am UTC](https://www.ruby-forum.com/t/any-way-to-generate-scaffold-controller-from-existing-model/130182 "2008-02-26T07:47:55Z")

</div>

hi- i’m sure this is a FAQ, but can’t find an answer. i’ve already developed the model and migration, can i generate controller and views (forms) scaffolding that looks into the table and picks out the fields automa…

---

## [Creating models from existing db tables](https://www.ruby-forum.com/t/creating-models-from-existing-db-tables/130187)

<div class="topic-metadata">

**Author:** [@jim\_starboard](https://www.ruby-forum.com/u/jim_starboard)\
**Replies:** 1\
**Last updated:** [February 26, 2008, 7:39am UTC](https://www.ruby-forum.com/t/creating-models-from-existing-db-tables/130187 "2008-02-26T07:39:02Z")

</div>

How do I automatically create model classes from an existing db schema? this is in RoR 2.0

---

## [\[ADV\] Updated Advanced Rails Recipes PDF](https://www.ruby-forum.com/t/adv-updated-advanced-rails-recipes-pdf/130186)

<div class="topic-metadata">

**Author:** [@clarkware](https://www.ruby-forum.com/u/clarkware)\
**Replies:** 0\
**Last updated:** [February 26, 2008, 6:37am UTC](https://www.ruby-forum.com/t/adv-updated-advanced-rails-recipes-pdf/130186 "2008-02-26T06:37:29Z")

</div>

Hi Folks, We’ve just uploaded the third beta revision of the Advanced Rails Recipes PDF: http://pragprog.com/titles/fr\_arr To get your updated PDF, simply sign in to your account (http:// Manage) and ask the system …

---

## [Can we get request in application controller?](https://www.ruby-forum.com/t/can-we-get-request-in-application-controller/130180)

<div class="topic-metadata">

**Author:** [@kopf1988](https://www.ruby-forum.com/u/kopf1988)\
**Replies:** 1\
**Last updated:** [February 26, 2008, 5:36am UTC](https://www.ruby-forum.com/t/can-we-get-request-in-application-controller/130180 "2008-02-26T05:36:34Z")

</div>

Hi, I’m trying to use my application controller to define my website object (thus helping me find which template to use, etc). I have this code in ApplicationController sitename = request.host sitename = “www.” + sit…

---

## [Weird Functional Test Behavior](https://www.ruby-forum.com/t/weird-functional-test-behavior/129935)

<div class="topic-metadata">

**Author:** [@dkanders](https://www.ruby-forum.com/u/dkanders)\
**Replies:** 3\
**Last updated:** [February 26, 2008, 5:10am UTC](https://www.ruby-forum.com/t/weird-functional-test-behavior/129935 "2008-02-26T05:10:25Z")

</div>

Hi All, I have a test that is failing and I can’t figure it out… it fails the first time in autotest and the second time it runs (once autotest is started), the test doesn’t fail. Thanks in advance for your help. He…

---

## [Unknown select query internal to rails?](https://www.ruby-forum.com/t/unknown-select-query-internal-to-rails/130181)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 0\
**Last updated:** [February 26, 2008, 4:48am UTC](https://www.ruby-forum.com/t/unknown-select-query-internal-to-rails/130181 "2008-02-26T04:48:05Z")

</div>

A few times a day, a query runs on my server that locks everything up: SELECT \* FROM \<db\_name\>.books ORDER BY id I have no clue what would generate a query like this. Anyone familiar with Rails magic that could answer…

---

## [Hyperlinks in comments](https://www.ruby-forum.com/t/hyperlinks-in-comments/186768)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 5\
**Last updated:** [February 26, 2008, 4:14am UTC](https://www.ruby-forum.com/t/hyperlinks-in-comments/186768 "2008-02-26T04:14:34Z")

</div>

I am building a social networking site which currently has comments enabled. I was wondering if anyone knew how to enable html within these comments so that people can post links to other sites on the internet and ha…

---

## [Identifying specific mysql tables](https://www.ruby-forum.com/t/identifying-specific-mysql-tables/130058)

<div class="topic-metadata">

**Author:** [@xwordguy](https://www.ruby-forum.com/u/xwordguy)\
**Replies:** 2\
**Last updated:** [February 26, 2008, 2:40am UTC](https://www.ruby-forum.com/t/identifying-specific-mysql-tables/130058 "2008-02-26T02:40:14Z")

</div>

Hey guys, I’m new to your ruby forums. Cool place :slight\_smile: I was wondering if anyone knew how to only display specific tables in ‘list.rhtml’ for example, I have 10 tables. I only want to show one/two of them in …

---

## [Rails project from svn to git WITHOUT history](https://www.ruby-forum.com/t/rails-project-from-svn-to-git-without-history/130171)

<div class="topic-metadata">

**Author:** [@sudara](https://www.ruby-forum.com/u/sudara)\
**Replies:** 0\
**Last updated:** [February 26, 2008, 1:43am UTC](https://www.ruby-forum.com/t/rails-project-from-svn-to-git-without-history/130171 "2008-02-26T01:43:57Z")

</div>

This is not the best place to ask, but I figure another railer may have run into this situation: I’m moving a svn repo to git. I DONT want to push the the svn history upstream. Without the negativity: I want the git …

---

## [Error from script\\generate with --svn option](https://www.ruby-forum.com/t/error-from-script-generate-with-svn-option/186756)

<div class="topic-metadata">

**Author:** [@pfb](https://www.ruby-forum.com/u/pfb)\
**Replies:** 1\
**Last updated:** [February 26, 2008, 1:29am UTC](https://www.ruby-forum.com/t/error-from-script-generate-with-svn-option/186756 "2008-02-26T01:29:18Z")

</div>

I have not been able to google a solution to this error, and I didn’t find anything about it in the group archives. Here is what happens: C:\\path to\\my project\>ruby script\\generate scaffold article title:string body:…

---

## [Date math makes me crazy](https://www.ruby-forum.com/t/date-math-makes-me-crazy/186774)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 5\
**Last updated:** [February 26, 2008, 12:15am UTC](https://www.ruby-forum.com/t/date-math-makes-me-crazy/186774 "2008-02-26T00:15:17Z")

</div>

I just don’t understand this and leap years make this problem obvious to me… test = DateTime.now =\> #\<DateTime: 53017684949923739/21600000000,-7/24,2299161\> test.strftime("%Y-%m-%d") =\> “2008-02-25” test = …

---

## [Date math makes me crazy](https://www.ruby-forum.com/t/date-math-makes-me-crazy/130163)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 0\
**Last updated:** [February 25, 2008, 11:52pm UTC](https://www.ruby-forum.com/t/date-math-makes-me-crazy/130163 "2008-02-25T23:52:55Z")

</div>

I just don’t understand this and leap years make this problem obvious to me… test = DateTime.now =\> #\<DateTime: 53017684949923739/21600000000,-7/24,2299161\> test.strftime("%Y-%m-%d") =\> “2008-02-25” test = …

---

## [Dreamhost using RHTML...?](https://www.ruby-forum.com/t/dreamhost-using-rhtml/186773)

<div class="topic-metadata">

**Author:** [@jsierra](https://www.ruby-forum.com/u/jsierra)\
**Replies:** 2\
**Last updated:** [February 25, 2008, 11:34pm UTC](https://www.ruby-forum.com/t/dreamhost-using-rhtml/186773 "2008-02-25T23:34:05Z")

</div>

I’m revisiting Rails as a web app solution, and my previous playtime with it had me using RHTML… now it’s outputting ERB files or something. That’s all fine, I understand that it’s evolving, etc. I’m sure ERB files …

---

## [Dreamhost using RHTML...?](https://www.ruby-forum.com/t/dreamhost-using-rhtml/130162)

<div class="topic-metadata">

**Author:** [@jsierra](https://www.ruby-forum.com/u/jsierra)\
**Replies:** 0\
**Last updated:** [February 25, 2008, 10:43pm UTC](https://www.ruby-forum.com/t/dreamhost-using-rhtml/130162 "2008-02-25T22:43:22Z")

</div>

I’m revisiting Rails as a web app solution, and my previous playtime with it had me using RHTML… now it’s outputting ERB files or something. That’s all fine, I understand that it’s evolving, etc. I’m sure ERB files …

---

## [Add files to a gzip file](https://www.ruby-forum.com/t/add-files-to-a-gzip-file/130160)

<div class="topic-metadata">

**Author:** [@schnoid](https://www.ruby-forum.com/u/schnoid)\
**Replies:** 0\
**Last updated:** [February 25, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/add-files-to-a-gzip-file/130160 "2008-02-25T22:13:01Z")

</div>

I’d like to add several separate files into a new Gzip file created within ruby. The code I’ve got at the moment is as follows: File.open(‘coursework\_submissions.gz’, ‘wb’) do |f| gz = Zlib::GzipWriter.new(f) @stude…

---

## [Hyperlinks in comments](https://www.ruby-forum.com/t/hyperlinks-in-comments/130157)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 0\
**Last updated:** [February 25, 2008, 10:03pm UTC](https://www.ruby-forum.com/t/hyperlinks-in-comments/130157 "2008-02-25T22:03:19Z")

</div>

I am building a social networking site which currently has comments enabled. I was wondering if anyone knew how to enable html within these comments so that people can post links to other sites on the internet and ha…

---

## [Parsing strings](https://www.ruby-forum.com/t/parsing-strings/130155)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 0\
**Last updated:** [February 25, 2008, 9:57pm UTC](https://www.ruby-forum.com/t/parsing-strings/130155 "2008-02-25T21:57:26Z")

</div>

I’m trying to parse ical strings (not that ical strings are all that special) but I’m trying to break them down for date calculations… so if I have a value like this… @events\[0\].recurrence\_rules =\> \[“FREQ=YEARLY;INTE…

---

## [How to make asynchronus http request?](https://www.ruby-forum.com/t/how-to-make-asynchronus-http-request/129955)

<div class="topic-metadata">

**Author:** [@rmehta](https://www.ruby-forum.com/u/rmehta)\
**Replies:** 4\
**Last updated:** [February 25, 2008, 9:44pm UTC](https://www.ruby-forum.com/t/how-to-make-asynchronus-http-request/129955 "2008-02-25T21:44:27Z")

</div>

Hi, In my application I have to send an http post request to another server for some processing. My application crashes if it has to make 100+ requests in a loop based on some business logic. Basically, user is just …

---

## [Rails hosting](https://www.ruby-forum.com/t/rails-hosting/130021)

<div class="topic-metadata">

**Author:** [@m25](https://www.ruby-forum.com/u/m25)\
**Replies:** 2\
**Last updated:** [February 25, 2008, 9:40pm UTC](https://www.ruby-forum.com/t/rails-hosting/130021 "2008-02-25T21:40:52Z")

</div>

Hello, I have a win 2003 server which is hosting a website on IIS. If i want to add a rails rails application on that server what do i need to do. What i have done till now is installed mongrel and then ran it as mon…

---

## [Using group in with find in an ActiveRecord appropriately](https://www.ruby-forum.com/t/using-group-in-with-find-in-an-activerecord-appropriately/130153)

<div class="topic-metadata">

**Author:** [@rob](https://www.ruby-forum.com/u/rob)\
**Replies:** 0\
**Last updated:** [February 25, 2008, 9:36pm UTC](https://www.ruby-forum.com/t/using-group-in-with-find-in-an-activerecord-appropriately/130153 "2008-02-25T21:36:09Z")

</div>

I’m playing around with the Practical Rails Projects code, and was attempting to make a change for graphing data differently using groupings. Basically the code went from: total\_weight = @exercise.activities.collect …

---

## [LoadError (Expected websites\_controller.rb to define WebsitesController)](https://www.ruby-forum.com/t/loaderror-expected-websites-controller-rb-to-define-websitescontroller/130152)

<div class="topic-metadata">

**Author:** [@kopf1988](https://www.ruby-forum.com/u/kopf1988)\
**Replies:** 0\
**Last updated:** [February 25, 2008, 9:30pm UTC](https://www.ruby-forum.com/t/loaderror-expected-websites-controller-rb-to-define-websitescontroller/130152 "2008-02-25T21:30:17Z")

</div>

Hi, I just removed all my RoR files on my web server and re uploaded them again because I made so many changes to my application. Now all of a sudden, I’m getting the LoadError (Expected websites\_controller.rb to def…

---

## [2-way associations](https://www.ruby-forum.com/t/2-way-associations/130150)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [February 25, 2008, 9:19pm UTC](https://www.ruby-forum.com/t/2-way-associations/130150 "2008-02-25T21:19:05Z")

</div>

Hello, I was wondering if there is an easy way to handle this N+1 problem. class Post \< ActiveRecord::Base has\_many :comments end class Comment \< ActiveRecord::Base belongs\_to :post def full\_name “comment on #{po…

---

## [Using includes twice](https://www.ruby-forum.com/t/using-includes-twice/130149)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [February 25, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/using-includes-twice/130149 "2008-02-25T21:14:57Z")

</div>

Hello, Is there a way to handle includes twice? Basic models, Group and User. Group has many users, users belong to group. Users have a ‘role’, which can be manager/developer and stuff like that. Say I want to find…

---

## [Is there a way to set a global variable in my deploy](https://www.ruby-forum.com/t/is-there-a-way-to-set-a-global-variable-in-my-deploy/186755)

<div class="topic-metadata">

**Author:** [@lucasc](https://www.ruby-forum.com/u/lucasc)\
**Replies:** 3\
**Last updated:** [February 25, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-set-a-global-variable-in-my-deploy/186755 "2008-02-25T21:14:57Z")

</div>

I am deploying an application to several sub domains and need to set a global variable in each sub domain so that I query the correct table based on the sub domain. Currently I am doing this in my layouts but this do…

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

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