# Rails

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

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

---

## [Strange array behaviour](https://www.ruby-forum.com/t/strange-array-behaviour/180702)

<div class="topic-metadata">

**Author:** [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Replies:** 5\
**Last updated:** [January 1, 2010, 12:38pm UTC](https://www.ruby-forum.com/t/strange-array-behaviour/180702 "2010-01-01T12:38:40Z")

</div>

I’ve got a relationship: Person has many MiddleNames and MiddleName belongs to Person In irb I can add a person, add a middle name then call @person.middle\_names.first.name to get that middle name. However when I t…

---

## [Loops in Ruby](https://www.ruby-forum.com/t/loops-in-ruby/180874)

<div class="topic-metadata">

**Author:** [@webbieguy](https://www.ruby-forum.com/u/webbieguy)\
**Replies:** 5\
**Last updated:** [January 1, 2010, 4:55am UTC](https://www.ruby-forum.com/t/loops-in-ruby/180874 "2010-01-01T04:55:15Z")

</div>

Hi, I have a very simple problem. I am a newbie to rails and for the life of me can’t figure out why a simple incrementing loop is not printing to screen correctly. I know this has to be something simple but can’t fi…

---

## [Ruby on Rails Programmer â€“ Junior (Austin, TX - No relo)](https://www.ruby-forum.com/t/ruby-on-rails-programmer-a-junior-austin-tx-no-relo/180937)

<div class="topic-metadata">

**Author:** [@amwfllc](https://www.ruby-forum.com/u/amwfllc)\
**Replies:** 0\
**Last updated:** [January 1, 2010, 1:40am UTC](https://www.ruby-forum.com/t/ruby-on-rails-programmer-a-junior-austin-tx-no-relo/180937 "2010-01-01T01:40:55Z")

</div>

Ruby on Rails Programmer – Junior Our client, based in Austin, TX, is looking for a Ruby on Rails Programmer to join their dynamic team of experienced programmers. As a Ruby on Rails Programmer, you will perform a cri…

---

## [Single Validation Error... best practices?](https://www.ruby-forum.com/t/single-validation-error-best-practices/180934)

<div class="topic-metadata">

**Author:** [@Danimal](https://www.ruby-forum.com/u/Danimal)\
**Replies:** 1\
**Last updated:** [January 1, 2010, 12:51am UTC](https://www.ruby-forum.com/t/single-validation-error-best-practices/180934 "2010-01-01T00:51:45Z")

</div>

So a lot of Rails apps (mine included) have multiple validations on a single attribute. For example: on the password field, validating that it is (a) not blank, (b) matches the confirmation, (c) is at least X characte…

---

## [HABTM & collection\_ids: confirm changes before saving](https://www.ruby-forum.com/t/habtm-collection-ids-confirm-changes-before-saving/180928)

<div class="topic-metadata">

**Author:** [@MaggotChild](https://www.ruby-forum.com/u/MaggotChild)\
**Replies:** 1\
**Last updated:** [December 31, 2009, 8:11pm UTC](https://www.ruby-forum.com/t/habtm-collection-ids-confirm-changes-before-saving/180928 "2009-12-31T20:11:26Z")

</div>

It seems that when a HABTM (or has many) is involved, having a confirmation page prior to saving doesn’t work as seamlessly as other Rails view/model parings, specifically when confirming an edit. This is caused by th…

---

## [Instantiating controllers?](https://www.ruby-forum.com/t/instantiating-controllers/180899)

<div class="topic-metadata">

**Author:** [@student](https://www.ruby-forum.com/u/student)\
**Replies:** 5\
**Last updated:** [December 31, 2009, 7:46pm UTC](https://www.ruby-forum.com/t/instantiating-controllers/180899 "2009-12-31T19:46:16Z")

</div>

The problem: Application sidebar needs to be able to determine which links to display, based on which links a user can actually access. It is important that the interface be DRY, as this is a security matter. The pr…

---

## [We're sorry, but something went wrong(500)](https://www.ruby-forum.com/t/were-sorry-but-something-went-wrong-500/180917)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 5\
**Last updated:** [December 31, 2009, 4:45pm UTC](https://www.ruby-forum.com/t/were-sorry-but-something-went-wrong-500/180917 "2009-12-31T16:45:25Z")

</div>

Hi all, Thankfully, my site is now live. It needs some tweaks, but most importantly I need to fix the 500 internal server error I seem to be getting. We’re sorry, but something went wrong(500), We’ve been notified ab…

---

## [Who caused the view to be rendered](https://www.ruby-forum.com/t/who-caused-the-view-to-be-rendered/180913)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 6\
**Last updated:** [December 31, 2009, 4:41pm UTC](https://www.ruby-forum.com/t/who-caused-the-view-to-be-rendered/180913 "2009-12-31T16:41:19Z")

</div>

Newbie here. I placed a debugger statement into a view and I then executed a where command hoping to find which controller caused the view to be rendered. The stack is interesting but does not seem to give me the inf…

---

## [Understaning log file response times](https://www.ruby-forum.com/t/understaning-log-file-response-times/180919)

<div class="topic-metadata">

**Author:** [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Replies:** 0\
**Last updated:** [December 31, 2009, 4:37pm UTC](https://www.ruby-forum.com/t/understaning-log-file-response-times/180919 "2009-12-31T16:37:54Z")

</div>

Hi everyone, I’m trying to understand where my application spends time while being generated. In the log file I see entries such as: Completed in 368ms (View: 32, DB: 1) | 200 OK \[http://www.sitename.com/\]. Since ev…

---

## [Savage Beast For Rails 2.3](https://www.ruby-forum.com/t/savage-beast-for-rails-2-3/180908)

<div class="topic-metadata">

**Author:** [@Gie](https://www.ruby-forum.com/u/Gie)\
**Replies:** 0\
**Last updated:** [December 31, 2009, 11:15am UTC](https://www.ruby-forum.com/t/savage-beast-for-rails-2-3/180908 "2009-12-31T11:15:20Z")

</div>

Hello rails… I have some difficulties when integrate savage beast forum with my rails app 2.3. I found error : uninitialized constant SavageBeast::UserInit::Monitorship and then about routes…, how to set routes in …

---

## [Eager loading outside the find method](https://www.ruby-forum.com/t/eager-loading-outside-the-find-method/180905)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 3\
**Last updated:** [December 31, 2009, 11:14am UTC](https://www.ruby-forum.com/t/eager-loading-outside-the-find-method/180905 "2009-12-31T11:14:10Z")

</div>

Hello, I am used tO the :include parameter always inside a find method: @posts = Post.find(:all, :include =\> \[:user\]) How can I wire the :include to the relationship outside the find method? @posts = Post.find(:all) …

---

## [Yahoo WOEIDs](https://www.ruby-forum.com/t/yahoo-woeids/180906)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 0\
**Last updated:** [December 31, 2009, 10:08am UTC](https://www.ruby-forum.com/t/yahoo-woeids/180906 "2009-12-31T10:08:23Z")

</div>

I need to make a stab a getting a whole load of yahoo WOEIDs. Doesn’t matter if some are wrong but I don’t fancy typing 1000 of them, I have 1000 place names and I’d like to grab just one WOEID for each… has anyone do…

---

## [Gmailer not connecting go gmail account](https://www.ruby-forum.com/t/gmailer-not-connecting-go-gmail-account/180901)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 0\
**Last updated:** [December 31, 2009, 7:47am UTC](https://www.ruby-forum.com/t/gmailer-not-connecting-go-gmail-account/180901 "2009-12-31T07:47:34Z")

</div>

hi all i have installed gmailer gem and when trying to connect with my gmail account using it im getting the error “RuntimeError (Not connected, verify the credentials.)”. Code i used are as follows: require 'rubygem…

---

## [Validating the presence of two associated objects from both models](https://www.ruby-forum.com/t/validating-the-presence-of-two-associated-objects-from-both-models/180887)

<div class="topic-metadata">

**Author:** [@evanchaney](https://www.ruby-forum.com/u/evanchaney)\
**Replies:** 4\
**Last updated:** [December 31, 2009, 6:41am UTC](https://www.ruby-forum.com/t/validating-the-presence-of-two-associated-objects-from-both-models/180887 "2009-12-31T06:41:55Z")

</div>

I have a model “Conversation” and a model “Leader”. A Conversation is always led by exactly 1 Leader. I’ve overridden Conversation’s “validate” method to validate the presence of an associated Leader model. If I add …

---

## [Cannot gem isntall rails](https://www.ruby-forum.com/t/cannot-gem-isntall-rails/180835)

<div class="topic-metadata">

**Author:** [@max\_1219](https://www.ruby-forum.com/u/max_1219)\
**Replies:** 1\
**Last updated:** [December 31, 2009, 2:58am UTC](https://www.ruby-forum.com/t/cannot-gem-isntall-rails/180835 "2009-12-31T02:58:28Z")

</div>

newbie in ROR. Win 7 ruby 1.8.6 (2007-09-24 patchlevel 111) \[i386-mswin32\] run admin cmd gem install rails --include-dependencies then I got the error here: ERROR: While executing gem … (Gem::GemNotFoundException) …

---

## [Re: script/generate cucumber fails in Rails 2.3.5 and Ruby 1.9.1](https://www.ruby-forum.com/t/re-script-generate-cucumber-fails-in-rails-2-3-5-and-ruby-1-9-1/180894)

<div class="topic-metadata">

**Author:** [@christoph\_j](https://www.ruby-forum.com/u/christoph_j)\
**Replies:** 1\
**Last updated:** [December 31, 2009, 2:49am UTC](https://www.ruby-forum.com/t/re-script-generate-cucumber-fails-in-rails-2-3-5-and-ruby-1-9-1/180894 "2009-12-31T02:49:41Z")

</div>

Seems to me that we found the error. You cucumer.rb is missing. Send you mine I it help somehow: Edit at your own peril - it’s recommended to regenerate this file in the future when you upgrade to a newer version of …

---

## [Accounts and Users](https://www.ruby-forum.com/t/accounts-and-users/180876)

<div class="topic-metadata">

**Author:** [@scrozier](https://www.ruby-forum.com/u/scrozier)\
**Replies:** 2\
**Last updated:** [December 31, 2009, 2:11am UTC](https://www.ruby-forum.com/t/accounts-and-users/180876 "2009-12-31T02:11:53Z")

</div>

I’m currently using Authlogic to authenticate my app. I have a accounts and user model, where accounts has\_many :users and user belongs\_to :account. I’m having trouble understanding how I should logically add this f…

---

## [Nested attributes and initialization](https://www.ruby-forum.com/t/nested-attributes-and-initialization/180851)

<div class="topic-metadata">

**Author:** [@bradley](https://www.ruby-forum.com/u/bradley)\
**Replies:** 1\
**Last updated:** [December 31, 2009, 1:49am UTC](https://www.ruby-forum.com/t/nested-attributes-and-initialization/180851 "2009-12-31T01:49:24Z")

</div>

I have a user model that has a few different roles (say a client and an agent) The agent has some extra relationships not found in a client role (has\_one :agent\_profile, for instance) I have an edit\_profile action fo…

---

## [Re: script/generate cucumber fails in Rails 2.3.5 and Ruby 1.9.1](https://www.ruby-forum.com/t/re-script-generate-cucumber-fails-in-rails-2-3-5-and-ruby-1-9-1/180892)

<div class="topic-metadata">

**Author:** [@christoph\_j](https://www.ruby-forum.com/u/christoph_j)\
**Replies:** 1\
**Last updated:** [December 31, 2009, 1:34am UTC](https://www.ruby-forum.com/t/re-script-generate-cucumber-fails-in-rails-2-3-5-and-ruby-1-9-1/180892 "2009-12-31T01:34:46Z")

</div>

Try to reinstall cucumber and cucumber-rails. How does your environments/cucumber.rb looks like? Can you post it. I have no futher tips. Sorry. Cheers, Chris – You received this message because you are subscribed …

---

## [Re: script/generate cucumber fails in Rails 2.3.5 and Ruby 1.9.1](https://www.ruby-forum.com/t/re-script-generate-cucumber-fails-in-rails-2-3-5-and-ruby-1-9-1/180888)

<div class="topic-metadata">

**Author:** [@christoph\_j](https://www.ruby-forum.com/u/christoph_j)\
**Replies:** 1\
**Last updated:** [December 31, 2009, 1:23am UTC](https://www.ruby-forum.com/t/re-script-generate-cucumber-fails-in-rails-2-3-5-and-ruby-1-9-1/180888 "2009-12-31T01:23:39Z")

</div>

thanks eric, that’s what I saw before you mailed. It’s so late and I’m coding for over 12 hours you know. Of course it cucumber-rails. Sorry just copied & pasted it =\> stupid\_me. Chris – You received this message…

---

## [Re: Error running Mongrel on Ruby 1.9](https://www.ruby-forum.com/t/re-error-running-mongrel-on-ruby-1-9/180889)

<div class="topic-metadata">

**Author:** [@christoph\_j](https://www.ruby-forum.com/u/christoph_j)\
**Replies:** 0\
**Last updated:** [December 31, 2009, 12:49am UTC](https://www.ruby-forum.com/t/re-error-running-mongrel-on-ruby-1-9/180889 "2009-12-31T00:49:41Z")

</div>

looks to me like a Windows Mongrel problem. But I’m not an expert in that. I run Linux, sorry. Maybe install the mongrel gem again with some other options (I got ruby & rails once run on windows and I remember that on …

---

## [Re: script/generate cucumber fails in Rails 2.3.5 and Ruby 1.9.1](https://www.ruby-forum.com/t/re-script-generate-cucumber-fails-in-rails-2-3-5-and-ruby-1-9-1/180882)

<div class="topic-metadata">

**Author:** [@christoph\_j](https://www.ruby-forum.com/u/christoph_j)\
**Replies:** 2\
**Last updated:** [December 31, 2009, 12:36am UTC](https://www.ruby-forum.com/t/re-script-generate-cucumber-fails-in-rails-2-3-5-and-ruby-1-9-1/180882 "2009-12-31T00:36:13Z")

</div>

Have you added cucumber to your environment(s)? From Railscasts.com (#155) as an example. Adjust as you need. config/environments/test.rb config.gem “rspec”, :lib =\> false, :version =\> “\>=1.2.2” config.gem “rspec-rai…

---

## [Re: Accounts and Users](https://www.ruby-forum.com/t/re-accounts-and-users/180886)

<div class="topic-metadata">

**Author:** [@christoph\_j](https://www.ruby-forum.com/u/christoph_j)\
**Replies:** 0\
**Last updated:** [December 31, 2009, 12:35am UTC](https://www.ruby-forum.com/t/re-accounts-and-users/180886 "2009-12-31T00:35:38Z")

</div>

Sorry Steve but I don’t really understand this: " I’m stuck at how I’m supposed to add the creation on the new account in my user \> create method." What do you mean by this. Can you write more text? Some prose, or so…

---

## [Understanding â€œcreate\_associationâ€ and i nvalid objects](https://www.ruby-forum.com/t/understanding-a-oecreate-associationa-and-i-nvalid-objects/180679)

<div class="topic-metadata">

**Author:** [@evanchaney](https://www.ruby-forum.com/u/evanchaney)\
**Replies:** 2\
**Last updated:** [December 31, 2009, 12:28am UTC](https://www.ruby-forum.com/t/understanding-a-oecreate-associationa-and-i-nvalid-objects/180679 "2009-12-31T00:28:36Z")

</div>

The documentation on the “create\_association” method of the “belongs\_to” association reads: create\_association(attributes = {}) Returns a new object of the associated type that has been instantiated with attributes, …

---

## [Rendering Partials as Objects with Parameters?](https://www.ruby-forum.com/t/rendering-partials-as-objects-with-parameters/180869)

<div class="topic-metadata">

**Author:** [@LeonS](https://www.ruby-forum.com/u/LeonS)\
**Replies:** 2\
**Last updated:** [December 31, 2009, 12:24am UTC](https://www.ruby-forum.com/t/rendering-partials-as-objects-with-parameters/180869 "2009-12-31T00:24:30Z")

</div>

Hi, i try to understand the rendering of partials as objects. So, lets imagine i’ve got Threads with posts , and i will just render the posts of one thread. The code to render all posts will seems to be something lik…

---

## [Error running Mongrel on Ruby 1.9](https://www.ruby-forum.com/t/error-running-mongrel-on-ruby-1-9/180883)

<div class="topic-metadata">

**Author:** [@amabdelsalam](https://www.ruby-forum.com/u/amabdelsalam)\
**Replies:** 0\
**Last updated:** [December 31, 2009, 12:22am UTC](https://www.ruby-forum.com/t/error-running-mongrel-on-ruby-1-9/180883 "2009-12-31T00:22:45Z")

</div>

Hi, I have a problem running Mongrel, I'm using the latest ruby 1.9 and rails 2.3.5 when I start the server (I'm using Aptana IDE), on mongrel, here is the output: C:/Ruby19/lib/ruby/gems/1.9.1/gems/actives…

---

## [Variable scope and RESTful methods](https://www.ruby-forum.com/t/variable-scope-and-restful-methods/180840)

<div class="topic-metadata">

**Author:** [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Replies:** 2\
**Last updated:** [December 31, 2009, 12:11am UTC](https://www.ruby-forum.com/t/variable-scope-and-restful-methods/180840 "2009-12-31T00:11:01Z")

</div>

I have the usual methods in a RESTful implementation: index, new In the index method I have a variable @new\_link which is not nil . At the end of the index method, I tested the value with logger.info @new\_link.inspe…

---

## [Best Linux Distro for Rails App?](https://www.ruby-forum.com/t/best-linux-distro-for-rails-app/180864)

<div class="topic-metadata">

**Author:** [@robert](https://www.ruby-forum.com/u/robert)\
**Replies:** 2\
**Last updated:** [December 30, 2009, 11:49pm UTC](https://www.ruby-forum.com/t/best-linux-distro-for-rails-app/180864 "2009-12-30T23:49:56Z")

</div>

After a bad experience trying to get even the simplest Rails application running at Lunarpages, I’m moving to Slicehost. Does anyone have an opinion as to which of their Linux distros to use for a fairly high-traffic …

---

## [Additional params arguments through routes.rb](https://www.ruby-forum.com/t/additional-params-arguments-through-routes-rb/180878)

<div class="topic-metadata">

**Author:** [@chrisfinne](https://www.ruby-forum.com/u/chrisfinne)\
**Replies:** 0\
**Last updated:** [December 30, 2009, 11:49pm UTC](https://www.ruby-forum.com/t/additional-params-arguments-through-routes-rb/180878 "2009-12-30T23:49:56Z")

</div>

I have a controller that I’d like to exist under two different URIs – call it a tags controller, mapped to /tags and /my\_profile/tags … the second URI is connected as a singleton resource. The only difference betwee…

---

## [Sharepoint integration](https://www.ruby-forum.com/t/sharepoint-integration/180873)

<div class="topic-metadata">

**Author:** [@David\_Souza](https://www.ruby-forum.com/u/David_Souza)\
**Replies:** 0\
**Last updated:** [December 30, 2009, 11:37pm UTC](https://www.ruby-forum.com/t/sharepoint-integration/180873 "2009-12-30T23:37:37Z")

</div>

Hey everyone, Was wondering if there was any development on a ruby library for accessing Sharepoint hosted data? I’ve got a possible project coming up for a company that currently uses Sharepoint for an intranet and …

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

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