# Rails

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

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

---

## [Mailing error in Rails 2.3.2](https://www.ruby-forum.com/t/mailing-error-in-rails-2-3-2/226038)

<div class="topic-metadata">

**Author:** [@Siddu](https://www.ruby-forum.com/u/Siddu)\
**Replies:** 3\
**Last updated:** [May 1, 2009, 4:27am UTC](https://www.ruby-forum.com/t/mailing-error-in-rails-2-3-2/226038 "2009-05-01T04:27:54Z")

</div>

Hi, My mails were working with the earlier version of rails ie. Rails 2.0.2. But recently when i upgraded my environment to 2.3.2 the mails stopped working and gave “Error: End of file reached”. But if i send mails …

---

## [Automatically delete oldest post of a specified tag](https://www.ruby-forum.com/t/automatically-delete-oldest-post-of-a-specified-tag/166835)

<div class="topic-metadata">

**Author:** [@bbnnt](https://www.ruby-forum.com/u/bbnnt)\
**Replies:** 6\
**Last updated:** [May 1, 2009, 3:49am UTC](https://www.ruby-forum.com/t/automatically-delete-oldest-post-of-a-specified-tag/166835 "2009-05-01T03:49:45Z")

</div>

I have a form that allows a user to create a post with a title, body, image and a tag. All fields are required using validates\_presence\_of and has\_attached\_file in the model. Since every post has a tag, there is a pag…

---

## [Unable to install RMagick](https://www.ruby-forum.com/t/unable-to-install-rmagick/166917)

<div class="topic-metadata">

**Author:** [@lakshmi](https://www.ruby-forum.com/u/lakshmi)\
**Replies:** 2\
**Last updated:** [May 1, 2009, 2:17am UTC](https://www.ruby-forum.com/t/unable-to-install-rmagick/166917 "2009-05-01T02:17:10Z")

</div>

Hi All, I am new to rmagick and ruby. I am using ruby 1.8.6 version Actually i downloaded rmagic2.9.0 win32 version and i unzipped it and i installed imageMagic-6.4.8. Then from command prompt i gave gem update –syst…

---

## [Dirty objects and overload attribute read/write methods](https://www.ruby-forum.com/t/dirty-objects-and-overload-attribute-read-write-methods/166930)

<div class="topic-metadata">

**Author:** [@syg6](https://www.ruby-forum.com/u/syg6)\
**Replies:** 0\
**Last updated:** [May 1, 2009, 1:50am UTC](https://www.ruby-forum.com/t/dirty-objects-and-overload-attribute-read-write-methods/166930 "2009-05-01T01:50:29Z")

</div>

Hi, I’m trying to use dirty fields but keep running into trouble with attributes that I’ve overloaded. It looks like the dirty.rb module uses read\_attribute and to figure out the old value. Unfortunately this is be…

---

## [Plese have a look on this error and tell me y it comes](https://www.ruby-forum.com/t/plese-have-a-look-on-this-error-and-tell-me-y-it-comes/166854)

<div class="topic-metadata">

**Author:** [@hamidraza](https://www.ruby-forum.com/u/hamidraza)\
**Replies:** 1\
**Last updated:** [May 1, 2009, 1:24am UTC](https://www.ruby-forum.com/t/plese-have-a-look-on-this-error-and-tell-me-y-it-comes/166854 "2009-05-01T01:24:12Z")

</div>

Drive\\Ruby Projects\\ramf\>ruby script/generate model category by/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active\_support/dependencies.rb:440:in load\_missing\_constant initialized constant RAMF::OperationProcessorsM…

---

## [Is possible limit the number of has\_many objects?](https://www.ruby-forum.com/t/is-possible-limit-the-number-of-has-many-objects/166868)

<div class="topic-metadata">

**Author:** [@serenobs](https://www.ruby-forum.com/u/serenobs)\
**Replies:** 4\
**Last updated:** [May 1, 2009, 12:51am UTC](https://www.ruby-forum.com/t/is-possible-limit-the-number-of-has-many-objects/166868 "2009-05-01T00:51:28Z")

</div>

Hi. On the document the has\_many :limit option : The :limit option lets you restrict the total number of objects that will be fetched through an association. I’m a little confused about this explanation. is fetched …

---

## [Polymorphic Associations... confusing. Do I need them?](https://www.ruby-forum.com/t/polymorphic-associations-confusing-do-i-need-them/166737)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 11\
**Last updated:** [May 1, 2009, 12:28am UTC](https://www.ruby-forum.com/t/polymorphic-associations-confusing-do-i-need-them/166737 "2009-05-01T00:28:38Z")

</div>

Hello - I’m writing a rails app that lets people easily put together online tutorials. Each tutorial is a single webpage, and consists primarily of an introduction, a series of worked examples and practice questions, …

---

## [Integrate test process with Rspec and Cucumber in a plugin using Desert](https://www.ruby-forum.com/t/integrate-test-process-with-rspec-and-cucumber-in-a-plugin-using-desert/166898)

<div class="topic-metadata">

**Author:** [@romain\_endelin](https://www.ruby-forum.com/u/romain_endelin)\
**Replies:** 1\
**Last updated:** [April 30, 2009, 11:13pm UTC](https://www.ruby-forum.com/t/integrate-test-process-with-rspec-and-cucumber-in-a-plugin-using-desert/166898 "2009-04-30T23:13:13Z")

</div>

Hello, I’m developing some rails plugins with desert, and I would like to use tests with RSpec and Cucumber in the development. RSpec is integrated by default in Desert plugins, but it gives me some bugs. Finally I ha…

---

## [How to search all fields for a string in SQL?](https://www.ruby-forum.com/t/how-to-search-all-fields-for-a-string-in-sql/166924)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [April 30, 2009, 11:06pm UTC](https://www.ruby-forum.com/t/how-to-search-all-fields-for-a-string-in-sql/166924 "2009-04-30T23:06:46Z")

</div>

Using SQL or activerecord I am not sure how to search all fields for a specific value ? I know how to do this by just writing ruby code. To do it in SQL or an activerecord find w/condition, I don’t know how. I actual…

---

## [ActionMailer view template:](https://www.ruby-forum.com/t/actionmailer-view-template/166914)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 3\
**Last updated:** [April 30, 2009, 10:54pm UTC](https://www.ruby-forum.com/t/actionmailer-view-template/166914 "2009-04-30T22:54:05Z")

</div>

I am attempting to generate a plain text list from an array of arrays. If I do this: \<% for currency in @rates -%\> \<% if currency\[2\] == ‘USD’ -%\> \<%= currency\[2\] -%\> … \<%= currency\[4\] %\> \<% end -%\> \<% end -%\> Then…

---

## [RJS not rendering correctly when mime-type is 'iphone'](https://www.ruby-forum.com/t/rjs-not-rendering-correctly-when-mime-type-is-iphone/164688)

<div class="topic-metadata">

**Author:** [@andrew](https://www.ruby-forum.com/u/andrew)\
**Replies:** 7\
**Last updated:** [April 30, 2009, 10:34pm UTC](https://www.ruby-forum.com/t/rjs-not-rendering-correctly-when-mime-type-is-iphone/164688 "2009-04-30T22:34:28Z")

</div>

I have an iPhone version of my site, and for some reason none of the rjs works when viewing the iPhone version. This happens instead: ActionView::MissingTemplate (Missing template controller\_name/ update.erb in view p…

---

## [Mail Daemon Error](https://www.ruby-forum.com/t/mail-daemon-error/160219)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 2\
**Last updated:** [April 30, 2009, 10:19pm UTC](https://www.ruby-forum.com/t/mail-daemon-error/160219 "2009-04-30T22:19:29Z")

</div>

I’m using fetcher\_daemon svn://rubyforge.org/var/svn/slantwise/fetcher/trunk which is a daemon that checks a mail server. When ever I run ‘ruby script/mailer\_daemon\_fetcher start’ it works great, i get my mail but th…

---

## [How-to introduce a rails patch to the dev community?](https://www.ruby-forum.com/t/how-to-introduce-a-rails-patch-to-the-dev-community/166909)

<div class="topic-metadata">

**Author:** [@mekdigital](https://www.ruby-forum.com/u/mekdigital)\
**Replies:** 4\
**Last updated:** [April 30, 2009, 9:43pm UTC](https://www.ruby-forum.com/t/how-to-introduce-a-rails-patch-to-the-dev-community/166909 "2009-04-30T21:43:24Z")

</div>

Hello, do you usually say ‘hey guys check what I just submitted to lighthouse?’ or just sit and wait ? (#2582 \[PATCH\] ActionView::TextHelper Graceful Truncate - Ruby on Rails - rails) E.

---

## [Image from database and display](https://www.ruby-forum.com/t/image-from-database-and-display/166897)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 2\
**Last updated:** [April 30, 2009, 8:31pm UTC](https://www.ruby-forum.com/t/image-from-database-and-display/166897 "2009-04-30T20:31:48Z")

</div>

I have an image saved in a database and am trying to display it in my view. Here is my code: View- \<%= image\_tag( url\_for :action =\> ‘image’, :id =\> 1, :pseudo\_id =\> @pseudo.id) %\> Controller- @image = Image.find(:…

---

## [Cannot get jquery to work](https://www.ruby-forum.com/t/cannot-get-jquery-to-work/166858)

<div class="topic-metadata">

**Author:** [@anil](https://www.ruby-forum.com/u/anil)\
**Replies:** 6\
**Last updated:** [April 30, 2009, 8:14pm UTC](https://www.ruby-forum.com/t/cannot-get-jquery-to-work/166858 "2009-04-30T20:14:15Z")

</div>

\<%= javascript\_include\_tag “jquery.js” %\> I want to add class to table tag using following command inside script tag. CSS has all the tree class declared .odd { background-color: #fcc; } .even { background-colo…

---

## [Why inconsistent validation with .new?](https://www.ruby-forum.com/t/why-inconsistent-validation-with-new/166904)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 3\
**Last updated:** [April 30, 2009, 7:54pm UTC](https://www.ruby-forum.com/t/why-inconsistent-validation-with-new/166904 "2009-04-30T19:54:54Z")

</div>

(Rails 2.3.2, OS X 10.5, MySQL 5.0.x) I’m seeing some odd behavior that makes no sense to me with respect to adding new empty records to an ActiveRecord object. Assuming (shortened for email): class Article \< AR::Ba…

---

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

<div class="topic-metadata">

**Author:** [@7stud](https://www.ruby-forum.com/u/7stud)\
**Replies:** 11\
**Last updated:** [April 30, 2009, 7:15pm UTC](https://www.ruby-forum.com/t/were-sorry-but-something-went-wrong/166351 "2009-04-30T19:15:06Z")

</div>

Great. I’m in the development environment and that is the error message I get?! What good does that do me? I’m trying to follow along with the examples in AWDWR(3rd.), and I have this method in a store controller: p…

---

## [Goldberg breaks (almost) all functional tests](https://www.ruby-forum.com/t/goldberg-breaks-almost-all-functional-tests/166903)

<div class="topic-metadata">

**Author:** [@Commander\_J](https://www.ruby-forum.com/u/Commander_J)\
**Replies:** 1\
**Last updated:** [April 30, 2009, 6:59pm UTC](https://www.ruby-forum.com/t/goldberg-breaks-almost-all-functional-tests/166903 "2009-04-30T18:59:49Z")

</div>

Anyone else have that if you protect certain actions with Goldberg, you can’t test them anymore? I know some of you are using Goldberg today so how did you manage that? Keep the controllers as simple as possible? Tes…

---

## [Different behaviour on ActiveResorce with JSON or XML](https://www.ruby-forum.com/t/different-behaviour-on-activeresorce-with-json-or-xml/166778)

<div class="topic-metadata">

**Author:** [@pahagon](https://www.ruby-forum.com/u/pahagon)\
**Replies:** 1\
**Last updated:** [April 30, 2009, 6:56pm UTC](https://www.ruby-forum.com/t/different-behaviour-on-activeresorce-with-json-or-xml/166778 "2009-04-30T18:56:54Z")

</div>

I’m doing a request from a Rails app to another Rails app with ActiveResource. When the format on ActiveResource is XML: Content.find(:all)\[0,2\].map(&:attributes) =\> \[ {“updated\_at”=\>Mon Apr 27 15:04:32 UTC 2009, “…

---

## [Alternative coding for decimal arithmetic](https://www.ruby-forum.com/t/alternative-coding-for-decimal-arithmetic/166888)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 4\
**Last updated:** [April 30, 2009, 6:19pm UTC](https://www.ruby-forum.com/t/alternative-coding-for-decimal-arithmetic/166888 "2009-04-30T18:19:07Z")

</div>

I need to transform a decimal fraction received as a string into its reciprocal, also stored as a string. I have come up with this but I would like to know if there exists a better way to accomplish this requirement. …

---

## [Error with test:functionals](https://www.ruby-forum.com/t/error-with-test-functionals/166891)

<div class="topic-metadata">

**Author:** [@Luciano](https://www.ruby-forum.com/u/Luciano)\
**Replies:** 1\
**Last updated:** [April 30, 2009, 6:08pm UTC](https://www.ruby-forum.com/t/error-with-test-functionals/166891 "2009-04-30T18:08:17Z")

</div>

Hello there, I working on my tests but I getting this strange errror: I can see on the database that the object was created but I still got an failure on my test. this is my test code: test “should create artist” do …

---

## [End\_of\_month()](https://www.ruby-forum.com/t/end-of-month/97853)

<div class="topic-metadata">

**Author:** [@sfwalter](https://www.ruby-forum.com/u/sfwalter)\
**Replies:** 1\
**Last updated:** [April 30, 2009, 5:40pm UTC](https://www.ruby-forum.com/t/end-of-month/97853 "2009-04-30T17:40:48Z")

</div>

I noticed that ActiveSupport::CoreExtensions::Time::Calculations::ClassMethods.end\_of\_month() returns a new Time with the time set to 00:00:00. I expected it to return 23:59:59. Am I missing something? Should this b…

---

## [Controller/ URL not working without controller/index](https://www.ruby-forum.com/t/controller-url-not-working-without-controller-index/166864)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [April 30, 2009, 4:49pm UTC](https://www.ruby-forum.com/t/controller-url-not-working-without-controller-index/166864 "2009-04-30T16:49:42Z")

</div>

I’m following a book. It tells me to use: map.resource :controllername in routes But, once I do that, for some reason my main controller/index doesn’t work if I don’t have “/index” behind it. Anyone know why that wou…

---

## [Modernizing my rails chops](https://www.ruby-forum.com/t/modernizing-my-rails-chops/136621)

<div class="topic-metadata">

**Author:** [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Replies:** 4\
**Last updated:** [April 30, 2009, 4:30pm UTC](https://www.ruby-forum.com/t/modernizing-my-rails-chops/136621 "2009-04-30T16:30:21Z")

</div>

I got aboard the rails train last year with my first project and made the decision to not go the RESTful route since it didnt seem necessary at the time and many of the tutorials and books had been written before this…

---

## [Calendars in Rails](https://www.ruby-forum.com/t/calendars-in-rails/166883)

<div class="topic-metadata">

**Author:** [@lyntaff](https://www.ruby-forum.com/u/lyntaff)\
**Replies:** 1\
**Last updated:** [April 30, 2009, 3:48pm UTC](https://www.ruby-forum.com/t/calendars-in-rails/166883 "2009-04-30T15:48:04Z")

</div>

I’m looking for a calendar solution for rails that will highlight individual dates for a bookings model. Is there any suggested rails plugins that can be used with ActiceRecord or is there a nice dhtml/ajax/flash solu…

---

## [Even a simple rails app won't work](https://www.ruby-forum.com/t/even-a-simple-rails-app-wont-work/166865)

<div class="topic-metadata">

**Author:** [@szkizzer](https://www.ruby-forum.com/u/szkizzer)\
**Replies:** 3\
**Last updated:** [April 30, 2009, 1:48pm UTC](https://www.ruby-forum.com/t/even-a-simple-rails-app-wont-work/166865 "2009-04-30T13:48:25Z")

</div>

Hi all, I’m making this post, because I JUST downloaded a ruby executable from ruby website. Then ran the command “gem install rails” to install rails. All was good and done, up until this point. Now I wanted to make …

---

## [ActiveSupport DateTime.to\_time (yesterday vs now)](https://www.ruby-forum.com/t/activesupport-datetime-to-time-yesterday-vs-now/166878)

<div class="topic-metadata">

**Author:** [@robredford](https://www.ruby-forum.com/u/robredford)\
**Replies:** 0\
**Last updated:** [April 30, 2009, 1:36pm UTC](https://www.ruby-forum.com/t/activesupport-datetime-to-time-yesterday-vs-now/166878 "2009-04-30T13:36:18Z")

</div>

What’s so strikingly different between “yesterday” and “now”? irb(main):010:0\> require ‘activesupport’ =\> \[\] irb(main):014:0\> DateTime.yesterday.to\_time.class =\> Time irb(main):015:0\> DateTime.now.to\_time.class =\> …

---

## [What's the easiest way for novice to install RoR](https://www.ruby-forum.com/t/whats-the-easiest-way-for-novice-to-install-ror/166646)

<div class="topic-metadata">

**Author:** [@Sumon](https://www.ruby-forum.com/u/Sumon)\
**Replies:** 9\
**Last updated:** [April 30, 2009, 1:33pm UTC](https://www.ruby-forum.com/t/whats-the-easiest-way-for-novice-to-install-ror/166646 "2009-04-30T13:33:40Z")

</div>

hi, i am fairly novice in RoR. Even i don’t have clear idea of RoR. but i am highly interested to learn RoR. i have some experience in php (mostly windows environment). so far i understand, RoR is best with linux. we…

---

## [How to iterate fixtures](https://www.ruby-forum.com/t/how-to-iterate-fixtures/166870)

<div class="topic-metadata">

**Author:** [@colinloretz](https://www.ruby-forum.com/u/colinloretz)\
**Replies:** 2\
**Last updated:** [April 30, 2009, 12:41pm UTC](https://www.ruby-forum.com/t/how-to-iterate-fixtures/166870 "2009-04-30T12:41:34Z")

</div>

I have fixture data in froglets.yml In my functional test I specify fixtures :froglets I can then access the individual fixture values by froglets(:froglet1) for example. I want to check the data in my index view so…

---

## [Goldberg breaks functional tests](https://www.ruby-forum.com/t/goldberg-breaks-functional-tests/166867)

<div class="topic-metadata">

**Author:** [@Commander\_J](https://www.ruby-forum.com/u/Commander_J)\
**Replies:** 0\
**Last updated:** [April 30, 2009, 10:46am UTC](https://www.ruby-forum.com/t/goldberg-breaks-functional-tests/166867 "2009-04-30T10:46:40Z")

</div>

When you protect a controller/action with Goldberg, the functional tests for that controller will also fail by default. Has anyone else had this gotcha, and maybe a way to fix it? Logging in the admin user before st…

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

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