# Rails

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

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

---

## [Localhost redirect/404](https://www.ruby-forum.com/t/localhost-redirect-404/154573)

<div class="topic-metadata">

**Author:** [@dark-omen](https://www.ruby-forum.com/u/dark-omen)\
**Replies:** 1\
**Last updated:** [December 1, 2008, 10:50pm UTC](https://www.ruby-forum.com/t/localhost-redirect-404/154573 "2008-12-01T22:50:41Z")

</div>

I think this is more of a windows question than rails per se, but I can’t see the answer. I’ve just installed InstantRails 2.0 on my XP machine. Both Apache and mySQL start up fine. I spark up the ‘cookbook’ app, an…

---

## [How do you display your Flash messages in your layouts?](https://www.ruby-forum.com/t/how-do-you-display-your-flash-messages-in-your-layouts/134842)

<div class="topic-metadata">

**Author:** [@kuma](https://www.ruby-forum.com/u/kuma)\
**Replies:** 10\
**Last updated:** [December 1, 2008, 9:28pm UTC](https://www.ruby-forum.com/t/how-do-you-display-your-flash-messages-in-your-layouts/134842 "2008-12-01T21:28:50Z")

</div>

Just curious how others render flash\[:notice\] and others in their views… Most Rails devs I see do something like this (overly simplified example) (application.html.erb) … \<% if flash\[:notice\].blaink? %\> \<%…

---

## [Ecommerce site w/multiple subdomains](https://www.ruby-forum.com/t/ecommerce-site-w-multiple-subdomains/154578)

<div class="topic-metadata">

**Author:** [@wemagor](https://www.ruby-forum.com/u/wemagor)\
**Replies:** 1\
**Last updated:** [December 1, 2008, 9:05pm UTC](https://www.ruby-forum.com/t/ecommerce-site-w-multiple-subdomains/154578 "2008-12-01T21:05:13Z")

</div>

My company is looking at redoing our legacy Classic ASP storefront, and I’m thinking about doing it in Rails since the alternative is to use a PHP-based solution called Magento that, while it looks nice, is insanely a…

---

## [Getting at DBI connection via ActiveRecord connection](https://www.ruby-forum.com/t/getting-at-dbi-connection-via-activerecord-connection/154571)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 1\
**Last updated:** [December 1, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/getting-at-dbi-connection-via-activerecord-connection/154571 "2008-12-01T19:58:06Z")

</div>

I have a standalone batch program that is going to move data between two databases. I am taking advantage of the AR connection semantics in database.yml to get connections to these two DBs. But I want to do all of my…

---

## [Building a Root Route with a Generator](https://www.ruby-forum.com/t/building-a-root-route-with-a-generator/154555)

<div class="topic-metadata">

**Author:** [@sinkva](https://www.ruby-forum.com/u/sinkva)\
**Replies:** 2\
**Last updated:** [December 1, 2008, 7:27pm UTC](https://www.ruby-forum.com/t/building-a-root-route-with-a-generator/154555 "2008-12-01T19:27:23Z")

</div>

I’m looking for a better approach… then what I’m currently doing. I’m working on a generator that will help me setup my base projects with many of my common defaults that I use internally. Now I know that generators h…

---

## [Webrat - click on any (named) html element](https://www.ruby-forum.com/t/webrat-click-on-any-named-html-element/154371)

<div class="topic-metadata">

**Author:** [@clemens](https://www.ruby-forum.com/u/clemens)\
**Replies:** 2\
**Last updated:** [December 1, 2008, 5:16pm UTC](https://www.ruby-forum.com/t/webrat-click-on-any-named-html-element/154371 "2008-12-01T17:16:56Z")

</div>

can I simulate with webrat a click on any named html element? E.g. on a element?

---

## [How ruby script/server work](https://www.ruby-forum.com/t/how-ruby-script-server-work/153155)

<div class="topic-metadata">

**Author:** [@mahmoud\_cs](https://www.ruby-forum.com/u/mahmoud_cs)\
**Replies:** 6\
**Last updated:** [December 1, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/how-ruby-script-server-work/153155 "2008-12-01T17:07:18Z")

</div>

how ruby script/server exactly work in rails?

---

## [Bizon specifications for ruby](https://www.ruby-forum.com/t/bizon-specifications-for-ruby/154535)

<div class="topic-metadata">

**Author:** [@cheef](https://www.ruby-forum.com/u/cheef)\
**Replies:** 2\
**Last updated:** [December 1, 2008, 1:21pm UTC](https://www.ruby-forum.com/t/bizon-specifications-for-ruby/154535 "2008-12-01T13:21:58Z")

</div>

Hi, i am searching an bizon (or rbizon) specification for ruby. Will be very glad for any help =)

---

## [Config.gem dependencies broken?](https://www.ruby-forum.com/t/config-gem-dependencies-broken/154539)

<div class="topic-metadata">

**Author:** [@joergbattermann](https://www.ruby-forum.com/u/joergbattermann)\
**Replies:** 0\
**Last updated:** [December 1, 2008, 1:16pm UTC](https://www.ruby-forum.com/t/config-gem-dependencies-broken/154539 "2008-12-01T13:16:06Z")

</div>

Hello there, I am having some strange problems with my project’s gem dependencies on my staging server and really don’t know where this is coming from. My config.gem entries in the environment.rb file are the followin…

---

## [Functional Test - RJS Template not found](https://www.ruby-forum.com/t/functional-test-rjs-template-not-found/154538)

<div class="topic-metadata">

**Author:** [@florian](https://www.ruby-forum.com/u/florian)\
**Replies:** 0\
**Last updated:** [December 1, 2008, 1:15pm UTC](https://www.ruby-forum.com/t/functional-test-rjs-template-not-found/154538 "2008-12-01T13:15:31Z")

</div>

Hi Everyone, i have the following Problem. For one of my controllers im using a .js.rjs template for the create action. This works fine in development and production mode. However, when i try to run a functional test…

---

## [Find query](https://www.ruby-forum.com/t/find-query/154527)

<div class="topic-metadata">

**Author:** [@golf](https://www.ruby-forum.com/u/golf)\
**Replies:** 4\
**Last updated:** [December 1, 2008, 12:28pm UTC](https://www.ruby-forum.com/t/find-query/154527 "2008-12-01T12:28:30Z")

</div>

Hi, I have user table (last\_activity, last\_activity\_at, …) and friendships table (many to many). What I am trying to do is to show to the user the last actions of his/her friends. @activities = User.find\_by\_username…

---

## [Reset git in app](https://www.ruby-forum.com/t/reset-git-in-app/154482)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 2\
**Last updated:** [December 1, 2008, 11:25am UTC](https://www.ruby-forum.com/t/reset-git-in-app/154482 "2008-12-01T11:25:25Z")

</div>

I would like to reset a git in my app, so I thought that I could either do a reset to start, if that command exists, or delete and do another init? What can I do? If the latter; how do I remove git from an app/reposit…

---

## [Can't restart memcached anymore](https://www.ruby-forum.com/t/cant-restart-memcached-anymore/154528)

<div class="topic-metadata">

**Author:** [@justus](https://www.ruby-forum.com/u/justus)\
**Replies:** 0\
**Last updated:** [December 1, 2008, 10:01am UTC](https://www.ruby-forum.com/t/cant-restart-memcached-anymore/154528 "2008-12-01T10:01:42Z")

</div>

Hi, My memcached has been working perfectly. But all of a sudden I am not able to restart it anymore (RAILS\_ENV=production rake memcached:start), getting this error message: failed to set rlimit for open files. Try …

---

## [Calling save on model object does not generate a sql update](https://www.ruby-forum.com/t/calling-save-on-model-object-does-not-generate-a-sql-update/154524)

<div class="topic-metadata">

**Author:** [@wbwbwb](https://www.ruby-forum.com/u/wbwbwb)\
**Replies:** 1\
**Last updated:** [December 1, 2008, 9:38am UTC](https://www.ruby-forum.com/t/calling-save-on-model-object-does-not-generate-a-sql-update/154524 "2008-12-01T09:38:46Z")

</div>

I have been using RoRfor a few days, so excuse me if this is a basic question. I am trying to save a model object from an action in a controller. When I call a method on the model object that causes a state change, t…

---

## [RuntimeError (Mysql not loaded)](https://www.ruby-forum.com/t/runtimeerror-mysql-not-loaded/154526)

<div class="topic-metadata">

**Author:** [@prem](https://www.ruby-forum.com/u/prem)\
**Replies:** 0\
**Last updated:** [December 1, 2008, 9:36am UTC](https://www.ruby-forum.com/t/runtimeerror-mysql-not-loaded/154526 "2008-12-01T09:36:25Z")

</div>

Any idea why mysql gem would not load properly ? log/production.log: RuntimeError (Mysql not loaded): /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active\_record/ connection\_adapters/mysql\_adapter.rb:7:in \`defin…

---

## [Has\_many :through a belongs\_to association](https://www.ruby-forum.com/t/has-many-through-a-belongs-to-association/150881)

<div class="topic-metadata">

**Author:** [@walt](https://www.ruby-forum.com/u/walt)\
**Replies:** 20\
**Last updated:** [December 1, 2008, 7:58am UTC](https://www.ruby-forum.com/t/has-many-through-a-belongs-to-association/150881 "2008-12-01T07:58:41Z")

</div>

I am on Rails 2.0.2 (not 2.1.x due to a couple of tickets) and if this topic is invalid if only I upgraded, please excuse me for not being able to have a perfect overview :frowning: My use case is: users are invited t…

---

## [Writing a method that is accessible from any views as well as any controller](https://www.ruby-forum.com/t/writing-a-method-that-is-accessible-from-any-views-as-well-as-any-controller/154429)

<div class="topic-metadata">

**Author:** [@MrSBless](https://www.ruby-forum.com/u/MrSBless)\
**Replies:** 2\
**Last updated:** [December 1, 2008, 7:15am UTC](https://www.ruby-forum.com/t/writing-a-method-that-is-accessible-from-any-views-as-well-as-any-controller/154429 "2008-12-01T07:15:50Z")

</div>

HI guys where should i have to write the method that it is accessible from any controller and any views. When i write the method in application controller then it is accessible in controller only and when i write it …

---

## [Zip file not downloading properly in IE](https://www.ruby-forum.com/t/zip-file-not-downloading-properly-in-ie/154517)

<div class="topic-metadata">

**Author:** [@raju\_k](https://www.ruby-forum.com/u/raju_k)\
**Replies:** 0\
**Last updated:** [December 1, 2008, 5:42am UTC](https://www.ruby-forum.com/t/zip-file-not-downloading-properly-in-ie/154517 "2008-12-01T05:42:05Z")

</div>

hi, Here is my code. \<% require ‘rubygems’ require ‘zip/zipfilesystem’ content = “” content += “\[InternetShortcut\]\\n” content += “URL=http://www.mysite.com/” content += “\\nIconFile=http://www.mysite.com/favicon…

---

## [How to wait and check for login to an external site](https://www.ruby-forum.com/t/how-to-wait-and-check-for-login-to-an-external-site/154343)

<div class="topic-metadata">

**Author:** [@codecarpenter](https://www.ruby-forum.com/u/codecarpenter)\
**Replies:** 4\
**Last updated:** [December 1, 2008, 4:43am UTC](https://www.ruby-forum.com/t/how-to-wait-and-check-for-login-to-an-external-site/154343 "2008-12-01T04:43:35Z")

</div>

Hi I am working on a event calendar app that I would like a user to be able to save an event they selected to an online calendar such as Google Calendar. I have a link to Google C. a user can click to open it in a ne…

---

## [Setup rails](https://www.ruby-forum.com/t/setup-rails/154456)

<div class="topic-metadata">

**Author:** [@ideale](https://www.ruby-forum.com/u/ideale)\
**Replies:** 11\
**Last updated:** [December 1, 2008, 4:20am UTC](https://www.ruby-forum.com/t/setup-rails/154456 "2008-12-01T04:20:07Z")

</div>

Hi I m begining in Ruby I follow this tuotiriel http://wiki.rubyonrails.com/rails/pages/RailsOnWindows After I setup, I typed this command gem update --system But it says, this command is unknown ?!!!

---

## [Looking for Ruby on Rails Developer for the Bay Area](https://www.ruby-forum.com/t/looking-for-ruby-on-rails-developer-for-the-bay-area/154458)

<div class="topic-metadata">

**Author:** [@npeterson](https://www.ruby-forum.com/u/npeterson)\
**Replies:** 1\
**Last updated:** [December 1, 2008, 3:44am UTC](https://www.ruby-forum.com/t/looking-for-ruby-on-rails-developer-for-the-bay-area/154458 "2008-12-01T03:44:07Z")

</div>

Hello. I was hoping you might be able to help me out. I’m currently kicking off a project were I need a Ruby on Rails developer. Nancy Peterson 402-214-7646 (Cell) removed\_email\_address@domain.invalid

---

## [Developing code that can go multiple places](https://www.ruby-forum.com/t/developing-code-that-can-go-multiple-places/154457)

<div class="topic-metadata">

**Author:** [@jsimone](https://www.ruby-forum.com/u/jsimone)\
**Replies:** 2\
**Last updated:** [December 1, 2008, 3:35am UTC](https://www.ruby-forum.com/t/developing-code-that-can-go-multiple-places/154457 "2008-12-01T03:35:54Z")

</div>

In my controller code, depending on the values in the database, I may want my user to go one of several places. But when I put more than one redirect in, it gives me the message: Render and/or redirect were called mu…

---

## [Populate a popup menu based on another menu selection](https://www.ruby-forum.com/t/populate-a-popup-menu-based-on-another-menu-selection/154223)

<div class="topic-metadata">

**Author:** [@paulf](https://www.ruby-forum.com/u/paulf)\
**Replies:** 2\
**Last updated:** [December 1, 2008, 3:13am UTC](https://www.ruby-forum.com/t/populate-a-popup-menu-based-on-another-menu-selection/154223 "2008-12-01T03:13:40Z")

</div>

I’m just getting started with RoR and need some help with setting up the following scenario. I have three models:- Jobs, Clients and Contacts A job has one Client which, in turn, has many contacts. When I’m creating …

---

## [How can I use before\_filter?](https://www.ruby-forum.com/t/how-can-i-use-before-filter/154511)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 2\
**Last updated:** [December 1, 2008, 2:00am UTC](https://www.ruby-forum.com/t/how-can-i-use-before-filter/154511 "2008-12-01T02:00:30Z")

</div>

This is my code: before\_filter :authorize, :except=\>:login This is one exception, “login” but I want to add more exceptions. How can I do this?

---

## [Database password encryption](https://www.ruby-forum.com/t/database-password-encryption/154260)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 8\
**Last updated:** [December 1, 2008, 1:55am UTC](https://www.ruby-forum.com/t/database-password-encryption/154260 "2008-12-01T01:55:55Z")

</div>

Hello. I currently have an application deployed and running and just recently I have been asked to encrypt the database password. The password is in the database.yml file. What would be the easiest way of making this…

---

## [How can I set default value for text\_field?](https://www.ruby-forum.com/t/how-can-i-set-default-value-for-text-field/154479)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 2\
**Last updated:** [December 1, 2008, 1:47am UTC](https://www.ruby-forum.com/t/how-can-i-set-default-value-for-text-field/154479 "2008-12-01T01:47:04Z")

</div>

Please this code: \<%= f.label :"Host Name" %\> \<%= f.text\_field :HostName %\> I want to set a default to this text field, how can I do this?

---

## [Newbee- problems installing passenger](https://www.ruby-forum.com/t/newbee-problems-installing-passenger/154506)

<div class="topic-metadata">

**Author:** [@gikuk](https://www.ruby-forum.com/u/gikuk)\
**Replies:** 1\
**Last updated:** [December 1, 2008, 12:35am UTC](https://www.ruby-forum.com/t/newbee-problems-installing-passenger/154506 "2008-12-01T00:35:47Z")

</div>

I try to install passenger on win XP sp3 I have installed ruby 1.8.6 (2008-08-11 patchlevel 287) \[i386-mswin32\] gem version 1.3.1 without problems. I don’t have a web server installed yet, and no database. I don’t …

---

## [Ensuring controller actions have necessary params](https://www.ruby-forum.com/t/ensuring-controller-actions-have-necessary-params/154502)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 4\
**Last updated:** [December 1, 2008, 12:32am UTC](https://www.ruby-forum.com/t/ensuring-controller-actions-have-necessary-params/154502 "2008-12-01T00:32:51Z")

</div>

The usual CRUD controller actions assume that certain parameters were sent. Let’s use a controller for books as an example: BooksController \< ApplicationController def create @book = Book.new params\[:book\] # …etc… …

---

## ["You have a nil object" problem driving me crazy!](https://www.ruby-forum.com/t/you-have-a-nil-object-problem-driving-me-crazy/154503)

<div class="topic-metadata">

**Author:** [@jdunneuk](https://www.ruby-forum.com/u/jdunneuk)\
**Replies:** 10\
**Last updated:** [November 30, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/you-have-a-nil-object-problem-driving-me-crazy/154503 "2008-11-30T22:35:40Z")

</div>

Hi! I’ve got the following problem: FYI: @dilemmas is populated in the controller via: @dilemmas = Dilemma.find(:all) the Dilemma model has\_many :dilemma\_sides the DilemmaSide model belongs\_to :dilemma the DilemmaS…

---

## [Books recommendation](https://www.ruby-forum.com/t/books-recommendation/154433)

<div class="topic-metadata">

**Author:** [@packat](https://www.ruby-forum.com/u/packat)\
**Replies:** 9\
**Last updated:** [November 30, 2008, 9:18pm UTC](https://www.ruby-forum.com/t/books-recommendation/154433 "2008-11-30T21:18:23Z")

</div>

I am trying to bring myself up-to-speed on rails as fast as possible. I am currently following an online book “Beginning Ruby on Rails” by Steven Holzner. It is a decent book, however the book seems to base on an…

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

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