# Rails

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

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

---

## [How to migrate Stored Procedure](https://www.ruby-forum.com/t/how-to-migrate-stored-procedure/157810)

<div class="topic-metadata">

**Author:** [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Replies:** 5\
**Last updated:** [January 15, 2009, 3:48pm UTC](https://www.ruby-forum.com/t/how-to-migrate-stored-procedure/157810 "2009-01-15T15:48:15Z")

</div>

Hi all, I was wondering how to migrate a stored procedure by using rake db:migrate . my code is : class StoredProcedures \< ActiveRecord::Migration def self.up end end My stored procedure is DELIMITER $$ DROP PR…

---

## [Multiple routes to same controller action](https://www.ruby-forum.com/t/multiple-routes-to-same-controller-action/157769)

<div class="topic-metadata">

**Author:** [@mpathare](https://www.ruby-forum.com/u/mpathare)\
**Replies:** 2\
**Last updated:** [January 15, 2009, 3:40pm UTC](https://www.ruby-forum.com/t/multiple-routes-to-same-controller-action/157769 "2009-01-15T15:40:32Z")

</div>

my routes file has the following lines map.resources :players, :has\_many =\> :matches map.resources :tourney, :has\_many =\> :matches now I want to be able to display all the matches played by a player and also all the …

---

## [Mailer layouts , how to link to a css file](https://www.ruby-forum.com/t/mailer-layouts-how-to-link-to-a-css-file/157797)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 2\
**Last updated:** [January 15, 2009, 2:50pm UTC](https://www.ruby-forum.com/t/mailer-layouts-how-to-link-to-a-css-file/157797 "2009-01-15T14:50:48Z")

</div>

I can send html emails using the new layouts feature using inline style, there is no problem to get a nice display… but what if ? i would like to link to a css file , … which king of link ? to public/stylesheets/ema…

---

## [Two classes in one program](https://www.ruby-forum.com/t/two-classes-in-one-program/157808)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 1\
**Last updated:** [January 15, 2009, 2:42pm UTC](https://www.ruby-forum.com/t/two-classes-in-one-program/157808 "2009-01-15T14:42:14Z")

</div>

Hi, Is it possible to write two class in one controller? e.g:- class ApplicationController \< ActionController::Base def abc end end class Hash def xyz end end How it will work? Thanks, Tushar.

---

## [Converting Word Documents (and other types of files) to PDF](https://www.ruby-forum.com/t/converting-word-documents-and-other-types-of-files-to-pdf/85286)

<div class="topic-metadata">

**Author:** [@brendon](https://www.ruby-forum.com/u/brendon)\
**Replies:** 4\
**Last updated:** [January 15, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/converting-word-documents-and-other-types-of-files-to-pdf/85286 "2009-01-15T14:23:50Z")

</div>

Hi everyone, I’m currently developing a Rails content management system, and one of the useful features we’re trying to get sorted is a way to allow a user to upload a word document or some other type of regular file,…

---

## [Ruby on Rails Developing Opportunities](https://www.ruby-forum.com/t/ruby-on-rails-developing-opportunities/157703)

<div class="topic-metadata">

**Author:** [@mhartman](https://www.ruby-forum.com/u/mhartman)\
**Replies:** 3\
**Last updated:** [January 15, 2009, 2:20pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-developing-opportunities/157703 "2009-01-15T14:20:59Z")

</div>

Hello everyone, I am working for a new client of ours that is looking for multiple Ruby on Rails developers. They are a new company that is only a few years old and are offering training to any IT professional that ha…

---

## [Conflict between before\_create with db:migrate](https://www.ruby-forum.com/t/conflict-between-before-create-with-db-migrate/157800)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 1\
**Last updated:** [January 15, 2009, 1:15pm UTC](https://www.ruby-forum.com/t/conflict-between-before-create-with-db-migrate/157800 "2009-01-15T13:15:56Z")

</div>

I have a User and Folder model class User has\_many :folders before\_create :make\_box def make\_box folders.build(:name =\> “red”) end when I run db:migrate, the got a error! Mysql::Error: Table ‘kaixin2009\_developmen…

---

## [Does Rails have a mode which ensures associations work at the object level (i.e. prior to any DB sav](https://www.ruby-forum.com/t/does-rails-have-a-mode-which-ensures-associations-work-at-the-object-level-i-e-prior-to-any-db-sav/157764)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 3\
**Last updated:** [January 15, 2009, 12:35pm UTC](https://www.ruby-forum.com/t/does-rails-have-a-mode-which-ensures-associations-work-at-the-object-level-i-e-prior-to-any-db-sav/157764 "2009-01-15T12:35:52Z")

</div>

Hi, I’m noted with Rails that if one assigns one object (say Book “b”) to another object (say Chapter “c”) that the call “b.chapters” doesn’t work. Question: Is there a way to ensures associations work both ways at t…

---

## [Which CI solution and testing framework?](https://www.ruby-forum.com/t/which-ci-solution-and-testing-framework/157791)

<div class="topic-metadata">

**Author:** [@Isak](https://www.ruby-forum.com/u/Isak)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 11:51am UTC](https://www.ruby-forum.com/t/which-ci-solution-and-testing-framework/157791 "2009-01-15T11:51:04Z")

</div>

I’m looking for a continuous integration solution for my Rails projects. Need something that works with Subversion, assume that’s most. Some projects use RSpec, others Test::Unit. We’ve also been considering Shoulda.…

---

## [Mongrel and content type](https://www.ruby-forum.com/t/mongrel-and-content-type/157790)

<div class="topic-metadata">

**Author:** [@AnAnAn](https://www.ruby-forum.com/u/AnAnAn)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 11:34am UTC](https://www.ruby-forum.com/t/mongrel-and-content-type/157790 "2009-01-15T11:34:01Z")

</div>

I set up an apache2 + mongrel clusters. Everything is working fine except that IE Explorer when I try to see a page of my site it tries to download it instead of showing it. Firefox and Safari are working fine, I have…

---

## [Restful\_authentication setup problem](https://www.ruby-forum.com/t/restful-authentication-setup-problem/157788)

<div class="topic-metadata">

**Author:** [@fakdora](https://www.ruby-forum.com/u/fakdora)\
**Replies:** 1\
**Last updated:** [January 15, 2009, 11:31am UTC](https://www.ruby-forum.com/t/restful-authentication-setup-problem/157788 "2009-01-15T11:31:40Z")

</div>

Hi. I initially set up restful\_authentication without --include- activation. and now, I need email activation system and I was wondering if there is any way to add it. Thank you.

---

## [Restful\_authentication email activation](https://www.ruby-forum.com/t/restful-authentication-email-activation/157787)

<div class="topic-metadata">

**Author:** [@fakdora](https://www.ruby-forum.com/u/fakdora)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 11:18am UTC](https://www.ruby-forum.com/t/restful-authentication-email-activation/157787 "2009-01-15T11:18:09Z")

</div>

Hi, I’m just wondering if there is any way to change my restful\_authentication setup to enable email activation. I did not type in “–include-activation” when I first installed restful\_authentication plugin and wonder…

---

## [Problems w/ User having many friends](https://www.ruby-forum.com/t/problems-w-user-having-many-friends/157771)

<div class="topic-metadata">

**Author:** [@clemrock](https://www.ruby-forum.com/u/clemrock)\
**Replies:** 1\
**Last updated:** [January 15, 2009, 11:18am UTC](https://www.ruby-forum.com/t/problems-w-user-having-many-friends/157771 "2009-01-15T11:18:09Z")

</div>

This seems so easy but I keep hitting a brick wall on this. I have this modeling: class User \< ActiveRecord::Base has\_many :friendships has\_many :friends, :through =\> :friendships #... end class Friendship \< …

---

## [ActiveRecord::Base in environment.rb](https://www.ruby-forum.com/t/activerecord-base-in-environment-rb/157784)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [January 15, 2009, 10:28am UTC](https://www.ruby-forum.com/t/activerecord-base-in-environment-rb/157784 "2009-01-15T10:28:08Z")

</div>

have the following code in environment.rb class ActiveRecord::Base extend Searchable end in the lib folder there is searchable.rb and inside that there is module Searchable My question is why do we define such …

---

## [Unique URLs for authentication](https://www.ruby-forum.com/t/unique-urls-for-authentication/157776)

<div class="topic-metadata">

**Author:** [@dazonic](https://www.ruby-forum.com/u/dazonic)\
**Replies:** 3\
**Last updated:** [January 15, 2009, 10:11am UTC](https://www.ruby-forum.com/t/unique-urls-for-authentication/157776 "2009-01-15T10:11:23Z")

</div>

I’ve set up a route like this map.connect ‘confirm/:id/:full\_name/’, :controller =\> “users”, :action =\> “confirm” and I’m wondering what is the best way to verify in the confirm method. full\_name created in the model…

---

## [About RMagic](https://www.ruby-forum.com/t/about-rmagic/157779)

<div class="topic-metadata">

**Author:** [@nilez](https://www.ruby-forum.com/u/nilez)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 9:23am UTC](https://www.ruby-forum.com/t/about-rmagic/157779 "2009-01-15T09:23:09Z")

</div>

hi i am using attachment\_fu with Rmagic(RMagick-2.7.1-ImageMagick-6.4.5-3-Q8) i am thumbnailing image.code is as follows it is thumbniling onlt .gif image not other .Is there any problem with RMagic version. what el…

---

## [Validation spanning multiple models(tables) - how can this be achieved in Rails?](https://www.ruby-forum.com/t/validation-spanning-multiple-models-tables-how-can-this-be-achieved-in-rails/157546)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 11\
**Last updated:** [January 15, 2009, 9:19am UTC](https://www.ruby-forum.com/t/validation-spanning-multiple-models-tables-how-can-this-be-achieved-in-rails/157546 "2009-01-15T09:19:15Z")

</div>

Hi, QUESTION: How can establishing validation that spans multiple models be achieved in Rails? That is in such a fashion that it is not possible for a developer to break the validation via using any of the public mo…

---

## [Backgroundrb problem uninitialized constant BackgrounDRb::Me](https://www.ruby-forum.com/t/backgroundrb-problem-uninitialized-constant-backgroundrb-me/157476)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 11\
**Last updated:** [January 15, 2009, 9:13am UTC](https://www.ruby-forum.com/t/backgroundrb-problem-uninitialized-constant-backgroundrb-me/157476 "2009-01-15T09:13:44Z")

</div>

I installed backgroundrb from http://svn.devjavu.com/backgroundrb/trunk and there is no problem to start backgroundrb server. but when view the page which controller requires the worker, I will get the error “uninitia…

---

## [Some hyperlink dont work in Safari](https://www.ruby-forum.com/t/some-hyperlink-dont-work-in-safari/157745)

<div class="topic-metadata">

**Author:** [@flashit](https://www.ruby-forum.com/u/flashit)\
**Replies:** 1\
**Last updated:** [January 15, 2009, 9:08am UTC](https://www.ruby-forum.com/t/some-hyperlink-dont-work-in-safari/157745 "2009-01-15T09:08:05Z")

</div>

I am working on a consumer review web site http://www.consupo.com. For some reason, the links on this page http://www.consupo.com/cases/cases\_by\_category/restaurants/D doesn’t work on safari. It works fine on IE and…

---

## [Is there an "before\_commit" hook somewhere in Rails?](https://www.ruby-forum.com/t/is-there-an-before-commit-hook-somewhere-in-rails/157775)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 8:27am UTC](https://www.ruby-forum.com/t/is-there-an-before-commit-hook-somewhere-in-rails/157775 "2009-01-15T08:27:40Z")

</div>

Hi, Is there an “before\_commit” hook somewhere in Rails? (i.e. after all the saves & after\_save callbacks occur, but just before the transaction commits?) – Greg http://blog.gregnet.org/

---

## [Best practices for shared methods in AR models](https://www.ruby-forum.com/t/best-practices-for-shared-methods-in-ar-models/157735)

<div class="topic-metadata">

**Author:** [@joshua-asem](https://www.ruby-forum.com/u/joshua-asem)\
**Replies:** 4\
**Last updated:** [January 15, 2009, 5:24am UTC](https://www.ruby-forum.com/t/best-practices-for-shared-methods-in-ar-models/157735 "2009-01-15T05:24:36Z")

</div>

I’m curious to get some feedback from the smart people around here. I’ve got a method called “to\_permalink” that creates a URL friendly permalink from the name, or title attribute of about 4 AR models. For those same …

---

## [Collection\_select not selecting default value](https://www.ruby-forum.com/t/collection-select-not-selecting-default-value/157762)

<div class="topic-metadata">

**Author:** [@gustav](https://www.ruby-forum.com/u/gustav)\
**Replies:** 2\
**Last updated:** [January 15, 2009, 5:18am UTC](https://www.ruby-forum.com/t/collection-select-not-selecting-default-value/157762 "2009-01-15T05:18:42Z")

</div>

Hi, I’m trying to create a dropdown using collection\_select. However, I cant seem to get it to select the right option by default. In my controller I have a setup like this: @content = Content.new @content.selection…

---

## [Ruby array detect non linear data](https://www.ruby-forum.com/t/ruby-array-detect-non-linear-data/157763)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [January 15, 2009, 4:43am UTC](https://www.ruby-forum.com/t/ruby-array-detect-non-linear-data/157763 "2009-01-15T04:43:38Z")

</div>

Is there a way to detect in an array of say 1…500, if some of the numbers may be missing from the set.

---

## [Development Web Server Producing mal-formed html](https://www.ruby-forum.com/t/development-web-server-producing-mal-formed-html/157767)

<div class="topic-metadata">

**Author:** [@tbobker](https://www.ruby-forum.com/u/tbobker)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 3:30am UTC](https://www.ruby-forum.com/t/development-web-server-producing-mal-formed-html/157767 "2009-01-15T03:30:52Z")

</div>

I am struggling with differing html rendered by my development servers on my Ubuntu 8.10 development environment. I have tried the following case study with both mongrel and webrick, so I don’t think the problem is wi…

---

## [Mongrel TimeoutError](https://www.ruby-forum.com/t/mongrel-timeouterror/157759)

<div class="topic-metadata">

**Author:** [@harpoon45](https://www.ruby-forum.com/u/harpoon45)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 2:06am UTC](https://www.ruby-forum.com/t/mongrel-timeouterror/157759 "2009-01-15T02:06:02Z")

</div>

My mongrel cluster seems to have some weird issues. Anyone here with some insight into whats going on? Tue Jan 13 09:36:34 -0800 2009: Reaping 7 threads for slow workers because of ‘shutdown’ Thread #\<Thread:0x2aaaab…

---

## [Change color of links](https://www.ruby-forum.com/t/change-color-of-links/157559)

<div class="topic-metadata">

**Author:** [@mpathare](https://www.ruby-forum.com/u/mpathare)\
**Replies:** 5\
**Last updated:** [January 15, 2009, 1:25am UTC](https://www.ruby-forum.com/t/change-color-of-links/157559 "2009-01-15T01:25:04Z")

</div>

I have the following code in one of my views "right", :url =\>{ :action =\> :show\_stats, :ladder\_id =\> l.id }) %\> I want to change the default color of the link from blue to white. I have tried using html\_options like…

---

## [Do\_sqlite3 - how to acquire & install latest version?](https://www.ruby-forum.com/t/do-sqlite3-how-to-acquire-install-latest-version/157620)

<div class="topic-metadata">

**Author:** [@technology](https://www.ruby-forum.com/u/technology)\
**Replies:** 7\
**Last updated:** [January 15, 2009, 12:48am UTC](https://www.ruby-forum.com/t/do-sqlite3-how-to-acquire-install-latest-version/157620 "2009-01-15T00:48:23Z")

</div>

Apparently the reason I can’t use sqlite3 with Mac OS X is a bad version of do\_sqlite3. Could someone please spell out exactly what a newbie needs to do to grab & reinstall the latest version? Thanks, jim

---

## [\[ADV\] Rails Training in San Antonio: earn $100 when you tell a friend](https://www.ruby-forum.com/t/adv-rails-training-in-san-antonio-earn-100-when-you-tell-a-friend/157751)

<div class="topic-metadata">

**Author:** [@brandonpt](https://www.ruby-forum.com/u/brandonpt)\
**Replies:** 0\
**Last updated:** [January 14, 2009, 11:53pm UTC](https://www.ruby-forum.com/t/adv-rails-training-in-san-antonio-earn-100-when-you-tell-a-friend/157751 "2009-01-14T23:53:56Z")

</div>

We still have spots available for our Rails class next week in San Antonio. Refer a friend to the class and we’ll send you $100. http://training.collectiveidea.com/blog/8-refer-a-friend-earn-100 – Brandon Training b…

---

## [How to get ruby 1.9 working](https://www.ruby-forum.com/t/how-to-get-ruby-1-9-working/157742)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [January 14, 2009, 11:30pm UTC](https://www.ruby-forum.com/t/how-to-get-ruby-1-9-working/157742 "2009-01-14T23:30:24Z")

</div>

I tried renaming my ruby directory where 1.9.1 is but I cannot seem to do a “gem install rails” When I do i get a windows prompt saying a dll is missing. Is there another way to get 1.9.1 working?

---

## [MissingSourceFile (no such file to load -- mysql)](https://www.ruby-forum.com/t/missingsourcefile-no-such-file-to-load-mysql/157743)

<div class="topic-metadata">

**Author:** [@pjpatten](https://www.ruby-forum.com/u/pjpatten)\
**Replies:** 1\
**Last updated:** [January 14, 2009, 11:13pm UTC](https://www.ruby-forum.com/t/missingsourcefile-no-such-file-to-load-mysql/157743 "2009-01-14T23:13:22Z")

</div>

I’m having problem trying to get the app running properly due to it not finding MySQL.It seems that the app can’t find mysql. This error shows up on my production log: MissingSourceFile (no such file to load – mysql)

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

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