# Rails

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

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

---

## [Redirecting From default page](https://www.ruby-forum.com/t/redirecting-from-default-page/142220)

<div class="topic-metadata">

**Author:** [@rocknrollcar](https://www.ruby-forum.com/u/rocknrollcar)\
**Replies:** 8\
**Last updated:** [July 5, 2008, 7:06am UTC](https://www.ruby-forum.com/t/redirecting-from-default-page/142220 "2008-07-05T07:06:24Z")

</div>

Hi. I am new to Rails. I am doing a web project for my school. It has models like Page, Student and Forum. Page model is for creating pages like home page, help, contact, about, feedback, etc. My route has my home pag…

---

## [Loading gem from vendor/gems in rake](https://www.ruby-forum.com/t/loading-gem-from-vendor-gems-in-rake/142248)

<div class="topic-metadata">

**Author:** [@dkam](https://www.ruby-forum.com/u/dkam)\
**Replies:** 0\
**Last updated:** [July 5, 2008, 6:28am UTC](https://www.ruby-forum.com/t/loading-gem-from-vendor-gems-in-rake/142248 "2008-07-05T06:28:55Z")

</div>

Using Rails 2.1 gem dependencies, is there a way to load a gem that is unpacked in vendor/gems from a Rake task? I have a gem that I only want to use from Rake, so I don’t want to put it in environment.rb using config…

---

## [Routing and Parameters](https://www.ruby-forum.com/t/routing-and-parameters/142233)

<div class="topic-metadata">

**Author:** [@sjames](https://www.ruby-forum.com/u/sjames)\
**Replies:** 4\
**Last updated:** [July 5, 2008, 3:36am UTC](https://www.ruby-forum.com/t/routing-and-parameters/142233 "2008-07-05T03:36:29Z")

</div>

Greetings. I have a route something like this: map.calendar ‘/tasks/:year/:month’, :controller =\> ‘tasks’, :action =\> ‘calendar’, :year =\> /\\d{4}/, :month =\> /\\d{2}/ (Ignore the obvious problems of invalid data.) …

---

## [Q: how to list one model in a different model's view form](https://www.ruby-forum.com/t/q-how-to-list-one-model-in-a-different-models-view-form/142075)

<div class="topic-metadata">

**Author:** [@toro04](https://www.ruby-forum.com/u/toro04)\
**Replies:** 11\
**Last updated:** [July 5, 2008, 3:25am UTC](https://www.ruby-forum.com/t/q-how-to-list-one-model-in-a-different-models-view-form/142075 "2008-07-05T03:25:30Z")

</div>

Hi Guys, i have a the following models: job has\_many :job\_divisions has\_many :divisions division belongs\_to :job has\_many :job\_divisions job\_division belongs\_to :job belongs\_to :division When I do a Job.new I …

---

## [Expensive request processing](https://www.ruby-forum.com/t/expensive-request-processing/142017)

<div class="topic-metadata">

**Author:** [@bpartridge](https://www.ruby-forum.com/u/bpartridge)\
**Replies:** 2\
**Last updated:** [July 5, 2008, 1:34am UTC](https://www.ruby-forum.com/t/expensive-request-processing/142017 "2008-07-05T01:34:52Z")

</div>

I’m trying to decide between Rails and Seam (a Java framework) for an application whose main traffic will be PUT requests, with lengthy text parameters that will need to be parsed, split apart, and update multiple rec…

---

## [Rspec upgrade from 1.2.6 to 2.0.2 and/or 2.1.0](https://www.ruby-forum.com/t/rspec-upgrade-from-1-2-6-to-2-0-2-and-or-2-1-0/142237)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 1\
**Last updated:** [July 5, 2008, 12:45am UTC](https://www.ruby-forum.com/t/rspec-upgrade-from-1-2-6-to-2-0-2-and-or-2-1-0/142237 "2008-07-05T00:45:15Z")

</div>

I am trying to upgrade a Rails 1.2.6 application to either 2.0.2 or (preferably) 2.1.0 whichever works. The application has a hugh number of rspec tests written. I am having problems getting past the first base. De…

---

## [Save information for parent child objects](https://www.ruby-forum.com/t/save-information-for-parent-child-objects/142228)

<div class="topic-metadata">

**Author:** [@mitch\_newbie](https://www.ruby-forum.com/u/mitch_newbie)\
**Replies:** 1\
**Last updated:** [July 5, 2008, 12:39am UTC](https://www.ruby-forum.com/t/save-information-for-parent-child-objects/142228 "2008-07-05T00:39:20Z")

</div>

I have a user table and a user\_details table. user\_details belongs\_to :user #user\_id foreign key in this table user has\_one :user\_detail I have two forms. First from collects details about the user: first\_name l…

---

## [Rake db:migrate:redo](https://www.ruby-forum.com/t/rake-dbredo/142182)

<div class="topic-metadata">

**Author:** [@ole](https://www.ruby-forum.com/u/ole)\
**Replies:** 4\
**Last updated:** [July 5, 2008, 12:06am UTC](https://www.ruby-forum.com/t/rake-dbredo/142182 "2008-07-05T00:06:20Z")

</div>

rake --describe db:migrate:redo says: Rollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x Presumably that means, it runs #down and then #up. But I’ve put c…

---

## [\[ANN\] Singleton Validations plugin](https://www.ruby-forum.com/t/ann-singleton-validations-plugin/142238)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 1\
**Last updated:** [July 4, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/ann-singleton-validations-plugin/142238 "2008-07-04T23:33:13Z")

</div>

Hi – Inspired by a question from ‘mickey’ on IRC (mickey, where art thou?), I have written a plugin that lets you do class-style validations on individual ActiveRecord objects, like this: t = Thing.new t.validates\_s…

---

## [Confused about Git](https://www.ruby-forum.com/t/confused-about-git/142235)

<div class="topic-metadata">

**Author:** [@wemagor](https://www.ruby-forum.com/u/wemagor)\
**Replies:** 3\
**Last updated:** [July 4, 2008, 11:25pm UTC](https://www.ruby-forum.com/t/confused-about-git/142235 "2008-07-04T23:25:49Z")

</div>

I always try to follow best practices, so I’m in the process of learning Git since the Rails community seems to have favored that over Subversion (I know the basics of svn as it stands right now). I have to admit, I…

---

## [Error deleting object with has many relationship](https://www.ruby-forum.com/t/error-deleting-object-with-has-many-relationship/142234)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 1\
**Last updated:** [July 4, 2008, 10:28pm UTC](https://www.ruby-forum.com/t/error-deleting-object-with-has-many-relationship/142234 "2008-07-04T22:28:48Z")

</div>

Hi, Im getting this strange error when trying to delete an employee, im guessing its something to do with one of the has\_many relationships but how do i know which one. ndefined method \`table\_name’ for File:Class ve…

---

## [Unable to create or save session after app runs 24 hours](https://www.ruby-forum.com/t/unable-to-create-or-save-session-after-app-runs-24-hours/142232)

<div class="topic-metadata">

**Author:** [@scottrutherford](https://www.ruby-forum.com/u/scottrutherford)\
**Replies:** 2\
**Last updated:** [July 4, 2008, 10:20pm UTC](https://www.ruby-forum.com/t/unable-to-create-or-save-session-after-app-runs-24-hours/142232 "2008-07-04T22:20:21Z")

</div>

Hi there, I know there is a lot of threads on here about sessions, but I could not seem to find anyone experiencing this same issue, so alas I made a new thread :slight\_smile: Ultimately I am stumped. I am by no mea…

---

## [Production: no relevant logs to fix this problem](https://www.ruby-forum.com/t/production-no-relevant-logs-to-fix-this-problem/142203)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 3\
**Last updated:** [July 4, 2008, 9:25pm UTC](https://www.ruby-forum.com/t/production-no-relevant-logs-to-fix-this-problem/142203 "2008-07-04T21:25:48Z")

</div>

Hi, I’m moving my application to production. There’s some cases where I get: Application error Rails application failed to start properly But the production log shows no problems: Rendering template within layouts/…

---

## [Engines and rails 2.1.0](https://www.ruby-forum.com/t/engines-and-rails-2-1-0/142230)

<div class="topic-metadata">

**Author:** [@acras](https://www.ruby-forum.com/u/acras)\
**Replies:** 0\
**Last updated:** [July 4, 2008, 9:09pm UTC](https://www.ruby-forum.com/t/engines-and-rails-2-1-0/142230 "2008-07-04T21:09:44Z")

</div>

Does anyone had issues on running an app using engines under rails 2.1.0? I had this: :in alias\_method': undefined method initialize\_schema\_information’ for module ActiveRecord::ConnectionAdapters::SchemaStatements' …

---

## [Split form values](https://www.ruby-forum.com/t/split-form-values/142200)

<div class="topic-metadata">

**Author:** [@jaiganez](https://www.ruby-forum.com/u/jaiganez)\
**Replies:** 1\
**Last updated:** [July 4, 2008, 8:35pm UTC](https://www.ruby-forum.com/t/split-form-values/142200 "2008-07-04T20:35:38Z")

</div>

i ve form like \<% form\_tag ‘create’, :multipart =\> true do %\> Title: \<%=text\_field 'show','title'%\> Mobile Type: \<%=text\_field 'show','mobilename'%\> Price: \<%=text\_field 'show','price'%\> Description: \<%=text\_field …

---

## [Multi User Blog](https://www.ruby-forum.com/t/multi-user-blog/142042)

<div class="topic-metadata">

**Author:** [@uberkorp](https://www.ruby-forum.com/u/uberkorp)\
**Replies:** 6\
**Last updated:** [July 4, 2008, 7:52pm UTC](https://www.ruby-forum.com/t/multi-user-blog/142042 "2008-07-04T19:52:20Z")

</div>

Hi everyone, I’m sorry to ask this as I am such a newb at ROR and understanding it myself. I have an application being developed for me, and one of the purposes for my users is to be able to blog about a purchase of a…

---

## [Rspec, rspec\_on\_rails, ZenTest](https://www.ruby-forum.com/t/rspec-rspec-on-rails-zentest/138793)

<div class="topic-metadata">

**Author:** [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Replies:** 1\
**Last updated:** [July 4, 2008, 7:50pm UTC](https://www.ruby-forum.com/t/rspec-rspec-on-rails-zentest/138793 "2008-07-04T19:50:31Z")

</div>

Is there any canonical document as to what versions of rspec, rspec\_on\_rails and ZenTest should be used for each version of Rails? I’ve got a 1.2.6 Rails app and can’t find the right mix of these. Everytime I run “aut…

---

## [Testing page.alert](https://www.ruby-forum.com/t/testing-page-alert/139693)

<div class="topic-metadata">

**Author:** [@tamc](https://www.ruby-forum.com/u/tamc)\
**Replies:** 1\
**Last updated:** [July 4, 2008, 7:45pm UTC](https://www.ruby-forum.com/t/testing-page-alert/139693 "2008-07-04T19:45:15Z")

</div>

Hello, Testing newbie here. I have some AJAX code that would render an error message back to the host using page.alert. How would I test that? Personally I use RSpec, but Test::Unit is also fine. Thanks. If some e…

---

## [Attachment\_fu and validations](https://www.ruby-forum.com/t/attachment-fu-and-validations/142221)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 1\
**Last updated:** [July 4, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/attachment-fu-and-validations/142221 "2008-07-04T19:32:58Z")

</div>

Hi I have a model with the attachment\_fu data and two other fields (title and description). My form contains the three fields: title, description, and uploaded\_data. When I submit a form with a valid uploaded file a…

---

## [Validations without save](https://www.ruby-forum.com/t/validations-without-save/142212)

<div class="topic-metadata">

**Author:** [@mitch\_newbie](https://www.ruby-forum.com/u/mitch_newbie)\
**Replies:** 6\
**Last updated:** [July 4, 2008, 6:56pm UTC](https://www.ruby-forum.com/t/validations-without-save/142212 "2008-07-04T18:56:18Z")

</div>

the validates\_format and other validations are called when the .save function is called on an object. If I want the validations to be called without saving is there a way to do this? Do I user .create? Thank you in …

---

## [Mysql gem warning on ubuntu](https://www.ruby-forum.com/t/mysql-gem-warning-on-ubuntu/142148)

<div class="topic-metadata">

**Author:** [@ppjunty](https://www.ruby-forum.com/u/ppjunty)\
**Replies:** 6\
**Last updated:** [July 4, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/mysql-gem-warning-on-ubuntu/142148 "2008-07-04T18:52:52Z")

</div>

i just deployed my app on ubuntu with passenger. i installed the mysql gem as follows: $ sudo gem install mysql Select which gem to install for your platform (i486-linux) mysql 2.7.3 (mswin32) mysql 2.7.1 (mswin32) m…

---

## [Saving record and it's association](https://www.ruby-forum.com/t/saving-record-and-its-association/142218)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 1\
**Last updated:** [July 4, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/saving-record-and-its-association/142218 "2008-07-04T18:20:17Z")

</div>

Hi all, I have a user that has one activation. When a user is created I want to generate an activation key I tried in the create usercontroller @user = User.new(params\[:user\]) @user.activation \<\< Activation.new() I…

---

## [Timestamp of file upload](https://www.ruby-forum.com/t/timestamp-of-file-upload/142214)

<div class="topic-metadata">

**Author:** [@Iain\_A](https://www.ruby-forum.com/u/Iain_A)\
**Replies:** 0\
**Last updated:** [July 4, 2008, 5:29pm UTC](https://www.ruby-forum.com/t/timestamp-of-file-upload/142214 "2008-07-04T17:29:52Z")

</div>

Hello, Does anyone know if it possible to find the last modified time of a file that has just been uploaded. I.e. I save a file on my computer at Friday 4th July 1.40pm. I then upload this file 1 hour later. I have t…

---

## [Logger](https://www.ruby-forum.com/t/logger/142209)

<div class="topic-metadata">

**Author:** [@mariek](https://www.ruby-forum.com/u/mariek)\
**Replies:** 1\
**Last updated:** [July 4, 2008, 4:47pm UTC](https://www.ruby-forum.com/t/logger/142209 "2008-07-04T16:47:06Z")

</div>

I need to modify a little the output of my \*.log files. So I wanted to ask if it possible to generate some identifier(based on some random value) AND then add it for each line that correspond to an error that appeare…

---

## [Rails error message from script/about](https://www.ruby-forum.com/t/rails-error-message-from-script-about/142207)

<div class="topic-metadata">

**Author:** [@jasonb](https://www.ruby-forum.com/u/jasonb)\
**Replies:** 0\
**Last updated:** [July 4, 2008, 4:37pm UTC](https://www.ruby-forum.com/t/rails-error-message-from-script-about/142207 "2008-07-04T16:37:17Z")

</div>

ive installed redmine as per their instructions and now im getting this error message. did i do something wrong or is this on their end? thank you! RAILS\_ENV=production script/about /usr/local/lib/ruby/gems/1.8/gems…

---

## [How to write the method before\_destroy and the test](https://www.ruby-forum.com/t/how-to-write-the-method-before-destroy-and-the-test/141964)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 2\
**Last updated:** [July 4, 2008, 4:11pm UTC](https://www.ruby-forum.com/t/how-to-write-the-method-before-destroy-and-the-test/141964 "2008-07-04T16:11:47Z")

</div>

How to write the method before\_destroy? Here is my code: def before\_destroy errors.add(:isdefault,“Can’t destroy default record”) if self.isdefault return false end or I should write it like below? def before\_des…

---

## [How do I exclude the /log directory from svn repository?](https://www.ruby-forum.com/t/how-do-i-exclude-the-log-directory-from-svn-repository/142199)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 3\
**Last updated:** [July 4, 2008, 4:03pm UTC](https://www.ruby-forum.com/t/how-do-i-exclude-the-log-directory-from-svn-repository/142199 "2008-07-04T16:03:17Z")

</div>

Every open source program comes with a vital instruction(s) that is (are) deliberately left out of the documentation so as to differentiate the pros from the newbies. In this case the svn documentation doesn’t tell yo…

---

## [Why is Ruby better than Python managing language? (is it?)](https://www.ruby-forum.com/t/why-is-ruby-better-than-python-managing-language-is-it/142204)

<div class="topic-metadata">

**Author:** [@CMV](https://www.ruby-forum.com/u/CMV)\
**Replies:** 0\
**Last updated:** [July 4, 2008, 3:47pm UTC](https://www.ruby-forum.com/t/why-is-ruby-better-than-python-managing-language-is-it/142204 "2008-07-04T15:47:13Z")

</div>

Hi there, I’m starting to develop an application that is very demanding in semantic capabilities, lots of relations between concepts… I heard that ruby was better than any other programming language to manage languag…

---

## [Datatype problem when using ActiveRecord with Oracle](https://www.ruby-forum.com/t/datatype-problem-when-using-activerecord-with-oracle/142202)

<div class="topic-metadata">

**Author:** [@Niranjan](https://www.ruby-forum.com/u/Niranjan)\
**Replies:** 1\
**Last updated:** [July 4, 2008, 3:23pm UTC](https://www.ruby-forum.com/t/datatype-problem-when-using-activerecord-with-oracle/142202 "2008-07-04T15:23:48Z")

</div>

Hey, I have connected to the oracle db using ActiveRecord and am trying to retrieve tuples. I have one attribute that has datatype ‘number(1)’. I found that ActiveRecord maps this attribute to boolean. So it gets a c…

---

## [Functional testing post syntax](https://www.ruby-forum.com/t/functional-testing-post-syntax/142174)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 4\
**Last updated:** [July 4, 2008, 3:16pm UTC](https://www.ruby-forum.com/t/functional-testing-post-syntax/142174 "2008-07-04T15:16:11Z")

</div>

I’m trying to get my tests for a version 1.2.6 Rails app upgraded to version 2.0.2. In my functionals, all my calls to post are now failing. Here’s one: post :login, :login =\> { :email =\> user.email, :password =\> ‘…

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

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