# Rails

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

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

---

## [Console not working](https://www.ruby-forum.com/t/console-not-working/183110)

<div class="topic-metadata">

**Author:** [@Trausti\_Thor\_J](https://www.ruby-forum.com/u/Trausti_Thor_J)\
**Replies:** 4\
**Last updated:** [February 11, 2010, 3:26pm UTC](https://www.ruby-forum.com/t/console-not-working/183110 "2010-02-11T15:26:43Z")

</div>

I just installed Centos 5.4 64 bit. Nothing out of the ordinary, but this is a plain vanilla installation with ruby enterprise and passenger. My app works as it should, but when I try to run ‘script/console’ it does…

---

## [Parameterized ActiveRecord Associations: Any such thing?](https://www.ruby-forum.com/t/parameterized-activerecord-associations-any-such-thing/183276)

<div class="topic-metadata">

**Author:** [@zettabyte](https://www.ruby-forum.com/u/zettabyte)\
**Replies:** 3\
**Last updated:** [February 11, 2010, 3:18pm UTC](https://www.ruby-forum.com/t/parameterized-activerecord-associations-any-such-thing/183276 "2010-02-11T15:18:31Z")

</div>

Hi list, how are ya? So, my current project is just begging for the ability to have parameterized associations in my ActiveRecord classes. Basically I need something that is a cross between named scopes and standard …

---

## [Uninitialized constant Paginator |rails 2.2.2](https://www.ruby-forum.com/t/uninitialized-constant-paginator-rails-2-2-2/183304)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [February 11, 2010, 3:04pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-paginator-rails-2-2-2/183304 "2010-02-11T15:04:27Z")

</div>

Hello All, the below error driving me mad… uninitialized constant SearchController::Paginator i m using rails 2.2.2 version .i hope paginator is rails built in class… then why it shows me error. Expecting solution …

---

## [Undefined method \`sphinx\_facets' for nil:NilClass](https://www.ruby-forum.com/t/undefined-method-sphinx-facets-for-nil-nilclass/183299)

<div class="topic-metadata">

**Author:** [@Rabia\_Akhtar](https://www.ruby-forum.com/u/Rabia_Akhtar)\
**Replies:** 1\
**Last updated:** [February 11, 2010, 2:56pm UTC](https://www.ruby-forum.com/t/undefined-method-sphinx-facets-for-nil-nilclass/183299 "2010-02-11T14:56:51Z")

</div>

I am getting A NoMethodError occurred in main#search: undefined method sphinx\_facets' for nil:NilClass \[RAILS\_ROOT\]/vendor/plugins/ thinking-sphinx/lib/thinking\_sphinx/facet\_search.rb:131:infacet\_from\_object’ Its occu…

---

## [AJAX responses](https://www.ruby-forum.com/t/ajax-responses/183249)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 4\
**Last updated:** [February 11, 2010, 2:55pm UTC](https://www.ruby-forum.com/t/ajax-responses/183249 "2010-02-11T14:55:05Z")

</div>

Does anyone know if it’s possible to do multiple AJAX responses to a single request in Rails? I did some googling but didn’t find anything extremely helpful. Thanks.

---

## [Transaction not rolled back in Functional Test](https://www.ruby-forum.com/t/transaction-not-rolled-back-in-functional-test/183260)

<div class="topic-metadata">

**Author:** [@homerlex](https://www.ruby-forum.com/u/homerlex)\
**Replies:** 4\
**Last updated:** [February 11, 2010, 2:31pm UTC](https://www.ruby-forum.com/t/transaction-not-rolled-back-in-functional-test/183260 "2010-02-11T14:31:40Z")

</div>

Using rails 2.3 and MySQL 5. I have code in a controller that is something like begin User.transaction do user\_object.save do something that might raise an exeception end rescue Log the error give the user the f…

---

## [Object Version Control, or at least edit log](https://www.ruby-forum.com/t/object-version-control-or-at-least-edit-log/183156)

<div class="topic-metadata">

**Author:** [@PsiPro](https://www.ruby-forum.com/u/PsiPro)\
**Replies:** 9\
**Last updated:** [February 11, 2010, 2:12pm UTC](https://www.ruby-forum.com/t/object-version-control-or-at-least-edit-log/183156 "2010-02-11T14:12:56Z")

</div>

Hello all, I need to create a object history, as I’ll have multiple editors for a site i am working on. Of course it would be great to have the ability to restore an object to its state and undo the damage due to a ba…

---

## [Model not found in custom script](https://www.ruby-forum.com/t/model-not-found-in-custom-script/183277)

<div class="topic-metadata">

**Author:** [@Frank\_in\_Tennessee](https://www.ruby-forum.com/u/Frank_in_Tennessee)\
**Replies:** 1\
**Last updated:** [February 11, 2010, 1:19pm UTC](https://www.ruby-forum.com/t/model-not-found-in-custom-script/183277 "2010-02-11T13:19:45Z")

</div>

Hello, I have a custom task\_scheduler.rb file in RAILS\_ROOT/configuration/ initializers. It fails because I think that it doesn’t know where to find my Category model. Do you know how I can load or have available th…

---

## [CRUD pattern for modals](https://www.ruby-forum.com/t/crud-pattern-for-modals/183268)

<div class="topic-metadata">

**Author:** [@rorra](https://www.ruby-forum.com/u/rorra)\
**Replies:** 3\
**Last updated:** [February 11, 2010, 1:15pm UTC](https://www.ruby-forum.com/t/crud-pattern-for-modals/183268 "2010-02-11T13:15:33Z")

</div>

I have an application, where i.e., I can go to the users controllers, and they manage all the basic actions by rest, like creating, modifying, updating and deleting records. Now, I want to reuse that code, from anothe…

---

## [500 error in production environment which I don't get in development env](https://www.ruby-forum.com/t/500-error-in-production-environment-which-i-dont-get-in-development-env/183292)

<div class="topic-metadata">

**Author:** [@Jens\_MF](https://www.ruby-forum.com/u/Jens_MF)\
**Replies:** 2\
**Last updated:** [February 11, 2010, 1:06pm UTC](https://www.ruby-forum.com/t/500-error-in-production-environment-which-i-dont-get-in-development-env/183292 "2010-02-11T13:06:12Z")

</div>

Hi: I get a strange 500 error in production environment which I don’t get in development env: “We’re sorry but something went wrong” message. Production log is empty. Write permissions seem to be correct. What gets lo…

---

## [Making parts of text clickable](https://www.ruby-forum.com/t/making-parts-of-text-clickable/183237)

<div class="topic-metadata">

**Author:** [@rasmus](https://www.ruby-forum.com/u/rasmus)\
**Replies:** 5\
**Last updated:** [February 11, 2010, 12:41pm UTC](https://www.ruby-forum.com/t/making-parts-of-text-clickable/183237 "2010-02-11T12:41:01Z")

</div>

Hi, I need to make specific parts of a translated text clickable. One way to do this is: Translations: rules: rules terms: terms do\_you\_accept: Do you accept the %{rules} and %{terms}? In view: t :do\_you\_accept, …

---

## [Error when starting rails server \[on rails 3\]](https://www.ruby-forum.com/t/error-when-starting-rails-server-on-rails-3/183272)

<div class="topic-metadata">

**Author:** [@jump28](https://www.ruby-forum.com/u/jump28)\
**Replies:** 2\
**Last updated:** [February 11, 2010, 12:24pm UTC](https://www.ruby-forum.com/t/error-when-starting-rails-server-on-rails-3/183272 "2010-02-11T12:24:54Z")

</div>

Hi all, I receive an error when starting the server, namely: ~/Documents/blog$ rails server /usr/local/lib/site\_ruby/1.8/rubygems.rb:827:in report\_activate\_error': RubyGem version error: rack-mount(0.5.0 not ~\> 0.4.0)…

---

## [Nil object - can anyone help?](https://www.ruby-forum.com/t/nil-object-can-anyone-help/183257)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 16\
**Last updated:** [February 11, 2010, 10:07am UTC](https://www.ruby-forum.com/t/nil-object-can-anyone-help/183257 "2010-02-11T10:07:39Z")

</div>

Hi there, I’ve been looking for a while now and can’t seem to find where I’m going wrong… I’m following a railscast tutorial to send invites out to people. there’s n invitation.rb page: class Invitation \< ActiveReco…

---

## [Remember\_me\_for in authlogic](https://www.ruby-forum.com/t/remember-me-for-in-authlogic/183220)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 6\
**Last updated:** [February 11, 2010, 5:13am UTC](https://www.ruby-forum.com/t/remember-me-for-in-authlogic/183220 "2010-02-11T05:13:08Z")

</div>

Hi I am new to using authlogic . My requirement is in Login page I have a check box which says “Keep me logged in for 2 weeks” . But I dont know how to implement this. I have just seen remember\_me\_for in the doc. But…

---

## [When does 'dog' not equal 'dog'?](https://www.ruby-forum.com/t/when-does-dog-not-equal-dog/183274)

<div class="topic-metadata">

**Author:** [@fearless\_fool](https://www.ruby-forum.com/u/fearless_fool)\
**Replies:** 4\
**Last updated:** [February 11, 2010, 2:59am UTC](https://www.ruby-forum.com/t/when-does-dog-not-equal-dog/183274 "2010-02-11T02:59:12Z")

</div>

This is more a Ruby than a Rails question – feel free to redirect me as appropriate – but either this is a Ruby 1.9 bug or I have some serious misunderstanding. Essentially, I’ve caught the \<=\> operator returning nil…

---

## [Sql update\_all with string concatenate](https://www.ruby-forum.com/t/sql-update-all-with-string-concatenate/183269)

<div class="topic-metadata">

**Author:** [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Replies:** 4\
**Last updated:** [February 11, 2010, 1:40am UTC](https://www.ruby-forum.com/t/sql-update-all-with-string-concatenate/183269 "2010-02-11T01:40:12Z")

</div>

From a migration. I want to initialize a new column called “ident” with a string equal to “prec-#{id}” - where id is meant to be the id column of the relevant row. This works: Precinct.update\_all("ident = 'prec-' || i…

---

## [Namespace + nested resources = \<% form\_for ... %\> problem](https://www.ruby-forum.com/t/namespace-nested-resources-form-for-problem/183261)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 1\
**Last updated:** [February 10, 2010, 11:40pm UTC](https://www.ruby-forum.com/t/namespace-nested-resources-form-for-problem/183261 "2010-02-10T23:40:46Z")

</div>

Hello all I wrote a gist, which describes my problem: http://gist.github.com/300860 What param I need to pass to form\_for? Thanks

---

## [Tagging plugin?](https://www.ruby-forum.com/t/tagging-plugin/183266)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [February 10, 2010, 11:39pm UTC](https://www.ruby-forum.com/t/tagging-plugin/183266 "2010-02-10T23:39:35Z")

</div>

which recent plugin could be the best to handle a simple marketing campaign ads app based on user profile tags ? don’t need sophisticated things : user profile -\> tags created -marketing campaign -\> targets -\> tag s…

---

## [Problem with before\_\* callbacks being wrapped in transaction](https://www.ruby-forum.com/t/problem-with-before-callbacks-being-wrapped-in-transaction/183195)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [February 10, 2010, 11:28pm UTC](https://www.ruby-forum.com/t/problem-with-before-callbacks-being-wrapped-in-transaction/183195 "2010-02-10T23:28:03Z")

</div>

I am upgrading a 2.1 Rails app and ran into a problem with the new way that before\_\* callbacks are being wrapped in a transaction. I have a model that has a before\_create callback which charges the customers credit ca…

---

## [Absolute url to images from the model?](https://www.ruby-forum.com/t/absolute-url-to-images-from-the-model/183231)

<div class="topic-metadata">

**Author:** [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Replies:** 5\
**Last updated:** [February 10, 2010, 8:14pm UTC](https://www.ruby-forum.com/t/absolute-url-to-images-from-the-model/183231 "2010-02-10T20:14:42Z")

</div>

I have a need to pass full, absolute urls to images for an interaction with Facebook. I dont think I can use the view helpers (e.g. image\_tag) from the model though… Is there a way to do this from the model (or less d…

---

## [One rails, multiple DBs](https://www.ruby-forum.com/t/one-rails-multiple-dbs/183248)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 5\
**Last updated:** [February 10, 2010, 7:52pm UTC](https://www.ruby-forum.com/t/one-rails-multiple-dbs/183248 "2010-02-10T19:52:27Z")

</div>

Hi. I’m in a situation where I have to provide a hosted Rails App solution. I’m running Apache with passenger in the backend. What is the proper way to change the DB depending on the subdomain? Should I use data\_fabr…

---

## [Undefined method 'state'](https://www.ruby-forum.com/t/undefined-method-state/183251)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 2\
**Last updated:** [February 10, 2010, 6:15pm UTC](https://www.ruby-forum.com/t/undefined-method-state/183251 "2010-02-10T18:15:32Z")

</div>

I can’t imagine what I’m trying to do is complicated at all in Rails. Yet, I am now getting this error: undefined method \`state’ for :StudentFailState:Symbol. student.rb has\_one :student\_fail attr\_accessor :student\_…

---

## [Inserting Javascript dinamically with DOM](https://www.ruby-forum.com/t/inserting-javascript-dinamically-with-dom/183193)

<div class="topic-metadata">

**Author:** [@denommus](https://www.ruby-forum.com/u/denommus)\
**Replies:** 3\
**Last updated:** [February 10, 2010, 5:54pm UTC](https://www.ruby-forum.com/t/inserting-javascript-dinamically-with-dom/183193 "2010-02-10T17:54:07Z")

</div>

I want to do simple stuff. In my controller I have this: render :update do |page| page.replace\_html ‘scripts’, :partial =\> ‘scripts’, :locals =\> {:question =\> @question} end And in the partial I have this: \<% if qu…

---

## [Action Web Service : Missing template ... wsdl.rhtml](https://www.ruby-forum.com/t/action-web-service-missing-template-wsdl-rhtml/122436)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 3\
**Last updated:** [February 10, 2010, 5:40pm UTC](https://www.ruby-forum.com/t/action-web-service-missing-template-wsdl-rhtml/122436 "2010-02-10T17:40:40Z")

</div>

Hello, I have a problem with Action Web Service, I have defined a really simple WS with ./generate web\_service Backend essai adding web\_service\_scaffold if I try to obtain the wsdl I got : Missing template …/wsdl.…

---

## [DB query cache](https://www.ruby-forum.com/t/db-query-cache/183214)

<div class="topic-metadata">

**Author:** [@tristan](https://www.ruby-forum.com/u/tristan)\
**Replies:** 1\
**Last updated:** [February 10, 2010, 5:30pm UTC](https://www.ruby-forum.com/t/db-query-cache/183214 "2010-02-10T17:30:47Z")

</div>

Hi all I’ve got a problem that’s been bugging me for a while now. We have a page of news article summaries with links to the full article (pretty standard sort of thing). When we create new articles in production the…

---

## [Generating rails app in previous version after rails 3.0 ins](https://www.ruby-forum.com/t/generating-rails-app-in-previous-version-after-rails-3-0-ins/183235)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 3\
**Last updated:** [February 10, 2010, 3:32pm UTC](https://www.ruby-forum.com/t/generating-rails-app-in-previous-version-after-rails-3-0-ins/183235 "2010-02-10T15:32:32Z")

</div>

Hello Anybody knows how to generate a rails application in a previous version, after the installation of Rails 3.0.0.beta gem. This would work before, rails 2.3.5 my\_app but fails now with … /usr/local/lib/site\_rub…

---

## [Rails System Commad](https://www.ruby-forum.com/t/rails-system-commad/183225)

<div class="topic-metadata">

**Author:** [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Replies:** 3\
**Last updated:** [February 10, 2010, 3:29pm UTC](https://www.ruby-forum.com/t/rails-system-commad/183225 "2010-02-10T15:29:36Z")

</div>

Hi All, I’m having the following scenario: In my code i run the rails system command system “say xyz” Suppose this “say xyz” command runs a process for a very long period of time then I want to: stop/kill that pro…

---

## [Help decoupling models with a foreign key relationship](https://www.ruby-forum.com/t/help-decoupling-models-with-a-foreign-key-relationship/183232)

<div class="topic-metadata">

**Author:** [@robo](https://www.ruby-forum.com/u/robo)\
**Replies:** 3\
**Last updated:** [February 10, 2010, 3:07pm UTC](https://www.ruby-forum.com/t/help-decoupling-models-with-a-foreign-key-relationship/183232 "2010-02-10T15:07:04Z")

</div>

Recently started working with rails; I’m very impressed so far, but I do have a question - Say I’m running a blog-type application. I’ve got a Users table, and a Posts table. Each post on the blog is made by a user.…

---

## [redirect\_to(URL) and return](https://www.ruby-forum.com/t/redirect-to-url-and-return/183228)

<div class="topic-metadata">

**Author:** [@smit\_shah](https://www.ruby-forum.com/u/smit_shah)\
**Replies:** 3\
**Last updated:** [February 10, 2010, 2:46pm UTC](https://www.ruby-forum.com/t/redirect-to-url-and-return/183228 "2010-02-10T14:46:44Z")

</div>

Hi… I am using an API. In that, I have to send data in query string. Now my question is how to get back from that site??? because it is not taking return\_url from myside. It gives me response. I want to again redirect …

---

## [Insert into table without his model](https://www.ruby-forum.com/t/insert-into-table-without-his-model/183236)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 3\
**Last updated:** [February 10, 2010, 2:29pm UTC](https://www.ruby-forum.com/t/insert-into-table-without-his-model/183236 "2010-02-10T14:29:25Z")

</div>

Hi, I have “contacts” table. I have to insert and update “contacts” table. Is that be possible to do this without having the “contact.rb” model? Can I make direct interaction to the “contacts” table? Can anyone help…

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

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