# Rails

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

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

---

## [Named scope lambda string substitution problem](https://www.ruby-forum.com/t/named-scope-lambda-string-substitution-problem/152676)

<div class="topic-metadata">

**Author:** [@jdwy](https://www.ruby-forum.com/u/jdwy)\
**Replies:** 0\
**Last updated:** [November 6, 2008, 10:40am UTC](https://www.ruby-forum.com/t/named-scope-lambda-string-substitution-problem/152676 "2008-11-06T10:40:41Z")

</div>

I have a complex named scope like the following. named\_scope :foo, lambda {|foo, bar| foo.each do |d| #foo = “this line doesn’t work #{s}” baz = "something like this works " + s end bar.each do |b| end { :conditi…

---

## [Restore password without session initialized](https://www.ruby-forum.com/t/restore-password-without-session-initialized/152675)

<div class="topic-metadata">

**Author:** [@admon](https://www.ruby-forum.com/u/admon)\
**Replies:** 0\
**Last updated:** [November 6, 2008, 10:27am UTC](https://www.ruby-forum.com/t/restore-password-without-session-initialized/152675 "2008-11-06T10:27:59Z")

</div>

Hi, Y was triying to implement in my application the fact of remenber or generate a new password. When you try to loggin in there, if the password is no correct, the application shows the link “Remenber password”, ha…

---

## [Ajax request and html response](https://www.ruby-forum.com/t/ajax-request-and-html-response/152592)

<div class="topic-metadata">

**Author:** [@znz](https://www.ruby-forum.com/u/znz)\
**Replies:** 1\
**Last updated:** [November 6, 2008, 9:06am UTC](https://www.ruby-forum.com/t/ajax-request-and-html-response/152592 "2008-11-06T09:06:44Z")

</div>

Hello, I wrote some action returns html response rendered with layout. It is default rendering behavior. When ajax request and rails 2.0.x, it returns html response rendered with layout. But rails 2.1.x, it returns …

---

## [Define relative url](https://www.ruby-forum.com/t/define-relative-url/152611)

<div class="topic-metadata">

**Author:** [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Replies:** 2\
**Last updated:** [November 6, 2008, 8:35am UTC](https://www.ruby-forum.com/t/define-relative-url/152611 "2008-11-06T08:35:14Z")

</div>

Hi All Because my app is running behind Apache my RoR helpers generate an incorrect url For example: http://my.website.com/xyz/users becames: http://my.webiste.com/users So I tried to set the relative path to ‘xyz…

---

## [Which Railshoster for a productive application in US?](https://www.ruby-forum.com/t/which-railshoster-for-a-productive-application-in-us/152653)

<div class="topic-metadata">

**Author:** [@mcrj45](https://www.ruby-forum.com/u/mcrj45)\
**Replies:** 1\
**Last updated:** [November 6, 2008, 2:18am UTC](https://www.ruby-forum.com/t/which-railshoster-for-a-productive-application-in-us/152653 "2008-11-06T02:18:30Z")

</div>

Dear Receiver and Forummembers ;), I’m looking for a hoster in the US which provides the best enviroment for a Ruby on Rails application. This should include Managed Server Support by the Linux Administration (I have …

---

## [How can I deploy gems in vendor/gems across multiple OS's](https://www.ruby-forum.com/t/how-can-i-deploy-gems-in-vendor-gems-across-multiple-oss/152636)

<div class="topic-metadata">

**Author:** [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Replies:** 1\
**Last updated:** [November 6, 2008, 1:45am UTC](https://www.ruby-forum.com/t/how-can-i-deploy-gems-in-vendor-gems-across-multiple-oss/152636 "2008-11-06T01:45:10Z")

</div>

Hi. Does anyone know about how to deal with deploying applications across multiple OS’s and how to deal with gems that are saved in vendor/gems? I asked an earlier questions about how to make sure that gems are avail…

---

## [Removed edge rails but cannot find installed rails](https://www.ruby-forum.com/t/removed-edge-rails-but-cannot-find-installed-rails/152650)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 1\
**Last updated:** [November 6, 2008, 1:22am UTC](https://www.ruby-forum.com/t/removed-edge-rails-but-cannot-find-installed-rails/152650 "2008-11-06T01:22:39Z")

</div>

I removed edge-rails from a project, git rm, committed and pushed the revised project to the shared repository, and then git pulled it onto my Windows XPpro laptop. Both the original host and my laptop have Rails-2.2.…

---

## [RMagick Windows Ruby 1.8.7. Do I need to compile?](https://www.ruby-forum.com/t/rmagick-windows-ruby-1-8-7-do-i-need-to-compile/152527)

<div class="topic-metadata">

**Author:** [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Replies:** 1\
**Last updated:** [November 6, 2008, 1:15am UTC](https://www.ruby-forum.com/t/rmagick-windows-ruby-1-8-7-do-i-need-to-compile/152527 "2008-11-06T01:15:30Z")

</div>

The current version of RMagick 2.7.1 is being served as a pre-built gem for Windows for Ruby 1.8.6 I happen to run Ruby 1.8.7 (pl-0) on Windows and was wondering if there is a way I can get RMagick to run in combinati…

---

## [Ensuring all HTML tags close in text fields](https://www.ruby-forum.com/t/ensuring-all-html-tags-close-in-text-fields/152641)

<div class="topic-metadata">

**Author:** [@galeal](https://www.ruby-forum.com/u/galeal)\
**Replies:** 1\
**Last updated:** [November 5, 2008, 11:38pm UTC](https://www.ruby-forum.com/t/ensuring-all-html-tags-close-in-text-fields/152641 "2008-11-05T23:38:17Z")

</div>

Does anyone know of a way/method/plugin for ensuring HTML tags all close and/or close them automatically when the data is pulled or pushed into the database???

---

## [Cant serve video via rails](https://www.ruby-forum.com/t/cant-serve-video-via-rails/152622)

<div class="topic-metadata">

**Author:** [@fox](https://www.ruby-forum.com/u/fox)\
**Replies:** 1\
**Last updated:** [November 5, 2008, 10:47pm UTC](https://www.ruby-forum.com/t/cant-serve-video-via-rails/152622 "2008-11-05T22:47:18Z")

</div>

Hi all, I have an m4v file which I’m trying to view on my iPhone via a rails app. If i place the file in my apache root or in /public and hit the url, it plays back fine, but no matter what I try with rails, the iPho…

---

## [Setting "From" in Mailer model](https://www.ruby-forum.com/t/setting-from-in-mailer-model/152455)

<div class="topic-metadata">

**Author:** [@galeal](https://www.ruby-forum.com/u/galeal)\
**Replies:** 4\
**Last updated:** [November 5, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/setting-from-in-mailer-model/152455 "2008-11-05T22:29:33Z")

</div>

At the moment mail sent from my app comes from “mailer” when received by gmail. Is it possible (i.e. some particular format) to make this more meaningful? What I have at the moment one of my typical mailer methods: d…

---

## [Muliply images \> wich plugin?](https://www.ruby-forum.com/t/muliply-images-wich-plugin/152604)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 2\
**Last updated:** [November 5, 2008, 10:17pm UTC](https://www.ruby-forum.com/t/muliply-images-wich-plugin/152604 "2008-11-05T22:17:03Z")

</div>

Hi, I have one destionation such as Barcelona and i want to store and show multiply pictures of Barcelona. Wich upload plugin is the best for this purpose? Grtz…remco

---

## [AJAX - REST & nested resources](https://www.ruby-forum.com/t/ajax-rest-nested-resources/152614)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 2\
**Last updated:** [November 5, 2008, 9:52pm UTC](https://www.ruby-forum.com/t/ajax-rest-nested-resources/152614 "2008-11-05T21:52:35Z")

</div>

I’ve created a set of resources, with scaffolds that all work. I then changed one resource to be nested inside another as a one to many relation. This required a little bit of work on the tests, the controllers and th…

---

## [Syntax to create a dependent relation?](https://www.ruby-forum.com/t/syntax-to-create-a-dependent-relation/152633)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [November 5, 2008, 9:40pm UTC](https://www.ruby-forum.com/t/syntax-to-create-a-dependent-relation/152633 "2008-11-05T21:40:01Z")

</div>

In my controller I have this: def new load\_entity @location = @entity.locations.build @site = @location.build\_site respond\_to do |format| format.html # new.html.erb format.xml { render :xml =\> @location } end e…

---

## [Functional testing with filters](https://www.ruby-forum.com/t/functional-testing-with-filters/152626)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 5, 2008, 9:00pm UTC](https://www.ruby-forum.com/t/functional-testing-with-filters/152626 "2008-11-05T21:00:50Z")

</div>

How do I do functional tests on controller methods protected by before filters, without using the soon-to-be-deprecated “follow\_redirect”? Say I have a method called index, filtered by check\_login. If the user is not…

---

## [Review: Ruby on Rails 2.2 EnvyCast](https://www.ruby-forum.com/t/review-ruby-on-rails-2-2-envycast/152632)

<div class="topic-metadata">

**Author:** [@kennethkalmer](https://www.ruby-forum.com/u/kennethkalmer)\
**Replies:** 0\
**Last updated:** [November 5, 2008, 8:40pm UTC](https://www.ruby-forum.com/t/review-ruby-on-rails-2-2-envycast/152632 "2008-11-05T20:40:46Z")

</div>

Hi everyone For those considering purchasing the Ruby on Rails 2.2 EnvyCast, I’ve published a review on my blog at http://www.opensourcery.co.za/2008/11/05/review-ruby-on-rails-22-envycast/ DISCLAIMER: I’m in no way …

---

## [Using Inner/Outer join to eager fetch belongs\_to associations](https://www.ruby-forum.com/t/using-inner-outer-join-to-eager-fetch-belongs-to-associations/152460)

<div class="topic-metadata">

**Author:** [@jhernandez](https://www.ruby-forum.com/u/jhernandez)\
**Replies:** 5\
**Last updated:** [November 5, 2008, 8:24pm UTC](https://www.ruby-forum.com/t/using-inner-outer-join-to-eager-fetch-belongs-to-associations/152460 "2008-11-05T20:24:20Z")

</div>

I was wondering if it was possible to have rails use an inner/outer join to eager fetch a belongs\_to association, rather than having it generate multiple SQL queries? In this case, here are my model objects with the a…

---

## [ActionMailer cancel send from one of deliver\_\* methods](https://www.ruby-forum.com/t/actionmailer-cancel-send-from-one-of-deliver-methods/107202)

<div class="topic-metadata">

**Author:** [@surge](https://www.ruby-forum.com/u/surge)\
**Replies:** 1\
**Last updated:** [November 5, 2008, 8:23pm UTC](https://www.ruby-forum.com/t/actionmailer-cancel-send-from-one-of-deliver-methods/107202 "2008-11-05T20:23:07Z")

</div>

Seems like executing a return in one of the deliver\_\* methods of ActionMailer doesn’t cancel the delivery. The template is still read right after the return method has been executed and because all variables in the te…

---

## [New application has been launched with rails](https://www.ruby-forum.com/t/new-application-has-been-launched-with-rails/152625)

<div class="topic-metadata">

**Author:** [@sadathiru](https://www.ruby-forum.com/u/sadathiru)\
**Replies:** 0\
**Last updated:** [November 5, 2008, 7:31pm UTC](https://www.ruby-forum.com/t/new-application-has-been-launched-with-rails/152625 "2008-11-05T19:31:24Z")

</div>

Hi friends check http://www.hamaramatrimony.com , a new matrimonial portal completely based on astrological marriage matchings is launched. Hit now and feedback here. Thanks, Sadeesh Kumar Viswanathan.

---

## [Auto-complete without connecting to the server](https://www.ruby-forum.com/t/auto-complete-without-connecting-to-the-server/152619)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 3\
**Last updated:** [November 5, 2008, 7:06pm UTC](https://www.ruby-forum.com/t/auto-complete-without-connecting-to-the-server/152619 "2008-11-05T19:06:55Z")

</div>

Hi, My client wants to type instead of select from a list. But it’s not just a free typing but typing the first few letters. So basically, it’s auto-complete function except that the list data is already in the clien…

---

## [M:n realtions don't work with fixtures?!](https://www.ruby-forum.com/t/m-n-realtions-dont-work-with-fixtures/152609)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 6\
**Last updated:** [November 5, 2008, 6:13pm UTC](https://www.ruby-forum.com/t/m-n-realtions-dont-work-with-fixtures/152609 "2008-11-05T18:13:41Z")

</div>

Hello, I’m currently trying to populate my database with fixtures and having a problem. The table USER has many GROUPS he belongs to and vice versa so it’s m:n relationship. Model: class User \< ActiveRecord::Base …

---

## [To Use or not to use global variable](https://www.ruby-forum.com/t/to-use-or-not-to-use-global-variable/152588)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [November 5, 2008, 5:43pm UTC](https://www.ruby-forum.com/t/to-use-or-not-to-use-global-variable/152588 "2008-11-05T17:43:29Z")

</div>

Hi My application has facility that any user can create a ticket from the intranet site.So upon creating a ticket he gives an email id .And I have to send mail back to this mail id giving created ticket’s information…

---

## [Moving Back From ActiveRecord Session Store to cookie](https://www.ruby-forum.com/t/moving-back-from-activerecord-session-store-to-cookie/152606)

<div class="topic-metadata">

**Author:** [@johnk](https://www.ruby-forum.com/u/johnk)\
**Replies:** 1\
**Last updated:** [November 5, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/moving-back-from-activerecord-session-store-to-cookie/152606 "2008-11-05T17:40:38Z")

</div>

A couple months ago I moved from storing sessions in the default cookie store to active\_record. Now I kind of want to move back because I am not sure I see any benefit of it but many negatives i.e. it is not easy on …

---

## [0 errors prohibited this model from being saved](https://www.ruby-forum.com/t/0-errors-prohibited-this-model-from-being-saved/152617)

<div class="topic-metadata">

**Author:** [@tansaku](https://www.ruby-forum.com/u/tansaku)\
**Replies:** 0\
**Last updated:** [November 5, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/0-errors-prohibited-this-model-from-being-saved/152617 "2008-11-05T17:40:25Z")

</div>

Hi, I just generated a scaffold for some existing models I have, and everything is working fine, except I get a 0 error message on the edit view: 0 errors prohibited this statistic type from being saved There were …

---

## [Problem with Rails 2.2 and Rake db:migrate](https://www.ruby-forum.com/t/problem-with-rails-2-2-and-rake-db-migrate/152610)

<div class="topic-metadata">

**Author:** [@SSSS\_oSSSS\_Stm](https://www.ruby-forum.com/u/SSSS_oSSSS_Stm)\
**Replies:** 0\
**Last updated:** [November 5, 2008, 4:36pm UTC](https://www.ruby-forum.com/t/problem-with-rails-2-2-and-rake-db-migrate/152610 "2008-11-05T16:36:03Z")

</div>

Hello, I have a problem when I execute rake db:migrate (in /Users/miguelati/Proyectos/Proyectos Ruby/foro) rake aborted! can’t convert Fixnum into String With trace: \*\* Invoke db:migrate (first\_time) \*\* Invoke en…

---

## [Observe\_field with select throwing javascript error](https://www.ruby-forum.com/t/observe-field-with-select-throwing-javascript-error/152529)

<div class="topic-metadata">

**Author:** [@rubylicious](https://www.ruby-forum.com/u/rubylicious)\
**Replies:** 3\
**Last updated:** [November 5, 2008, 4:07pm UTC](https://www.ruby-forum.com/t/observe-field-with-select-throwing-javascript-error/152529 "2008-11-05T16:07:42Z")

</div>

Using the following simple form with a select box, the observe\_field is throwing a javascript error related to the “getValue()” method in the prototype library. Any ideas as to why? Everything that I can tell is wel…

---

## [Gem as Plugin](https://www.ruby-forum.com/t/gem-as-plugin/152562)

<div class="topic-metadata">

**Author:** [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Replies:** 1\
**Last updated:** [November 5, 2008, 3:50pm UTC](https://www.ruby-forum.com/t/gem-as-plugin/152562 "2008-11-05T15:50:47Z")

</div>

I have installed the fiveruns tuneup gem. I copied the five runs folder from the gems directory (C:\\ruby\\lib\\ruby\\gems\\1.8\\gems\\fiveruns\_tuneup-0.8.17) to the application vendor directory. When I restarted the server…

---

## [Problems w/ before\_filter getting ignored](https://www.ruby-forum.com/t/problems-w-before-filter-getting-ignored/152558)

<div class="topic-metadata">

**Author:** [@clemrock](https://www.ruby-forum.com/u/clemrock)\
**Replies:** 3\
**Last updated:** [November 5, 2008, 3:34pm UTC](https://www.ruby-forum.com/t/problems-w-before-filter-getting-ignored/152558 "2008-11-05T15:34:47Z")

</div>

Hello, I’m setting up an authentication module that will be called from application.rb. I want to save a rrequest.request\_uri into a session to be used as a place holder that will take users back to the page the…

---

## [My rake is broken - "no such file to load..."](https://www.ruby-forum.com/t/my-rake-is-broken-no-such-file-to-load/152589)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [November 5, 2008, 3:22pm UTC](https://www.ruby-forum.com/t/my-rake-is-broken-no-such-file-to-load/152589 "2008-11-05T15:22:35Z")

</div>

Hey folks After doing an update from our svn server, rake is no longer working for me, though it’s fine for my team-mates. I get this error: no such file to load – spec/rake/spectask /home/max/work/e\_learning\_resour…

---

## [R2.2: config.gems](https://www.ruby-forum.com/t/r2-2-config-gems/152594)

<div class="topic-metadata">

**Author:** [@namealreadytaken](https://www.ruby-forum.com/u/namealreadytaken)\
**Replies:** 1\
**Last updated:** [November 5, 2008, 2:26pm UTC](https://www.ruby-forum.com/t/r2-2-config-gems/152594 "2008-11-05T14:26:58Z")

</div>

What does the new config.gems get you that the old $GEM\_PATH and $GEM\_HOME does not? See http://wiki.rubyonrails.org/rails/pages/HowToUseMultipleGemRepositories I just have a global gems repo, and the wider use-any-g…

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

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