# Rails

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

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

---

## [The role of self and :: within a method of a model](https://www.ruby-forum.com/t/the-role-of-self-and-within-a-method-of-a-model/181818)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 3\
**Last updated:** [January 19, 2010, 6:43pm UTC](https://www.ruby-forum.com/t/the-role-of-self-and-within-a-method-of-a-model/181818 "2010-01-19T18:43:21Z")

</div>

Hey all, I understand that a def self.abc, for example, is a class method, which allows you to call its contents by just referencing model.abc (rather than model.new.abc). However, what is its role when located in a …

---

## [Belongs\_to (polymorphic) or has\_many (through)](https://www.ruby-forum.com/t/belongs-to-polymorphic-or-has-many-through/181881)

<div class="topic-metadata">

**Author:** [@nilskassube](https://www.ruby-forum.com/u/nilskassube)\
**Replies:** 0\
**Last updated:** [January 19, 2010, 6:36pm UTC](https://www.ruby-forum.com/t/belongs-to-polymorphic-or-has-many-through/181881 "2010-01-19T18:36:12Z")

</div>

Hi, I’d be sooo happy I any of you could help me out with a problem I’m currently stuck with :slight\_smile: Basic info I’m on Rails 2.3.5 and love using the formtastic formbuilder :slight\_smile: What I’m working on I…

---

## [Rake aborted! Can't create TCP/IP socket (10106)](https://www.ruby-forum.com/t/rake-aborted-cant-create-tcp-ip-socket-10106/181875)

<div class="topic-metadata">

**Author:** [@nigel](https://www.ruby-forum.com/u/nigel)\
**Replies:** 5\
**Last updated:** [January 19, 2010, 5:37pm UTC](https://www.ruby-forum.com/t/rake-aborted-cant-create-tcp-ip-socket-10106/181875 "2010-01-19T17:37:11Z")

</div>

If this has been dealt with before then forgive me, then if someone would be kind enough to point me to the url. I recently purchased RubyMine and installed it as per instructions (Windows7). I have an existing datab…

---

## [Rake cucumber features fails](https://www.ruby-forum.com/t/rake-cucumber-features-fails/181878)

<div class="topic-metadata">

**Author:** [@rorra](https://www.ruby-forum.com/u/rorra)\
**Replies:** 0\
**Last updated:** [January 19, 2010, 5:33pm UTC](https://www.ruby-forum.com/t/rake-cucumber-features-fails/181878 "2010-01-19T17:33:40Z")

</div>

Hey Guys, Ubuntu 9.10 Env: Ruby 1.9.1 Rails 2.3.5 RSpec 1.3.1 Cucumber 0.6.1 Cucumber-rails 0.2.3 I’m starting with BDD with Cucumber/RSpec. After creating a rails app, I did script/generate rspec and cucumber. F…

---

## [Newbie Issue](https://www.ruby-forum.com/t/newbie-issue/181873)

<div class="topic-metadata">

**Author:** [@suryava](https://www.ruby-forum.com/u/suryava)\
**Replies:** 2\
**Last updated:** [January 19, 2010, 5:07pm UTC](https://www.ruby-forum.com/t/newbie-issue/181873 "2010-01-19T17:07:55Z")

</div>

I am a newbie to RoR. I am struggling to find out why my first RoR program does not show me the labels and the fields for my table. This is what I did so far: Installed RoR 1.8.6. Installed NetBeans 6.8 Installed MyS…

---

## [Dispatch.cgi? A host better than Site5](https://www.ruby-forum.com/t/dispatch-cgi-a-host-better-than-site5/181843)

<div class="topic-metadata">

**Author:** [@mike343](https://www.ruby-forum.com/u/mike343)\
**Replies:** 5\
**Last updated:** [January 19, 2010, 4:54pm UTC](https://www.ruby-forum.com/t/dispatch-cgi-a-host-better-than-site5/181843 "2010-01-19T16:54:27Z")

</div>

When I type the command $rails app\_name I don’t see the following list generate a dispatch.cgi or dispatch.fcgi file. It appears that I need this file and I need to modify it in order to properly deploy my site on S…

---

## [Dynamic session expiration](https://www.ruby-forum.com/t/dynamic-session-expiration/181862)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 1\
**Last updated:** [January 19, 2010, 4:24pm UTC](https://www.ruby-forum.com/t/dynamic-session-expiration/181862 "2010-01-19T16:24:36Z")

</div>

Hi in the login page i have a check ox which says “Keep me looged in for 1 week” . Please guide how can I do this…I am planning to use authlogic Thanks Tom

---

## [Refresh automatically](https://www.ruby-forum.com/t/refresh-automatically/181662)

<div class="topic-metadata">

**Author:** [@erwillie](https://www.ruby-forum.com/u/erwillie)\
**Replies:** 16\
**Last updated:** [January 19, 2010, 3:30pm UTC](https://www.ruby-forum.com/t/refresh-automatically/181662 "2010-01-19T15:30:49Z")

</div>

Hi everybody!!! IÂ´m doing a webpage, I want that this webpage refreshly automatically. How can I do that with Ror Thanks!!!

---

## [Rails saving on LDAP (or directly on a mailserver)](https://www.ruby-forum.com/t/rails-saving-on-ldap-or-directly-on-a-mailserver/181686)

<div class="topic-metadata">

**Author:** [@ialuronico](https://www.ruby-forum.com/u/ialuronico)\
**Replies:** 2\
**Last updated:** [January 19, 2010, 2:18pm UTC](https://www.ruby-forum.com/t/rails-saving-on-ldap-or-directly-on-a-mailserver/181686 "2010-01-19T14:18:08Z")

</div>

Hi everybody, I’m a newbie in the Rails world but I like it so much … One of my friend is rebuildiding a gym+swimminpool and starting from the next summer there will be a lot of people working in the gym ( like Barma…

---

## [Rails Cannot See User\_Notifier's methods!](https://www.ruby-forum.com/t/rails-cannot-see-user-notifiers-methods/181839)

<div class="topic-metadata">

**Author:** [@jrgoodner](https://www.ruby-forum.com/u/jrgoodner)\
**Replies:** 2\
**Last updated:** [January 19, 2010, 1:55pm UTC](https://www.ruby-forum.com/t/rails-cannot-see-user-notifiers-methods/181839 "2010-01-19T13:55:54Z")

</div>

Hey there, I’m attempting to set up a User\_notifier that sends the user an email with a reset password (a la RESTful Authentication’s plugin–which I’m using). I get the following error any time I call UserNotifier.de…

---

## [(JOBS) Footbalistic is looking for RoR developers](https://www.ruby-forum.com/t/jobs-footbalistic-is-looking-for-ror-developers/181868)

<div class="topic-metadata">

**Author:** [@Footbalistic](https://www.ruby-forum.com/u/Footbalistic)\
**Replies:** 0\
**Last updated:** [January 19, 2010, 1:55pm UTC](https://www.ruby-forum.com/t/jobs-footbalistic-is-looking-for-ror-developers/181868 "2010-01-19T13:55:53Z")

</div>

DESCRIPTION To take our website http://www.footbalistic.com/ to the next level, Footbalistic is looking for RoR developers located in San Francisco for 2 to 6 months contract assignments. If you’re a student looking …

---

## [Specified procedure could not be found in postgresql gem](https://www.ruby-forum.com/t/specified-procedure-could-not-be-found-in-postgresql-gem/181859)

<div class="topic-metadata">

**Author:** [@antony\_4u](https://www.ruby-forum.com/u/antony_4u)\
**Replies:** 0\
**Last updated:** [January 19, 2010, 10:53am UTC](https://www.ruby-forum.com/t/specified-procedure-could-not-be-found-in-postgresql-gem/181859 "2010-01-19T10:53:18Z")

</div>

\*\* Using rails version 2.3.4 rake aborted! Please install the postgresql adapter: gem install activerecord-postgresql-adap ter (127: The specified procedure could not be found. - D:/xstor/local\_reposi try/.gems/gem…

---

## [Forbidden error on rails app with Passenger and Apache](https://www.ruby-forum.com/t/forbidden-error-on-rails-app-with-passenger-and-apache/181773)

<div class="topic-metadata">

**Author:** [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Replies:** 8\
**Last updated:** [January 19, 2010, 10:35am UTC](https://www.ruby-forum.com/t/forbidden-error-on-rails-app-with-passenger-and-apache/181773 "2010-01-19T10:35:07Z")

</div>

I run a rails app at /home/vincent/Documents/vincentApp/ . The app runs fine with WEBrick on localhost:3000. However, I am getting a Forbidden error when accessing the app on Apache on port 80. I suspect this is mo…

---

## [Barry Flower is out of the office](https://www.ruby-forum.com/t/barry-flower-is-out-of-the-office/181855)

<div class="topic-metadata">

**Author:** [@Barry\_Flower](https://www.ruby-forum.com/u/Barry_Flower)\
**Replies:** 0\
**Last updated:** [January 19, 2010, 9:27am UTC](https://www.ruby-forum.com/t/barry-flower-is-out-of-the-office/181855 "2010-01-19T09:27:48Z")

</div>

I will be out of the office starting 19/01/2010 and will not return until 01/02/2010. I will be accessing my mail from time to time but for urgent issues please contact Kiran Joshi (IT Issues) or Adam Brand (Busine…

---

## [Database design](https://www.ruby-forum.com/t/database-design/181849)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 2\
**Last updated:** [January 19, 2010, 8:56am UTC](https://www.ruby-forum.com/t/database-design/181849 "2010-01-19T08:56:23Z")

</div>

Hello Friends, I just wanted to know the proper way of designing a database which should be worked with the activerocord design. My requirement is I have 100’s of question and answer to that question, and the scenar…

---

## [Validates\_format\_of :phone,](https://www.ruby-forum.com/t/validates-format-of-phone/181786)

<div class="topic-metadata">

**Author:** [@ashu](https://www.ruby-forum.com/u/ashu)\
**Replies:** 3\
**Last updated:** [January 19, 2010, 8:45am UTC](https://www.ruby-forum.com/t/validates-format-of-phone/181786 "2010-01-19T08:45:40Z")

</div>

validates\_format\_of :phone, :with =\> /\\A\\s\*(?:(?:+?(?:\\d{1,3}(?:\\s\*|\[-.\])))?(?\\d{3}\[-/)\]?\\s\*) (?:\[2-9\]\[0-9 -.\]{6,})\\s\*\\z/, i pit it on my reuriments but error whlie entering 666.111.9999 i want it should be ok any…

---

## [Creating rails 2.3.5 sites after rails 3 install](https://www.ruby-forum.com/t/creating-rails-2-3-5-sites-after-rails-3-install/181761)

<div class="topic-metadata">

**Author:** [@ignu](https://www.ruby-forum.com/u/ignu)\
**Replies:** 3\
**Last updated:** [January 19, 2010, 6:55am UTC](https://www.ruby-forum.com/t/creating-rails-2-3-5-sites-after-rails-3-install/181761 "2010-01-19T06:55:01Z")

</div>

So I installed rails 3 but want to still work with 2.3.5. I removed the rails3pre gem but it’s still the current version of rails. And if I try to do rails 2.3.5 MyNewSite I get RubyGem version error: railties(3.0.…

---

## [Sub domains](https://www.ruby-forum.com/t/sub-domains/181791)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 3\
**Last updated:** [January 19, 2010, 5:58am UTC](https://www.ruby-forum.com/t/sub-domains/181791 "2010-01-19T05:58:16Z")

</div>

Hi This is a implementation question. I have to do my rails application as a SaaS application. So the working is like a general site will be there say example.com . Suppose a user say user1 registers to use this serv…

---

## [Best way to set default for an optional local in a partial?](https://www.ruby-forum.com/t/best-way-to-set-default-for-an-optional-local-in-a-partial/181838)

<div class="topic-metadata">

**Author:** [@brahn](https://www.ruby-forum.com/u/brahn)\
**Replies:** 0\
**Last updated:** [January 19, 2010, 3:41am UTC](https://www.ruby-forum.com/t/best-way-to-set-default-for-an-optional-local-in-a-partial/181838 "2010-01-19T03:41:50Z")

</div>

What’s the best way to set the default value of an optional local variable in a partial template? In the past I’ve used \<% foo = default\_value unless (defined? foo) %\> But ActionView::Base says not to use (defined? …

---

## [Rake db:migrate:up to change scaffold?](https://www.ruby-forum.com/t/rake-dbup-to-change-scaffold/181745)

<div class="topic-metadata">

**Author:** [@vihrao](https://www.ruby-forum.com/u/vihrao)\
**Replies:** 2\
**Last updated:** [January 19, 2010, 2:05am UTC](https://www.ruby-forum.com/t/rake-dbup-to-change-scaffold/181745 "2010-01-19T02:05:40Z")

</div>

I created a scaffold for a table ‘mytable’ in mysql with two columns and then ran rake db:migrate. This worked. Then I wanted to add a column to the existing ‘mytable’ in the database. So I go to migrate directory and …

---

## [AR - find all records not already associated](https://www.ruby-forum.com/t/ar-find-all-records-not-already-associated/181814)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 4\
**Last updated:** [January 18, 2010, 11:21pm UTC](https://www.ruby-forum.com/t/ar-find-all-records-not-already-associated/181814 "2010-01-18T23:21:58Z")

</div>

Given A has\_many :B :through =\> :C A has\_many :C B has\_many :A :through =\> :C B has\_many :C C belongs\_to :A C belongs\_to :B What is the idiomatic way to find all B that are not associated with a given value for A…

---

## [MVC .... Many views and one controller](https://www.ruby-forum.com/t/mvc-many-views-and-one-controller/197225)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 4\
**Last updated:** [January 18, 2010, 11:15pm UTC](https://www.ruby-forum.com/t/mvc-many-views-and-one-controller/197225 "2010-01-18T23:15:32Z")

</div>

What’s the right RoR way if a controller needs to display one of many views in, say, an index method?

---

## [XML in rails](https://www.ruby-forum.com/t/xml-in-rails/181808)

<div class="topic-metadata">

**Author:** [@sujay](https://www.ruby-forum.com/u/sujay)\
**Replies:** 4\
**Last updated:** [January 18, 2010, 11:12pm UTC](https://www.ruby-forum.com/t/xml-in-rails/181808 "2010-01-18T23:12:36Z")

</div>

I have an XML file containing data which I need to access in the controller. For example, the XML file contains cpu usage and cpu load and other such information. I need to collect this information into a controller a…

---

## [Sessions](https://www.ruby-forum.com/t/sessions/181807)

<div class="topic-metadata">

**Author:** [@dwdw](https://www.ruby-forum.com/u/dwdw)\
**Replies:** 1\
**Last updated:** [January 18, 2010, 11:09pm UTC](https://www.ruby-forum.com/t/sessions/181807 "2010-01-18T23:09:06Z")

</div>

Hello, I have a little question. I want to an user edit or delete their comments. For it, I have this code: \<% if post.usuario\_id == session\[:usuario\_id\] %\> \<%= link\_to ‘Editar’, {:action =\> ‘edit’, :id =\> post.id} …

---

## [Rails 3.0: ActionController::Base render()](https://www.ruby-forum.com/t/rails-3-0-actioncontroller-base-render/181830)

<div class="topic-metadata">

**Author:** [@artemave](https://www.ruby-forum.com/u/artemave)\
**Replies:** 0\
**Last updated:** [January 18, 2010, 11:06pm UTC](https://www.ruby-forum.com/t/rails-3-0-actioncontroller-base-render/181830 "2010-01-18T23:06:45Z")

</div>

Can anyone explain where render() comes from in ActionController::Base? I managed to trace it down only that far: ActionController::Base includes ActionController::Rendering where render() method is defined. This def…

---

## [Passing hidden field data](https://www.ruby-forum.com/t/passing-hidden-field-data/181820)

<div class="topic-metadata">

**Author:** [@Dudebot](https://www.ruby-forum.com/u/Dudebot)\
**Replies:** 1\
**Last updated:** [January 18, 2010, 10:09pm UTC](https://www.ruby-forum.com/t/passing-hidden-field-data/181820 "2010-01-18T22:09:56Z")

</div>

Hi Gurus, I had a form with a collection \<%= f.collection\_select :patient\_id, Patient.find\_main, :id, :namer %\> Where the user selected the :patient\_id. I’ve now reconfigured the rails app so that the controller for…

---

## [Can't get gem bundler to work with either rvm 1.9.1 and 1.9.2](https://www.ruby-forum.com/t/cant-get-gem-bundler-to-work-with-either-rvm-1-9-1-and-1-9-2/181805)

<div class="topic-metadata">

**Author:** [@Kristian](https://www.ruby-forum.com/u/Kristian)\
**Replies:** 2\
**Last updated:** [January 18, 2010, 9:16pm UTC](https://www.ruby-forum.com/t/cant-get-gem-bundler-to-work-with-either-rvm-1-9-1-and-1-9-2/181805 "2010-01-18T21:16:40Z")

</div>

I installed the bundler, no problem - but it seems to have screwed up my gem repository in both cases!? What to do? kristian-mandrups-macbook-pro:~ kristianconsult$ sudo gem install thor /Users/kristianconsult/.rvm/g…

---

## [Loading Model in Yaml](https://www.ruby-forum.com/t/loading-model-in-yaml/181784)

<div class="topic-metadata">

**Author:** [@pakothawade](https://www.ruby-forum.com/u/pakothawade)\
**Replies:** 1\
**Last updated:** [January 18, 2010, 8:59pm UTC](https://www.ruby-forum.com/t/loading-model-in-yaml/181784 "2010-01-18T20:59:42Z")

</div>

Am loading the model called “Decode” in my yaml file. When i run the rake db:seed, it runs fine in windows. But dont know why it fails in unix. Any ideas? params.yml \<% require ‘Decode’ i = 0 %\> Filter\_Param\<%= …

---

## [Passing data to javascript function](https://www.ruby-forum.com/t/passing-data-to-javascript-function/181669)

<div class="topic-metadata">

**Author:** [@bluegreen](https://www.ruby-forum.com/u/bluegreen)\
**Replies:** 5\
**Last updated:** [January 18, 2010, 7:14pm UTC](https://www.ruby-forum.com/t/passing-data-to-javascript-function/181669 "2010-01-18T19:14:37Z")

</div>

Hi, everyone. Is it possible to pass a local variable to a javascript function? I have a javascript function in application.js, and try to pass a local variable to the function in index.html.erb. If I passed a stri…

---

## [Puts & logger ... flush immediately](https://www.ruby-forum.com/t/puts-logger-flush-immediately/179619)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 7\
**Last updated:** [January 18, 2010, 6:48pm UTC](https://www.ruby-forum.com/t/puts-logger-flush-immediately/179619 "2010-01-18T18:48:09Z")

</div>

newbie here … I am tracing logic putting puts and logger.info calls in my code. I think Rails is buffering output so that I can’t see what happens until I close out webrick. How do I tell Rails (or whatever) that out…

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

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