# Rails

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

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

---

## [Upload file to save](https://www.ruby-forum.com/t/upload-file-to-save/161583)

<div class="topic-metadata">

**Author:** [@norricorp](https://www.ruby-forum.com/u/norricorp)\
**Replies:** 4\
**Last updated:** [March 6, 2009, 1:07pm UTC](https://www.ruby-forum.com/t/upload-file-to-save/161583 "2009-03-06T13:07:04Z")

</div>

I am new to rails and am stuck on the above. I have used a mixture of code from the agile web dev with rails book and what I have found with google. I realise there are easier ways to do this with various plugins but …

---

## [How to catch AJAX calls on session-timeout?](https://www.ruby-forum.com/t/how-to-catch-ajax-calls-on-session-timeout/162149)

<div class="topic-metadata">

**Author:** [@mad](https://www.ruby-forum.com/u/mad)\
**Replies:** 2\
**Last updated:** [March 6, 2009, 1:01pm UTC](https://www.ruby-forum.com/t/how-to-catch-ajax-calls-on-session-timeout/162149 "2009-03-06T13:01:11Z")

</div>

hallo everybody, my problem is the following: on one of our rails-apps we implemented session-expiry, so that the user gets redirected to our login-page whenever his session has timed- out. this is working fine for n…

---

## [Routes.rb ... killing the apps?](https://www.ruby-forum.com/t/routes-rb-killing-the-apps/161928)

<div class="topic-metadata">

**Author:** [@ialuronico](https://www.ruby-forum.com/u/ialuronico)\
**Replies:** 5\
**Last updated:** [March 6, 2009, 12:28pm UTC](https://www.ruby-forum.com/t/routes-rb-killing-the-apps/161928 "2009-03-06T12:28:16Z")

</div>

create a RoR project on Netbean 2)generate scaffold car name:string power:string db:create 4:)db:migrate Run project now on http://localhost:3000/cars you can find the app and play a little , the app …

---

## [Errors when asking for index.html](https://www.ruby-forum.com/t/errors-when-asking-for-index-html/162148)

<div class="topic-metadata">

**Author:** [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Replies:** 2\
**Last updated:** [March 6, 2009, 12:05pm UTC](https://www.ruby-forum.com/t/errors-when-asking-for-index-html/162148 "2009-03-06T12:05:50Z")

</div>

Hi All I’m trying setup a RoR project. So far I’ve only done some HTML stuff (nothing with controller, models etc) So I have my RoR environment (via $\> rails my\_project) but when I ask for http://127.0.0.1:3000 I ge…

---

## [SQL Console to View](https://www.ruby-forum.com/t/sql-console-to-view/162167)

<div class="topic-metadata">

**Author:** [@luboherko](https://www.ruby-forum.com/u/luboherko)\
**Replies:** 0\
**Last updated:** [March 6, 2009, 11:52am UTC](https://www.ruby-forum.com/t/sql-console-to-view/162167 "2009-03-06T11:52:02Z")

</div>

Hi, I have one request… is there any way, how can I display SQL console results in view? I mean, for example I have PostgreSQL server, and a simple form, where user can put any SQL command, which will be executed via …

---

## [Error during rake db:migrate](https://www.ruby-forum.com/t/error-during-rake-db-migrate/161767)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 2\
**Last updated:** [March 6, 2009, 11:50am UTC](https://www.ruby-forum.com/t/error-during-rake-db-migrate/161767 "2009-03-06T11:50:31Z")

</div>

Hi, I am using rails 2.2. I am getting an error during migration. Whenever I am running “rake db:migrate”, I am getting an error "(in E:/Rails2.2/rails\_demo) !!! The bundled mysql.rb driver has been removed from Rail…

---

## [RoR for dummies .. from nothing to knowlege](https://www.ruby-forum.com/t/ror-for-dummies-from-nothing-to-knowlege/161878)

<div class="topic-metadata">

**Author:** [@ialuronico](https://www.ruby-forum.com/u/ialuronico)\
**Replies:** 11\
**Last updated:** [March 6, 2009, 11:43am UTC](https://www.ruby-forum.com/t/ror-for-dummies-from-nothing-to-knowlege/161878 "2009-03-06T11:43:15Z")

</div>

Well, i’m like a dinosaur … an ASP classic procedural developer but I think it’s’ time to evolve, so I started learning RoR and OO/MVC programming. As a First step I did the two “try” on the netbeans website and ever…

---

## [How to populate form dropdown with 2nd item of model](https://www.ruby-forum.com/t/how-to-populate-form-dropdown-with-2nd-item-of-model/162165)

<div class="topic-metadata">

**Author:** [@ChrisYo](https://www.ruby-forum.com/u/ChrisYo)\
**Replies:** 0\
**Last updated:** [March 6, 2009, 11:33am UTC](https://www.ruby-forum.com/t/how-to-populate-form-dropdown-with-2nd-item-of-model/162165 "2009-03-06T11:33:58Z")

</div>

I’m trying to create a dropdown list that’s populated from a model but which has the 2nd item in the model as the default selection. This is possible. Here’s the model snippet. PROPERTY\_TYPES = \[\[‘Choose’, …

---

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

<div class="topic-metadata">

**Author:** [@pesho318i](https://www.ruby-forum.com/u/pesho318i)\
**Replies:** 10\
**Last updated:** [March 6, 2009, 11:31am UTC](https://www.ruby-forum.com/t/database-question/162071 "2009-03-06T11:31:31Z")

</div>

hi, I have to settle a database query problem, and I am a bit confused. I have 4 tables: Members Groups Roles Memberships: member\_id, group\_id, role\_id Messages: concerned\_group\_id, content If a member is logged i…

---

## [Replace](https://www.ruby-forum.com/t/replace/226036)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 1\
**Last updated:** [March 6, 2009, 10:50am UTC](https://www.ruby-forum.com/t/replace/226036 "2009-03-06T10:50:57Z")

</div>

What is the easiest way to replace record in database? Better that this: @old = Order.find(5) @new = Order.find(90) @old.x = @new.x @old.y = @new.y @old.z = @new.z @old.w = @new.w @old.p = @new.p @old.r = @new.r …

---

## [Connection Pooling on Rails 2.2.2 (Windows Vista)](https://www.ruby-forum.com/t/connection-pooling-on-rails-2-2-2-windows-vista/162075)

<div class="topic-metadata">

**Author:** [@syuji](https://www.ruby-forum.com/u/syuji)\
**Replies:** 3\
**Last updated:** [March 6, 2009, 9:52am UTC](https://www.ruby-forum.com/t/connection-pooling-on-rails-2-2-2-windows-vista/162075 "2009-03-06T09:52:51Z")

</div>

Hi, I’m trying to setup rails 2.2.2 pool connections to MySQL by specifying the pool setting with 5 in database.yml but no hope… It doesn’t work. My rails is running on webrick in the production mode and the webrick …

---

## [How to speed up ActiveResource?](https://www.ruby-forum.com/t/how-to-speed-up-activeresource/162107)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 4\
**Last updated:** [March 6, 2009, 9:33am UTC](https://www.ruby-forum.com/t/how-to-speed-up-activeresource/162107 "2009-03-06T09:33:17Z")

</div>

Hi all, I’ve been experimenting with sharing resources between 2 rails apps with AR and I just love it. The only downside is that when using AR, my app slows down dramastically. Is there a way to speed things up? Som…

---

## [Redbox basic implementation question](https://www.ruby-forum.com/t/redbox-basic-implementation-question/161929)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 2\
**Last updated:** [March 6, 2009, 9:26am UTC](https://www.ruby-forum.com/t/redbox-basic-implementation-question/161929 "2009-03-06T09:26:24Z")

</div>

When I produce a modal pop up it jams to the top of the page. Also when I insert data it also goes to the top of the page. Any ideas?

---

## [Mysql\_replication\_adapter for Rails 2.2 available](https://www.ruby-forum.com/t/mysql-replication-adapter-for-rails-2-2-available/160821)

<div class="topic-metadata">

**Author:** [@chris\_johnson](https://www.ruby-forum.com/u/chris_johnson)\
**Replies:** 2\
**Last updated:** [March 6, 2009, 8:47am UTC](https://www.ruby-forum.com/t/mysql-replication-adapter-for-rails-2-2-available/160821 "2009-03-06T08:47:39Z")

</div>

Hi there. We use the mysql\_replication\_adapter gem for our Rails app (1 master, 4 slaves). It was incompatible with Rails 2.2, so I updated it and put it on github to share. If you have a database cluster and aren’t …

---

## [New User, cannot run "Hello World" on OS X](https://www.ruby-forum.com/t/new-user-cannot-run-hello-world-on-os-x/162100)

<div class="topic-metadata">

**Author:** [@jsulmar](https://www.ruby-forum.com/u/jsulmar)\
**Replies:** 4\
**Last updated:** [March 6, 2009, 7:51am UTC](https://www.ruby-forum.com/t/new-user-cannot-run-hello-world-on-os-x/162100 "2009-03-06T07:51:57Z")

</div>

I installed a ROR environment on my OS X machine, and I cant’ past “go” with my “hello world” application. Can anyone help me figure this out? Problem Summary I cannot get my “Hello World” application to work. http…

---

## [Actionmailer / Qmail error](https://www.ruby-forum.com/t/actionmailer-qmail-error/162145)

<div class="topic-metadata">

**Author:** [@ntk](https://www.ruby-forum.com/u/ntk)\
**Replies:** 0\
**Last updated:** [March 6, 2009, 7:40am UTC](https://www.ruby-forum.com/t/actionmailer-qmail-error/162145 "2009-03-06T07:40:58Z")

</div>

Hi. I’ve previously used gmail as my outgoing mailserver in actionmailer, but now I wanna switch to using my VPS. (Google is marking my account as spam too often) The error seems to be related to the parameters sent …

---

## [How to give default value to fields in a model while creating model\_name.new()](https://www.ruby-forum.com/t/how-to-give-default-value-to-fields-in-a-model-while-creating-model-name-new/162072)

<div class="topic-metadata">

**Author:** [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Replies:** 2\
**Last updated:** [March 6, 2009, 6:18am UTC](https://www.ruby-forum.com/t/how-to-give-default-value-to-fields-in-a-model-while-creating-model-name-new/162072 "2009-03-06T06:18:58Z")

</div>

am a newbie to rails , I created a model named Employee and in migration i added the following class CreateEmployee \< ActiveRecord::Migration def self.up create\_table :employees do |t| t.string :name, :limit =\> 40…

---

## [RESTful app and refactoring code in different controllers](https://www.ruby-forum.com/t/restful-app-and-refactoring-code-in-different-controllers/161912)

<div class="topic-metadata">

**Author:** [@neubyr](https://www.ruby-forum.com/u/neubyr)\
**Replies:** 3\
**Last updated:** [March 6, 2009, 4:29am UTC](https://www.ruby-forum.com/t/restful-app-and-refactoring-code-in-different-controllers/161912 "2009-03-06T04:29:37Z")

</div>

My application contains following controllers: Topics Items Attachments Users Following are the models: Topics has\_many items Items has\_many attachments Attachments Users has\_many topics Cities has\_many counties Cou…

---

## [ERB not omiting lines](https://www.ruby-forum.com/t/erb-not-omiting-lines/162128)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 2\
**Last updated:** [March 6, 2009, 3:53am UTC](https://www.ruby-forum.com/t/erb-not-omiting-lines/162128 "2009-03-06T03:53:11Z")

</div>

According to numerous ERB tutorials, the following example: \<%- \[1,2,3\].each do |x| -%\> \<%= x %\> \<%- end -%\> should output: 1 2 3 Instead, it outputs: 1 2 3 What am I doing wrong?

---

## [Error while starting rails over "ruby script/server"](https://www.ruby-forum.com/t/error-while-starting-rails-over-ruby-script-server/161607)

<div class="topic-metadata">

**Author:** [@thearchitect](https://www.ruby-forum.com/u/thearchitect)\
**Replies:** 1\
**Last updated:** [March 6, 2009, 3:37am UTC](https://www.ruby-forum.com/t/error-while-starting-rails-over-ruby-script-server/161607 "2009-03-06T03:37:14Z")

</div>

I am very new to Ruby on Rails, but also very excited to get those things started. I downloaded and installed “BitNami RubyStack Stack 1.4-beta-1” which includes all necessary tools for running RoR offline under OS X …

---

## [Before\_filter :action\_name OR :action\_name](https://www.ruby-forum.com/t/before-filter-action-name-or-action-name/162127)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 4\
**Last updated:** [March 6, 2009, 1:52am UTC](https://www.ruby-forum.com/t/before-filter-action-name-or-action-name/162127 "2009-03-06T01:52:10Z")

</div>

Hi there I am wondering if we can use before\_filter in the form of :action OR :action what i want to do is to implement one of the actions, if the first failed, then go to the second when i use before\_filter :actio…

---

## [ActiveResource Save and Create not passing data](https://www.ruby-forum.com/t/activeresource-save-and-create-not-passing-data/162130)

<div class="topic-metadata">

**Author:** [@andrewneal](https://www.ruby-forum.com/u/andrewneal)\
**Replies:** 0\
**Last updated:** [March 6, 2009, 1:02am UTC](https://www.ruby-forum.com/t/activeresource-save-and-create-not-passing-data/162130 "2009-03-06T01:02:42Z")

</div>

Hi all, I am having an issue with ActiveResource that I hope someone can clear up for me. For some reason I can’t get any data passed via the api to persist in the Database. If I create a new object, assign values to…

---

## [Insert some value into a result of a find in a db](https://www.ruby-forum.com/t/insert-some-value-into-a-result-of-a-find-in-a-db/162120)

<div class="topic-metadata">

**Author:** [@cinderedmonkey](https://www.ruby-forum.com/u/cinderedmonkey)\
**Replies:** 2\
**Last updated:** [March 6, 2009, 12:36am UTC](https://www.ruby-forum.com/t/insert-some-value-into-a-result-of-a-find-in-a-db/162120 "2009-03-06T00:36:02Z")

</div>

Hi, I’m trying to insert a string component into what was found by a find search. E.g. do a @version = Version.find(“270”) @path = “somestring” And I would like to stick the @path string into @version then later …

---

## [Modifying output from to\_json to exclude table name](https://www.ruby-forum.com/t/modifying-output-from-to-json-to-exclude-table-name/162124)

<div class="topic-metadata">

**Author:** [@skt](https://www.ruby-forum.com/u/skt)\
**Replies:** 1\
**Last updated:** [March 6, 2009, 12:12am UTC](https://www.ruby-forum.com/t/modifying-output-from-to-json-to-exclude-table-name/162124 "2009-03-06T00:12:37Z")

</div>

Folks, I have a Meal model and Model.find(:all).to\_json returns the following \[{“meal”: {“name”: “Veggies Lasagna”, “id”: 1}}, {“meal”: {“name”: “Chicken Rice”, “id”: 2}}, {“meal”: {“name”: “Noodle Rice”, “id”: 3}}\] W…

---

## [How to render :partials \*before\* the :action has finished?](https://www.ruby-forum.com/t/how-to-render-partials-before-the-action-has-finished/162117)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 3\
**Last updated:** [March 5, 2009, 11:37pm UTC](https://www.ruby-forum.com/t/how-to-render-partials-before-the-action-has-finished/162117 "2009-03-05T23:37:56Z")

</div>

Hi there, I’m sure a lot of you guys have come across this question: How can we render several :partials on a page before the called :action has finished? Basically, my situation is this: When I click on a certain b…

---

## [Rescue runtime error](https://www.ruby-forum.com/t/rescue-runtime-error/162122)

<div class="topic-metadata">

**Author:** [@Rajasekaramya](https://www.ruby-forum.com/u/Rajasekaramya)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 11:36pm UTC](https://www.ruby-forum.com/t/rescue-runtime-error/162122 "2009-03-05T23:36:11Z")

</div>

hi I am trying to rescue the runtime error and trying to access the exception object but it returns \[#,#,#,#\] i dont know why here is my code for rescuing the runtime error in application.rb. rescue\_from Exception…

---

## [Rails UI widgets](https://www.ruby-forum.com/t/rails-ui-widgets/162097)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 2\
**Last updated:** [March 5, 2009, 11:30pm UTC](https://www.ruby-forum.com/t/rails-ui-widgets/162097 "2009-03-05T23:30:53Z")

</div>

Are there any popular plugins/gems for creating/generating rails UI elements such as navigation, progress bar, forms, tabular displays etc? Seems like I am doing that over and over again and differently each time? Le…

---

## [SOAP and RoR](https://www.ruby-forum.com/t/soap-and-ror/162076)

<div class="topic-metadata">

**Author:** [@nuugii](https://www.ruby-forum.com/u/nuugii)\
**Replies:** 3\
**Last updated:** [March 5, 2009, 11:10pm UTC](https://www.ruby-forum.com/t/soap-and-ror/162076 "2009-03-05T23:10:21Z")

</div>

Hey ror riders’ How to working SOAP server,client with Ruby on Rails. Please help me SOAP tutorials

---

## [Validation on password attr\_accessor](https://www.ruby-forum.com/t/validation-on-password-attr-accessor/162121)

<div class="topic-metadata">

**Author:** [@r-a-mueller](https://www.ruby-forum.com/u/r-a-mueller)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 11:03pm UTC](https://www.ruby-forum.com/t/validation-on-password-attr-accessor/162121 "2009-03-05T23:03:54Z")

</div>

I am using the authentication example of Rails Recipes book (around page 135) I am trying to make a sign-up form for it I have the following method def password=(pass) salt=\[Array.new(6){rand(256).chr}.join\].pack(“m…

---

## [Anyone using JRuby with Rmagick?](https://www.ruby-forum.com/t/anyone-using-jruby-with-rmagick/162114)

<div class="topic-metadata">

**Author:** [@InventoryTrackers](https://www.ruby-forum.com/u/InventoryTrackers)\
**Replies:** 3\
**Last updated:** [March 5, 2009, 11:00pm UTC](https://www.ruby-forum.com/t/anyone-using-jruby-with-rmagick/162114 "2009-03-05T23:00:58Z")

</div>

I thought I’d be racy this week and convert a rather large application from Ruby on Rails to JRuby using Netbeans. Learned a lot. Not all the gems come across but the ‘show stopper’ for me was the Rmagick gem which I …

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

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