# Rails

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

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

---

## [Mysql to sqlite](https://www.ruby-forum.com/t/mysql-to-sqlite/123922)

<div class="topic-metadata">

**Author:** [@ger4ld](https://www.ruby-forum.com/u/ger4ld)\
**Replies:** 0\
**Last updated:** [December 22, 2007, 1:57am UTC](https://www.ruby-forum.com/t/mysql-to-sqlite/123922 "2007-12-22T01:57:33Z")

</div>

Hi everyone, i am in process of learning RoR. I was following developing the Depot application on Agile Web D. with Rails 2nd Ed. Since the relse of the latest Rails (2.0.1) I decided to use SQLite now instead of the …

---

## [OT: Learning Xen?](https://www.ruby-forum.com/t/ot-learning-xen/123914)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 3\
**Last updated:** [December 22, 2007, 1:38am UTC](https://www.ruby-forum.com/t/ot-learning-xen/123914 "2007-12-22T01:38:40Z")

</div>

Hey Everybody, Please forgive the total off-topicness, but it seems quite a few people here are into Xen virtualization and I was hoping some of you could point out some online docs/tutorials that make it easy and qui…

---

## [With\_scope & association proxies](https://www.ruby-forum.com/t/with-scope-association-proxies/123919)

<div class="topic-metadata">

**Author:** [@fcheung](https://www.ruby-forum.com/u/fcheung)\
**Replies:** 0\
**Last updated:** [December 22, 2007, 1:03am UTC](https://www.ruby-forum.com/t/with-scope-association-proxies/123919 "2007-12-22T01:03:36Z")

</div>

I’ve been doing stuff like class Book \< ActiveRecord::Base has\_many :contributions, :dependent =\> :destroy has\_many :contributors, :through =\> :contributions, :uniq =\> true has\_many :authors, :through =\> :contributio…

---

## [Assigning alternating attributes](https://www.ruby-forum.com/t/assigning-alternating-attributes/123909)

<div class="topic-metadata">

**Author:** [@tomn](https://www.ruby-forum.com/u/tomn)\
**Replies:** 1\
**Last updated:** [December 22, 2007, 12:53am UTC](https://www.ruby-forum.com/t/assigning-alternating-attributes/123909 "2007-12-22T00:53:38Z")

</div>

I will have a number of teachers each assigned a number of spots on a schedule. The teachers name will be displayed each cell they are assigned and I want the background display of each teacher to be a different color …

---

## [Missing 2.0 stable branch](https://www.ruby-forum.com/t/missing-2-0-stable-branch/123900)

<div class="topic-metadata">

**Author:** [@Mark\_McSpadden](https://www.ruby-forum.com/u/Mark_McSpadden)\
**Replies:** 3\
**Last updated:** [December 22, 2007, 12:41am UTC](https://www.ruby-forum.com/t/missing-2-0-stable-branch/123900 "2007-12-22T00:41:23Z")

</div>

The dev.rubyonrails.org homepage seems to indicate that there is a stable branch of 2.0 available at the following address: http://svn.rubyonrails.org/rails/branches/2-0-stable That url does not seem to exist… Mark …

---

## [Mime type problem for rails+opera](https://www.ruby-forum.com/t/mime-type-problem-for-rails-opera/123917)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 0\
**Last updated:** [December 22, 2007, 12:39am UTC](https://www.ruby-forum.com/t/mime-type-problem-for-rails-opera/123917 "2007-12-22T00:39:46Z")

</div>

I get the following behavior within rails You have a nil object when you didn’t expect it! The error occurred while evaluating nil.call RAILS\_ROOT: script/…/config/… Application Trace | Framework Trace | Full Trace …

---

## [Editing multiple objects from same model](https://www.ruby-forum.com/t/editing-multiple-objects-from-same-model/123797)

<div class="topic-metadata">

**Author:** [@brian](https://www.ruby-forum.com/u/brian)\
**Replies:** 1\
**Last updated:** [December 22, 2007, 12:34am UTC](https://www.ruby-forum.com/t/editing-multiple-objects-from-same-model/123797 "2007-12-22T00:34:57Z")

</div>

I’m trying to build a form that will edit multiple objects from the same model. As you can see in the view below, I have a company model that has\_many addresses to edit. However, I’m trying to go one further by addin…

---

## [Using associations or better avoiding?](https://www.ruby-forum.com/t/using-associations-or-better-avoiding/123901)

<div class="topic-metadata">

**Author:** [@gabru](https://www.ruby-forum.com/u/gabru)\
**Replies:** 7\
**Last updated:** [December 22, 2007, 12:34am UTC](https://www.ruby-forum.com/t/using-associations-or-better-avoiding/123901 "2007-12-22T00:34:57Z")

</div>

i am wondering if its good to use associations where possible or if its better to avoid them … my concern is: it could lower the performance of my application (because new methods are added to the models which are not…

---

## [Memory v.s CPU](https://www.ruby-forum.com/t/memory-v-s-cpu/123864)

<div class="topic-metadata">

**Author:** [@jh100000](https://www.ruby-forum.com/u/jh100000)\
**Replies:** 3\
**Last updated:** [December 21, 2007, 11:59pm UTC](https://www.ruby-forum.com/t/memory-v-s-cpu/123864 "2007-12-21T23:59:52Z")

</div>

Hello, from your experience, what is more important in running a Rails app, Rails or CPU. Due to my limited budget, I have to choose between (1 GB RAM / Celeron D dedicatd server) and (521 RAM on a VPS (1/32 equal sh…

---

## [Fixtures don't load on functional tests with 'rake test:functionals' (but do with ruby!)](https://www.ruby-forum.com/t/fixtures-dont-load-on-functional-tests-with-rake-test-functionals-but-do-with-ruby/123906)

<div class="topic-metadata">

**Author:** [@MonkeyLice](https://www.ruby-forum.com/u/MonkeyLice)\
**Replies:** 1\
**Last updated:** [December 21, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/fixtures-dont-load-on-functional-tests-with-rake-test-functionals-but-do-with-ruby/123906 "2007-12-21T23:55:45Z")

</div>

I’ve got a problem that I’ve been hurting my brain on for a little while: When I run my two functional tests using % ruby thing\_ones\_controller\_test.rb % ruby thing\_twos\_controller\_test.rb they work fine. If I run …

---

## [Ways of running functional tests](https://www.ruby-forum.com/t/ways-of-running-functional-tests/80294)

<div class="topic-metadata">

**Author:** [@richtext](https://www.ruby-forum.com/u/richtext)\
**Replies:** 5\
**Last updated:** [December 21, 2007, 11:48pm UTC](https://www.ruby-forum.com/t/ways-of-running-functional-tests/80294 "2007-12-21T23:48:09Z")

</div>

If I run all my tests using rake test, they all work. However, when I run rake test:functionals, some functional tests fail on some of my assertions? If I run the individual rb file in which the failing tests appear…

---

## [How to get a well formatted Timespan](https://www.ruby-forum.com/t/how-to-get-a-well-formatted-timespan/123911)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [December 21, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/how-to-get-a-well-formatted-timespan/123911 "2007-12-21T23:44:01Z")

</div>

Hi there, i have some problems getting a timespan to a nice string. I have a Time when my db entry was created. Now i want to output how old this entry is. When i subtract the Time from Time.now i get an float value …

---

## [\[ANN\] bj-0.0.2](https://www.ruby-forum.com/t/ann-bj-0-0-2/122966)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 6\
**Last updated:** [December 21, 2007, 11:41pm UTC](https://www.ruby-forum.com/t/ann-bj-0-0-2/122966 "2007-12-21T23:41:05Z")

</div>

NAME bj SYNOPSIS bj (migration\_code|generate\_migration|migrate|setup|run|submit|list| set|config|pid) \[options\]+ DESCRIPTION Overview Backgroundjob (Bj) is a simple to use background priority queue for rails. A…

---

## [In\_place\_editor not working for Internationalization](https://www.ruby-forum.com/t/in-place-editor-not-working-for-internationalization/123830)

<div class="topic-metadata">

**Author:** [@franz](https://www.ruby-forum.com/u/franz)\
**Replies:** 1\
**Last updated:** [December 21, 2007, 11:24pm UTC](https://www.ruby-forum.com/t/in-place-editor-not-working-for-internationalization/123830 "2007-12-21T23:24:08Z")

</div>

I’m trying to implement internationalization in my app. I followed the instructions on the Globalize example (http://wiki.globalize- rails.org/globalize/show/Example+Application), using in\_place\_editor. The translati…

---

## [Respond\_to - same content, different mime type](https://www.ruby-forum.com/t/respond-to-same-content-different-mime-type/123883)

<div class="topic-metadata">

**Author:** [@nootch](https://www.ruby-forum.com/u/nootch)\
**Replies:** 4\
**Last updated:** [December 21, 2007, 7:46pm UTC](https://www.ruby-forum.com/t/respond-to-same-content-different-mime-type/123883 "2007-12-21T19:46:04Z")

</div>

I have some basic respond\_to blocks that essentially look like this: respond\_to do |format| format.iphone { render } format.mobile { render } end This is working great right now and I have it all over the place in …

---

## [Pretty neat Mash class (Magic Hash)](https://www.ruby-forum.com/t/pretty-neat-mash-class-magic-hash/123892)

<div class="topic-metadata">

**Author:** [@uncle](https://www.ruby-forum.com/u/uncle)\
**Replies:** 0\
**Last updated:** [December 21, 2007, 7:44pm UTC](https://www.ruby-forum.com/t/pretty-neat-mash-class-magic-hash/123892 "2007-12-21T19:44:54Z")

</div>

class Mash \< Hash def method\_missing(name, value=nil) key = name.to\_s.sub(/\[=?!\]$/,’’).to\_sym self\[key\] = value if name.to\_s\[-1,1\] == “=” self\[key\] = Mash.new unless self\[key\] || value return self\[key\] end end It…

---

## [Generating a form using form\_tag/remote\_form\_tag in an RJS template?](https://www.ruby-forum.com/t/generating-a-form-using-form-tag-remote-form-tag-in-an-rjs-template/123852)

<div class="topic-metadata">

**Author:** [@acampos](https://www.ruby-forum.com/u/acampos)\
**Replies:** 2\
**Last updated:** [December 21, 2007, 7:37pm UTC](https://www.ruby-forum.com/t/generating-a-form-using-form-tag-remote-form-tag-in-an-rjs-template/123852 "2007-12-21T19:37:49Z")

</div>

Is there a way to use the form\_tag/remote\_form\_tag helpers in an RJS template? I want to replace the innerHTML of a div with a remote form as the result of an AJAX request and I’m not having any luck getting it to wo…

---

## [Updating HABTM records is easy, but why isnâ€™t one\_to\_many?](https://www.ruby-forum.com/t/updating-habtm-records-is-easy-but-why-isna-t-one-to-many/123351)

<div class="topic-metadata">

**Author:** [@adrie](https://www.ruby-forum.com/u/adrie)\
**Replies:** 7\
**Last updated:** [December 21, 2007, 7:27pm UTC](https://www.ruby-forum.com/t/updating-habtm-records-is-easy-but-why-isna-t-one-to-many/123351 "2007-12-21T19:27:34Z")

</div>

Updating HABTM records is easy, but why isnâ€™t one\_to\_many (has\_many and belongs\_to)? With the collection\_select it is easy to update HABTM records, everthing is taken care of, besides declar-ing the variable for all…

---

## [Limit & offset ,will it be fast ? in combine query. urgent](https://www.ruby-forum.com/t/limit-offset-will-it-be-fast-in-combine-query-urgent/123841)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 3\
**Last updated:** [December 21, 2007, 7:04pm UTC](https://www.ruby-forum.com/t/limit-offset-will-it-be-fast-in-combine-query-urgent/123841 "2007-12-21T19:04:07Z")

</div>

i have a small doubt. if i write combine query in Model.find() WITH limit & offset to get 10 records per hit .but my friend told that when to get last 10 records then the time will be same as to get Model.find() WITH…

---

## [Error installing gems](https://www.ruby-forum.com/t/error-installing-gems/123860)

<div class="topic-metadata">

**Author:** [@arpit\_jain](https://www.ruby-forum.com/u/arpit_jain)\
**Replies:** 3\
**Last updated:** [December 21, 2007, 7:03pm UTC](https://www.ruby-forum.com/t/error-installing-gems/123860 "2007-12-21T19:03:03Z")

</div>

Hi all. While installing gems i am getting an error: ERROR: Error installing gem xml-simple-1.0.11.gem\[.gem\]: install directory thname:e:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.11\> not absolute …

---

## [Problem sending mail with emailer Errno::ECONNRESET (Connection reset by peer)](https://www.ruby-forum.com/t/problem-sending-mail-with-emailer-errno-econnreset-connection-reset-by-peer/123886)

<div class="topic-metadata">

**Author:** [@Erwin](https://www.ruby-forum.com/u/Erwin)\
**Replies:** 0\
**Last updated:** [December 21, 2007, 7:01pm UTC](https://www.ruby-forum.com/t/problem-sending-mail-with-emailer-errno-econnreset-connection-reset-by-peer/123886 "2007-12-21T19:01:53Z")

</div>

My mail is ready to be sent … (can see it in the log…) but I cannot find why I get this error… please help welcome ! I am working in stand alone dev on Mac OX 10.4.11(Tiger) and running Postfiw on locahost… here is t…

---

## [Very strange problem with application.rb and login\_generator](https://www.ruby-forum.com/t/very-strange-problem-with-application-rb-and-login-generator/123648)

<div class="topic-metadata">

**Author:** [@Alexis\_ROBERT](https://www.ruby-forum.com/u/Alexis_ROBERT)\
**Replies:** 4\
**Last updated:** [December 21, 2007, 6:51pm UTC](https://www.ruby-forum.com/t/very-strange-problem-with-application-rb-and-login-generator/123648 "2007-12-21T18:51:55Z")

</div>

Hi, I’m working on a very simple project, and I need to add authentification (I choose login\_generator). So, i’ve added the required things in application.rb, the require\_dependency and the include stuff. In the cont…

---

## [How to get scores from MySQL full text search](https://www.ruby-forum.com/t/how-to-get-scores-from-mysql-full-text-search/123879)

<div class="topic-metadata">

**Author:** [@mvargo](https://www.ruby-forum.com/u/mvargo)\
**Replies:** 2\
**Last updated:** [December 21, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/how-to-get-scores-from-mysql-full-text-search/123879 "2007-12-21T18:20:54Z")

</div>

The mysql match function returns scores. I am using the mysql full text indexing (don’t send the ferret sales pitch, I’ve seen it, its nice, I have my reasons\*) but the results don’t seem to be ranked in order of sco…

---

## [Strange class loading in integration tests](https://www.ruby-forum.com/t/strange-class-loading-in-integration-tests/123880)

<div class="topic-metadata">

**Author:** [@osteo](https://www.ruby-forum.com/u/osteo)\
**Replies:** 0\
**Last updated:** [December 21, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/strange-class-loading-in-integration-tests/123880 "2007-12-21T17:57:01Z")

</div>

So I have a working site and have a good amount of experience with Rails from building it. I recently decided it was time to start writing tests. Yeah, thanks, I know I should have done it earlier. I’m jumping strai…

---

## [Sending an unescaped cookie](https://www.ruby-forum.com/t/sending-an-unescaped-cookie/123873)

<div class="topic-metadata">

**Author:** [@elwin](https://www.ruby-forum.com/u/elwin)\
**Replies:** 0\
**Last updated:** [December 21, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/sending-an-unescaped-cookie/123873 "2007-12-21T16:34:31Z")

</div>

Hello: In my controller, I am writing a cookie and then immediately redirecting to an external site, as such: cookies\[:foo\] = {:value =\> ‘http://example.com’} redirect\_to ‘https://example.org’ The site I am directin…

---

## [Difficult query](https://www.ruby-forum.com/t/difficult-query/123865)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 3\
**Last updated:** [December 21, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/difficult-query/123865 "2007-12-21T16:22:07Z")

</div>

Hi all, I’m having problems creating a query. I have an event that has many attendees events\_table: id, name attendees\_table: id, user\_id, event\_id, present I want to create a query that shows all the events to a us…

---

## [Ruby 1.9?](https://www.ruby-forum.com/t/ruby-1-9/123769)

<div class="topic-metadata">

**Author:** [@cleaner416](https://www.ruby-forum.com/u/cleaner416)\
**Replies:** 3\
**Last updated:** [December 21, 2007, 2:48pm UTC](https://www.ruby-forum.com/t/ruby-1-9/123769 "2007-12-21T14:48:29Z")

</div>

Anyone know when Ruby 1.9 will be released? Does Rails 2.0 run on it? Mongrel? Cap? I’ve had a hard time determining the answers through some cursory googling.

---

## [Rails 2 :: OSX Gem update --system :: Permissions Help](https://www.ruby-forum.com/t/rails-2-osx-gem-update-system-permissions-help/123795)

<div class="topic-metadata">

**Author:** [@mindtonic](https://www.ruby-forum.com/u/mindtonic)\
**Replies:** 3\
**Last updated:** [December 21, 2007, 2:37pm UTC](https://www.ruby-forum.com/t/rails-2-osx-gem-update-system-permissions-help/123795 "2007-12-21T14:37:04Z")

</div>

Hello, I am trying to update my system to Rails 2. I followed the excellent instructions at Hivelogic to get rails running on my mac. However, I am getting a permissions error that I am unsure how to handle. $ scri…

---

## [Model methods - is this the best way?](https://www.ruby-forum.com/t/model-methods-is-this-the-best-way/123845)

<div class="topic-metadata">

**Author:** [@Chubbs](https://www.ruby-forum.com/u/Chubbs)\
**Replies:** 8\
**Last updated:** [December 21, 2007, 1:32pm UTC](https://www.ruby-forum.com/t/model-methods-is-this-the-best-way/123845 "2007-12-21T13:32:34Z")

</div>

Hey, I am putting quite alot of methods in my models such as User, for things such as: class User \< ActiveRecord::Base … Count all new messagebox messages def count\_new\_mbox count\_new\_privmsgs + count\_new\_comments …

---

## [Changing the URL if in nested resources](https://www.ruby-forum.com/t/changing-the-url-if-in-nested-resources/120933)

<div class="topic-metadata">

**Author:** [@Rich\_VSSSSzquez](https://www.ruby-forum.com/u/Rich_VSSSSzquez)\
**Replies:** 1\
**Last updated:** [December 21, 2007, 10:58am UTC](https://www.ruby-forum.com/t/changing-the-url-if-in-nested-resources/120933 "2007-12-21T10:58:21Z")

</div>

I have a nested restful resource working map.resources :works do |work| work.resources :work\_sections end producing a url like: /works/2/work\_sections/1 I’d like to do two things with the URL, but am not sure where…

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

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