# Rails

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

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

---

## [Can load gem with irb but application fails](https://www.ruby-forum.com/t/can-load-gem-with-irb-but-application-fails/151603)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 3\
**Last updated:** [October 23, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/can-load-gem-with-irb-but-application-fails/151603 "2008-10-23T22:01:22Z")

</div>

Hi- I’m trying to load the blackbook gem. I had it working at one point and don’t recall how I broke it. Anyway, right now, I can load it in irb and I get ‘true’ (success). The app dies, however and I get this in …

---

## [Sending a response back to a PHP site from rails application](https://www.ruby-forum.com/t/sending-a-response-back-to-a-php-site-from-rails-application/151609)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [October 23, 2008, 9:01pm UTC](https://www.ruby-forum.com/t/sending-a-response-back-to-a-php-site-from-rails-application/151609 "2008-10-23T21:01:46Z")

</div>

Hi I have an existing php application running commercially…Now I have a new rails application…So I have three fields like user\_name ,password and company in the php page .Which when submitting connecting to my rails …

---

## [How to pass parameters to after\_update callback?](https://www.ruby-forum.com/t/how-to-pass-parameters-to-after-update-callback/151613)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 5\
**Last updated:** [October 23, 2008, 5:45pm UTC](https://www.ruby-forum.com/t/how-to-pass-parameters-to-after-update-callback/151613 "2008-10-23T17:45:39Z")

</div>

Hi, I got i.e. Ticket and TicketChange models and would like to create TicketChange object whenever Ticket object is updated. Currently I’m creating new TicketChange in Ticket#after\_update callback and simply seriali…

---

## [Sorting in different ways (with the same index action)](https://www.ruby-forum.com/t/sorting-in-different-ways-with-the-same-index-action/151346)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 11\
**Last updated:** [October 23, 2008, 5:38pm UTC](https://www.ruby-forum.com/t/sorting-in-different-ways-with-the-same-index-action/151346 "2008-10-23T17:38:37Z")

</div>

I’ve got a puzzle question. I’ve got a load of news\_items that I find and sort by date in my controller and then display in the view. Works just fine. I do this in the index action. It appears as tabular information,…

---

## [How to use an EXISTing DB-Schema in my Rails APP..?](https://www.ruby-forum.com/t/how-to-use-an-existing-db-schema-in-my-rails-app/151627)

<div class="topic-metadata">

**Author:** [@deepFritz](https://www.ruby-forum.com/u/deepFritz)\
**Replies:** 1\
**Last updated:** [October 23, 2008, 5:33pm UTC](https://www.ruby-forum.com/t/how-to-use-an-existing-db-schema-in-my-rails-app/151627 "2008-10-23T17:33:21Z")

</div>

Hi friends, We have JUST started with Ruby/Rails… and we are very much impressed with the scaffold generator which gets us kick-started by creating even the DB-Schema Migration scripts fer us, which is DB agnostic…!! …

---

## [Subtemplating with ERB](https://www.ruby-forum.com/t/subtemplating-with-erb/121510)

<div class="topic-metadata">

**Author:** [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Replies:** 9\
**Last updated:** [October 23, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/subtemplating-with-erb/121510 "2008-10-23T17:30:24Z")

</div>

Hey! I’m using Ruby withour Rails, but i make use of the ERB-template functionality. So i think is a good place to post this one here. I want to do subtemplating, is that possible? E.g. I have a index.rhtml file. In…

---

## [3 different areas, 1 yield?!](https://www.ruby-forum.com/t/3-different-areas-1-yield/151538)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 5\
**Last updated:** [October 23, 2008, 5:06pm UTC](https://www.ruby-forum.com/t/3-different-areas-1-yield/151538 "2008-10-23T17:06:26Z")

</div>

Hello, I’m having a problem which is following: \[STUFF FROM THE DB\] \[STUFF FROM THE DB\] \<%= yield %\> \[STUFF FROM THE DB\] How can I fill the \[STUFF FROM THE DB\] div’s when I only have one single yield? I can’t think …

---

## [Problem installing Rails 2.1.1 under Suse LINUX - Help needed!](https://www.ruby-forum.com/t/problem-installing-rails-2-1-1-under-suse-linux-help-needed/151631)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [October 23, 2008, 4:40pm UTC](https://www.ruby-forum.com/t/problem-installing-rails-2-1-1-under-suse-linux-help-needed/151631 "2008-10-23T16:40:05Z")

</div>

Team, While installing Rails 2.1.1 unde Suse Linux, I came across an error msg telling me that I need this library, libopenssl-ruby. I am running LINUX Suse: 2.6.16.21-0.8-smp. ruby -v ruby 1.8.6 (2008-08-08 patchle…

---

## [Autocompleter in textarea on character event](https://www.ruby-forum.com/t/autocompleter-in-textarea-on-character-event/151632)

<div class="topic-metadata">

**Author:** [@shariefsk](https://www.ruby-forum.com/u/shariefsk)\
**Replies:** 0\
**Last updated:** [October 23, 2008, 4:03pm UTC](https://www.ruby-forum.com/t/autocompleter-in-textarea-on-character-event/151632 "2008-10-23T16:03:03Z")

</div>

Hi, I have a usecase of calling an Autocompleter.Local when a special character is typed in the textarea. The autocompleter will suggest a drop down matching the characters that user typed after the special character…

---

## [Mass emailing](https://www.ruby-forum.com/t/mass-emailing/151628)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 0\
**Last updated:** [October 23, 2008, 4:03pm UTC](https://www.ruby-forum.com/t/mass-emailing/151628 "2008-10-23T16:03:03Z")

</div>

Hello all, I have searched this group and the internet for examples of mass emailing in ror apps. I haven’t found a lot. http://www.myowndb.com/blog/?p=20 I am wondering if anyone could tell me how they made there m…

---

## [A has\_many :bs; what is the Rails idiom to save @a and @.bs in one transaction?](https://www.ruby-forum.com/t/a-has-many-bs-what-is-the-rails-idiom-to-save-a-and-bs-in-one-transaction/151629)

<div class="topic-metadata">

**Author:** [@dewie](https://www.ruby-forum.com/u/dewie)\
**Replies:** 0\
**Last updated:** [October 23, 2008, 4:02pm UTC](https://www.ruby-forum.com/t/a-has-many-bs-what-is-the-rails-idiom-to-save-a-and-bs-in-one-transaction/151629 "2008-10-23T16:02:27Z")

</div>

Suppose I have two models: class A \< ActiveRecord::Base has\_many :bs end class B \< ActiveRecord::Base belongs\_to :a end Now, if I say in a controller b1 = @a.build(params\[:b\]) I can build a new B associated to a…

---

## [Problems installing Gems](https://www.ruby-forum.com/t/problems-installing-gems/151624)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 0\
**Last updated:** [October 23, 2008, 3:52pm UTC](https://www.ruby-forum.com/t/problems-installing-gems/151624 "2008-10-23T15:52:02Z")

</div>

Hi, When i try to update or install the gems, nothing happens. It look like this i my console: Updating installed gems Bulk updating Gem source index for: http://gems.rubyforge.org/ Killed Someone suggestions? Grt…

---

## [Actionmailer doesnot send mail to the same domain user](https://www.ruby-forum.com/t/actionmailer-doesnot-send-mail-to-the-same-domain-user/151620)

<div class="topic-metadata">

**Author:** [@ami](https://www.ruby-forum.com/u/ami)\
**Replies:** 0\
**Last updated:** [October 23, 2008, 3:26pm UTC](https://www.ruby-forum.com/t/actionmailer-doesnot-send-mail-to-the-same-domain-user/151620 "2008-10-23T15:26:36Z")

</div>

hi i am using the restful-authentication plugin and I can send a reset/ activation emails to any email but the main domain i’m on. i am using :smtp in my mailer intiialzer and my gmail account info ( i thought the pr…

---

## [Using an associated model in an attribute setter](https://www.ruby-forum.com/t/using-an-associated-model-in-an-attribute-setter/151497)

<div class="topic-metadata">

**Author:** [@Rainer\_Frey](https://www.ruby-forum.com/u/Rainer_Frey)\
**Replies:** 2\
**Last updated:** [October 23, 2008, 3:24pm UTC](https://www.ruby-forum.com/t/using-an-associated-model-in-an-attribute-setter/151497 "2008-10-23T15:24:12Z")

</div>

Hi, I want to use an associated model in an overwritten attribute write method. But this fails on create, as the association is not yet initialized. Code is: class Forward \< ActiveRecord::Base belongs\_to :domain va…

---

## [Redirect bug with restful-authetication plugin](https://www.ruby-forum.com/t/redirect-bug-with-restful-authetication-plugin/197222)

<div class="topic-metadata">

**Author:** [@ami](https://www.ruby-forum.com/u/ami)\
**Replies:** 0\
**Last updated:** [October 23, 2008, 3:14pm UTC](https://www.ruby-forum.com/t/redirect-bug-with-restful-authetication-plugin/197222 "2008-10-23T15:14:12Z")

</div>

Hi i’m expriencing a weird bug with the restful authentication plugin: when a user is logged-in and closed the browser then reopen it the page will loop with a redirect my only temp solution is to clear the cookies a…

---

## [Redirect bug with restful-authetication](https://www.ruby-forum.com/t/redirect-bug-with-restful-authetication/196828)

<div class="topic-metadata">

**Author:** [@ami](https://www.ruby-forum.com/u/ami)\
**Replies:** 0\
**Last updated:** [October 23, 2008, 3:13pm UTC](https://www.ruby-forum.com/t/redirect-bug-with-restful-authetication/196828 "2008-10-23T15:13:01Z")

</div>

Hi i’m expriencing a weird bug with the restful authentication plugin: when a user is logged-in and closed the browser then reopen it the page will loop with a redirect my only temp solution is to clear the cookies a…

---

## [Redirect bug with restful-authetication](https://www.ruby-forum.com/t/redirect-bug-with-restful-authetication/151617)

<div class="topic-metadata">

**Author:** [@ami](https://www.ruby-forum.com/u/ami)\
**Replies:** 0\
**Last updated:** [October 23, 2008, 3:07pm UTC](https://www.ruby-forum.com/t/redirect-bug-with-restful-authetication/151617 "2008-10-23T15:07:42Z")

</div>

Hi i’m expriencing a weird bug with the restful authentication plugin: when a user is logged-in and closed the browser then reopen it the page will loop with a redirect my only temp solution is to clear the cookies a…

---

## [SOAP4R connection to a secured link(https)](https://www.ruby-forum.com/t/soap4r-connection-to-a-secured-link-https/151146)

<div class="topic-metadata">

**Author:** [@g\_pallavi1](https://www.ruby-forum.com/u/g_pallavi1)\
**Replies:** 4\
**Last updated:** [October 23, 2008, 3:01pm UTC](https://www.ruby-forum.com/t/soap4r-connection-to-a-secured-link-https/151146 "2008-10-23T15:01:41Z")

</div>

Hi I have been trying to connect to a secured link(https) which is pointing to a wsdl file. I am using SOAP4R for this. But it is giving me an exception which says " hostname was not match with the server certificate…

---

## [Creating Unique Votes](https://www.ruby-forum.com/t/creating-unique-votes/151525)

<div class="topic-metadata">

**Author:** [@Leximo](https://www.ruby-forum.com/u/Leximo)\
**Replies:** 6\
**Last updated:** [October 23, 2008, 2:46pm UTC](https://www.ruby-forum.com/t/creating-unique-votes/151525 "2008-10-23T14:46:28Z")

</div>

I have a rails app that uses voting. Right now I have it set up so that you can vote on a word, but it doesn’t limit the number of votes. So someone can vote on the same word more than once. How do I make it so that y…

---

## [How to easily cache single AR object?](https://www.ruby-forum.com/t/how-to-easily-cache-single-ar-object/151561)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 2\
**Last updated:** [October 23, 2008, 2:28pm UTC](https://www.ruby-forum.com/t/how-to-easily-cache-single-ar-object/151561 "2008-10-23T14:28:13Z")

</div>

Hi, I got a mailer that uses dynamic stylesheets, so when creating an email I’m doing Style.find\_by\_name(“newsletter”). The problem is that it’s fetching the same Style record for each email it creates and when sendi…

---

## [Rails application working, rake tasks not](https://www.ruby-forum.com/t/rails-application-working-rake-tasks-not/151595)

<div class="topic-metadata">

**Author:** [@mrdamien](https://www.ruby-forum.com/u/mrdamien)\
**Replies:** 1\
**Last updated:** [October 23, 2008, 1:13pm UTC](https://www.ruby-forum.com/t/rails-application-working-rake-tasks-not/151595 "2008-10-23T13:13:18Z")

</div>

Hi, I have some problems with rails and the oracle\_enhanced adapter. My rails application is working but not my rake task. It doesn’t find the oracle\_enhanced adapter. Please install the oracle\_enhanced adapter: gem …

---

## [Contacts gem and mailing solution to handle email bounces](https://www.ruby-forum.com/t/contacts-gem-and-mailing-solution-to-handle-email-bounces/151598)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 0\
**Last updated:** [October 23, 2008, 11:25am UTC](https://www.ruby-forum.com/t/contacts-gem-and-mailing-solution-to-handle-email-bounces/151598 "2008-10-23T11:25:11Z")

</div>

Hi, My app has a feature to import contacts from gmail,yahoo and hotmail. I am using CONTACTS gem to achieve that. The functionality is working fine, I can import many contacts in bulk. I also have a “invite your co…

---

## [Irb command window](https://www.ruby-forum.com/t/irb-command-window/151593)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 1\
**Last updated:** [October 23, 2008, 10:32am UTC](https://www.ruby-forum.com/t/irb-command-window/151593 "2008-10-23T10:32:04Z")

</div>

how to exit from the rails irb command line? ctr+c not work for this.

---

## [Catch-all routing](https://www.ruby-forum.com/t/catch-all-routing/151566)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 3\
**Last updated:** [October 23, 2008, 7:45am UTC](https://www.ruby-forum.com/t/catch-all-routing/151566 "2008-10-23T07:45:40Z")

</div>

I know this isn’t all that Rails friendly but is it possible to do catch-all routing so that some value can be passed in as if it were a controller for example http://localhost:3000/ford/thunderbird http://localhost:…

---

## [AttachmentFu Reprocess all assets](https://www.ruby-forum.com/t/attachmentfu-reprocess-all-assets/151570)

<div class="topic-metadata">

**Author:** [@robby247365](https://www.ruby-forum.com/u/robby247365)\
**Replies:** 2\
**Last updated:** [October 23, 2008, 6:25am UTC](https://www.ruby-forum.com/t/attachmentfu-reprocess-all-assets/151570 "2008-10-23T06:25:00Z")

</div>

Hey all, I am about to embark on reprocessing approx 100k user photos with new dimensions that a site redesign has called for. We used AttachmentFu and have stored the originals in case this ever came up. I don’t see …

---

## [Sorting and presentation problem](https://www.ruby-forum.com/t/sorting-and-presentation-problem/151571)

<div class="topic-metadata">

**Author:** [@MrLipid](https://www.ruby-forum.com/u/MrLipid)\
**Replies:** 0\
**Last updated:** [October 23, 2008, 3:48am UTC](https://www.ruby-forum.com/t/sorting-and-presentation-problem/151571 "2008-10-23T03:48:50Z")

</div>

Here’s a problem I am facing. I’ve got two databases. They share one thing in common. I would like what they share to generate a list of clickable links. Now, I don’t what a list of what they share. The list of clicka…

---

## [\[ANN\] El Dorado - an open-source forum in Rails](https://www.ruby-forum.com/t/ann-el-dorado-an-open-source-forum-in-rails/111268)

<div class="topic-metadata">

**Author:** [@trevorturk](https://www.ruby-forum.com/u/trevorturk)\
**Replies:** 16\
**Last updated:** [October 23, 2008, 3:31am UTC](https://www.ruby-forum.com/t/ann-el-dorado-an-open-source-forum-in-rails/111268 "2008-10-23T03:31:12Z")

</div>

I’m pleased to report that I got my pet project - El Dorado - finished up enough (when is anything ever truly finished?) to launch last weekend. So far, things are looking pretty good. I successfully imported an exist…

---

## [Can't Activate Capistrano Error](https://www.ruby-forum.com/t/cant-activate-capistrano-error/151560)

<div class="topic-metadata">

**Author:** [@jpfeifer](https://www.ruby-forum.com/u/jpfeifer)\
**Replies:** 1\
**Last updated:** [October 23, 2008, 3:23am UTC](https://www.ruby-forum.com/t/cant-activate-capistrano-error/151560 "2008-10-23T03:23:36Z")

</div>

Greetings, I’m getting an error when trying to do a “cap staging deploy” from the command line: $ cap staging deploy /Library/Ruby/Site/1.8/rubygems.rb:147:in activate': can't activate capistrano (= 2.4.3, runtime), …

---

## [Rails app failing because I upgraded Rails](https://www.ruby-forum.com/t/rails-app-failing-because-i-upgraded-rails/151557)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 7\
**Last updated:** [October 23, 2008, 1:01am UTC](https://www.ruby-forum.com/t/rails-app-failing-because-i-upgraded-rails/151557 "2008-10-23T01:01:32Z")

</div>

Hi, Some time ago I ran “ruby script/server” and WeBrick server booted. Today, I ran the same command in the same directory (unchanged, I believe) and got: ======================== ./script/…/config/boot.rb:28: unde…

---

## [Cleaner way to build a "one or the other" validation?](https://www.ruby-forum.com/t/cleaner-way-to-build-a-one-or-the-other-validation/151495)

<div class="topic-metadata">

**Author:** [@mrkohrea](https://www.ruby-forum.com/u/mrkohrea)\
**Replies:** 5\
**Last updated:** [October 22, 2008, 11:43pm UTC](https://www.ruby-forum.com/t/cleaner-way-to-build-a-one-or-the-other-validation/151495 "2008-10-22T23:43:30Z")

</div>

I have an object called dealer. Dealer has two fields dealer\_number and sub\_dealer\_number. It must have 1 OR the other… but not both. To validate this I have: class Dealer \< ActiveRecord::Base validate :dealer\_id? …

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

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