# Rails

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

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

---

## [LIBXML and LibXSLT](https://www.ruby-forum.com/t/libxml-and-libxslt/151396)

<div class="topic-metadata">

**Author:** [@phudson1442](https://www.ruby-forum.com/u/phudson1442)\
**Replies:** 3\
**Last updated:** [January 24, 2009, 4:50pm UTC](https://www.ruby-forum.com/t/libxml-and-libxslt/151396 "2009-01-24T16:50:46Z")

</div>

Hi, I installed libxml-ruby and libxslt-ruby. It took a while but it’s running now. However, on the libxml site (http://libxml.rubyforge.org/install.xml) it says: "…libxml requires a few other libraries to be instal…

---

## [How to save the images created using ajax call](https://www.ruby-forum.com/t/how-to-save-the-images-created-using-ajax-call/158512)

<div class="topic-metadata">

**Author:** [@sauravsuman012](https://www.ruby-forum.com/u/sauravsuman012)\
**Replies:** 2\
**Last updated:** [January 24, 2009, 4:45pm UTC](https://www.ruby-forum.com/t/how-to-save-the-images-created-using-ajax-call/158512 "2009-01-24T16:45:27Z")

</div>

Hi All, I am using Ajax call with form\_remote\_tag through which image is generated now i have to put a save button through where i have to save the generated image in my “images/public” folder . If you have any solu…

---

## [Problem with Pagination in Safari](https://www.ruby-forum.com/t/problem-with-pagination-in-safari/158544)

<div class="topic-metadata">

**Author:** [@Chinna](https://www.ruby-forum.com/u/Chinna)\
**Replies:** 1\
**Last updated:** [January 24, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/problem-with-pagination-in-safari/158544 "2009-01-24T16:31:20Z")

</div>

Hi all, I am using a pagination in my application, its working fine in all browsers except ‘Safari’. Can any one please help me ASAP. Thanks, Chinna.

---

## [NoMethodError "Read" for URI](https://www.ruby-forum.com/t/nomethoderror-read-for-uri/158507)

<div class="topic-metadata">

**Author:** [@cdubd](https://www.ruby-forum.com/u/cdubd)\
**Replies:** 3\
**Last updated:** [January 24, 2009, 3:17pm UTC](https://www.ruby-forum.com/t/nomethoderror-read-for-uri/158507 "2009-01-24T15:17:58Z")

</div>

Hey Everyone, I have a pretty interesting problem that I thought I would try and get some feedback on. The following method below accepts a URL string as a parameter ex “http://www.google.com,” and it uses regular exp…

---

## [Should the polymorfic modeling be used?](https://www.ruby-forum.com/t/should-the-polymorfic-modeling-be-used/158535)

<div class="topic-metadata">

**Author:** [@NycS\_Petr](https://www.ruby-forum.com/u/NycS_Petr)\
**Replies:** 1\
**Last updated:** [January 24, 2009, 3:15pm UTC](https://www.ruby-forum.com/t/should-the-polymorfic-modeling-be-used/158535 "2009-01-24T15:15:02Z")

</div>

Hi experts, I am new to rails and am struggling for several days with a following model (Rails 2.2.2). People are submitting requests, each request has one submitter, one approver, several reviewers and several resp…

---

## [Displaying events On calendar Cell , Like Backpack](https://www.ruby-forum.com/t/displaying-events-on-calendar-cell-like-backpack/158539)

<div class="topic-metadata">

**Author:** [@sanjay](https://www.ruby-forum.com/u/sanjay)\
**Replies:** 0\
**Last updated:** [January 24, 2009, 2:11pm UTC](https://www.ruby-forum.com/t/displaying-events-on-calendar-cell-like-backpack/158539 "2009-01-24T14:11:05Z")

</div>

Hi Geeks, I have been struggling ahrd to show events on a calendar cells. I used the calendar\_helper plugin and defined a todo scaffold The controller is: def index @todos = current\_user.todos @todo\_by\_date=@todos.…

---

## [Script/process/spawner silently failing](https://www.ruby-forum.com/t/script-process-spawner-silently-failing/157943)

<div class="topic-metadata">

**Author:** [@Tobias\_Knaup](https://www.ruby-forum.com/u/Tobias_Knaup)\
**Replies:** 3\
**Last updated:** [January 24, 2009, 2:00pm UTC](https://www.ruby-forum.com/t/script-process-spawner-silently-failing/157943 "2009-01-24T14:00:34Z")

</div>

Hi all, I set up a standard Capistrano deployment on a new host. To start the Mongrels, “script/spin” calls “script/process/spawner mongrel”. It prints a few lines as if everything were normal, however the mongrels …

---

## [Benchmarker controller action](https://www.ruby-forum.com/t/benchmarker-controller-action/158536)

<div class="topic-metadata">

**Author:** [@marmolin](https://www.ruby-forum.com/u/marmolin)\
**Replies:** 0\
**Last updated:** [January 24, 2009, 1:44pm UTC](https://www.ruby-forum.com/t/benchmarker-controller-action/158536 "2009-01-24T13:44:44Z")

</div>

Hi I am trying to use script/performance/benchmarker to test a controller action. I have tested different ways of specifying the action e.g for controller account, action test ‘AccountController.test’, ‘account\_cont…

---

## [Best place to set the flash\[:notice\]?](https://www.ruby-forum.com/t/best-place-to-set-the-flash-notice/158537)

<div class="topic-metadata">

**Author:** [@zorn](https://www.ruby-forum.com/u/zorn)\
**Replies:** 0\
**Last updated:** [January 24, 2009, 1:27pm UTC](https://www.ruby-forum.com/t/best-place-to-set-the-flash-notice/158537 "2009-01-24T13:27:07Z")

</div>

I’m using some standard Rails Resource controllers and on a new resource creation you’ll see something like respond\_to do |format| if @company.save flash\[:notice\] = ‘Company was successfully created.’ format.html { …

---

## [Should this view be optimized?](https://www.ruby-forum.com/t/should-this-view-be-optimized/158513)

<div class="topic-metadata">

**Author:** [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Replies:** 1\
**Last updated:** [January 24, 2009, 1:06pm UTC](https://www.ruby-forum.com/t/should-this-view-be-optimized/158513 "2009-01-24T13:06:23Z")

</div>

I have a survey application with he following models: Surveys has\_many Questions Questions has\_many Answers When a user takes a survey, they call take\_survey and it renders a collection of partials \_survey\_questions.…

---

## [Random exception driving me crazy: SecurityError (Insecure: can't modify array)](https://www.ruby-forum.com/t/random-exception-driving-me-crazy-securityerror-insecure-cant-modify-array/130423)

<div class="topic-metadata">

**Author:** [@random52k](https://www.ruby-forum.com/u/random52k)\
**Replies:** 2\
**Last updated:** [January 24, 2009, 12:18pm UTC](https://www.ruby-forum.com/t/random-exception-driving-me-crazy-securityerror-insecure-cant-modify-array/130423 "2009-01-24T12:18:21Z")

</div>

Hi all, I’m running into a very strange but incredibly annoying problem that I just can’t seem to solve. The exception is occurring from a seemingly innocuous line in my code, a simple ‘logger.warn(“some debug informa…

---

## [How to get current\_user when I'm in model](https://www.ruby-forum.com/t/how-to-get-current-user-when-im-in-model/158523)

<div class="topic-metadata">

**Author:** [@zero0x](https://www.ruby-forum.com/u/zero0x)\
**Replies:** 2\
**Last updated:** [January 24, 2009, 9:04am UTC](https://www.ruby-forum.com/t/how-to-get-current-user-when-im-in-model/158523 "2009-01-24T09:04:36Z")

</div>

Hey there, I have restful\_authentication. I can do this in my controller, view, etc current\_user But I can’t do it when I’m in model. I need to put it to model, because there’s method like my\_works - which finds all…

---

## [Best Practice for nested resources](https://www.ruby-forum.com/t/best-practice-for-nested-resources/158496)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 1\
**Last updated:** [January 24, 2009, 8:17am UTC](https://www.ruby-forum.com/t/best-practice-for-nested-resources/158496 "2009-01-24T08:17:47Z")

</div>

Hi all, I’m writing an app that has a reporting component. All of the reports are in a controller called reports\_controller. I’m using REST routes, and I’d like to do something like: /properties/1/myreport and hav…

---

## [Find\_by\_sql error, any ideas please](https://www.ruby-forum.com/t/find-by-sql-error-any-ideas-please/158501)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 5\
**Last updated:** [January 24, 2009, 8:14am UTC](https://www.ruby-forum.com/t/find-by-sql-error-any-ideas-please/158501 "2009-01-24T08:14:51Z")

</div>

Hello, I am having problems with the find\_by\_sql while trying to update a table. I am using mysql and rails 2.2.2. A small test like this: User.find\_by\_sql “update users set name=‘Test’” generates a horrible error. …

---

## [Nested Resources causes MethodNotAllowed error](https://www.ruby-forum.com/t/nested-resources-causes-methodnotallowed-error/158519)

<div class="topic-metadata">

**Author:** [@SSSBMpKSSzE5SSB](https://www.ruby-forum.com/u/SSSBMpKSSzE5SSB)\
**Replies:** 0\
**Last updated:** [January 24, 2009, 6:29am UTC](https://www.ruby-forum.com/t/nested-resources-causes-methodnotallowed-error/158519 "2009-01-24T06:29:39Z")

</div>

I want to make every line in a doc in-place-editable. rails 2.2.2 routes.rb map.resources :docs do |doc| doc.resources :lines end view-server-side new Ajax.InPlaceEditor(‘line\<%=line\_number +1%\>’, ‘\<%= doc\_line\_pa…

---

## [Nested Resources cause MethodNotAllowed error](https://www.ruby-forum.com/t/nested-resources-cause-methodnotallowed-error/158518)

<div class="topic-metadata">

**Author:** [@SSSBMpKSSzE5SSB](https://www.ruby-forum.com/u/SSSBMpKSSzE5SSB)\
**Replies:** 0\
**Last updated:** [January 24, 2009, 6:25am UTC](https://www.ruby-forum.com/t/nested-resources-cause-methodnotallowed-error/158518 "2009-01-24T06:25:34Z")

</div>

I want to make every line in a doc in-place-editable. rails 2.2.2 routes.rb map.resources :docs do |poem| poem.resources :lines end view-server-side new Ajax.InPlaceEditor(‘line\<%=line\_number +1%\>’, ‘\<%= doc\_line\_…

---

## [Assert\_equal 1.1035, 1.0035 + 0.1 is false](https://www.ruby-forum.com/t/assert-equal-1-1035-1-0035-0-1-is-false/158468)

<div class="topic-metadata">

**Author:** [@jzimmek](https://www.ruby-forum.com/u/jzimmek)\
**Replies:** 4\
**Last updated:** [January 24, 2009, 5:50am UTC](https://www.ruby-forum.com/t/assert-equal-1-1035-1-0035-0-1-is-false/158468 "2009-01-24T05:50:28Z")

</div>

some of my tests failed when comparing two floats. the comparison of: 1.1035 == 1.0035 + 0.1 evaluates to false - i do not really understand why. must depend on the value range, because 1.103 == 1.003 + 0.1 evaluat…

---

## [Error loading sqlite3.. please help](https://www.ruby-forum.com/t/error-loading-sqlite3-please-help/158514)

<div class="topic-metadata">

**Author:** [@milon](https://www.ruby-forum.com/u/milon)\
**Replies:** 0\
**Last updated:** [January 24, 2009, 5:22am UTC](https://www.ruby-forum.com/t/error-loading-sqlite3-please-help/158514 "2009-01-24T05:22:00Z")

</div>

friends, just started developing rails applications… The server returns “no such file to load – sqlite3” .I installed sqlite 2.3.3 , but the error persists . plese help.

---

## [Validation levels](https://www.ruby-forum.com/t/validation-levels/158489)

<div class="topic-metadata">

**Author:** [@andywatts](https://www.ruby-forum.com/u/andywatts)\
**Replies:** 1\
**Last updated:** [January 24, 2009, 1:41am UTC](https://www.ruby-forum.com/t/validation-levels/158489 "2009-01-24T01:41:51Z")

</div>

Sometimes I want to show just one error, even when a field fails two or three validations. A custom validation method is easy enough, but the helpers are nice and concise. So, has anyone found a way of doing this wit…

---

## [Problem with ferret and fixtures:load](https://www.ruby-forum.com/t/problem-with-ferret-and-fixtures-load/146938)

<div class="topic-metadata">

**Author:** [@noelnoelu](https://www.ruby-forum.com/u/noelnoelu)\
**Replies:** 2\
**Last updated:** [January 24, 2009, 12:50am UTC](https://www.ruby-forum.com/t/problem-with-ferret-and-fixtures-load/146938 "2009-01-24T00:50:15Z")

</div>

I use acts\_as\_ferret to my business model, and it work very well in development env. However, the problem is when I try to rake db:fixtures:load, it always show an errors “Mysql::Error: Unknown column ‘log\_file’ in …

---

## [How to use Time type in rails](https://www.ruby-forum.com/t/how-to-use-time-type-in-rails/158325)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 6\
**Last updated:** [January 24, 2009, 12:16am UTC](https://www.ruby-forum.com/t/how-to-use-time-type-in-rails/158325 "2009-01-24T00:16:57Z")

</div>

I defines a table and one of its column type is Time. I use ruby Time class to assign the value to this column, but it always generate Sat Jan 01 2000 time. Is the format different with the database and ruby class? I …

---

## [Filtering what's logged](https://www.ruby-forum.com/t/filtering-whats-logged/158495)

<div class="topic-metadata">

**Author:** [@thabenksta](https://www.ruby-forum.com/u/thabenksta)\
**Replies:** 2\
**Last updated:** [January 23, 2009, 11:10pm UTC](https://www.ruby-forum.com/t/filtering-whats-logged/158495 "2009-01-23T23:10:13Z")

</div>

We are currently using “rescue\_action\_in\_public” in application.rb to catch exceptions and send us alert emails. However, we have recently begun getting thousands of invalid requests with weird and very long URLS. M…

---

## [Upload via API leads to missing plus signs in HTTP-Body](https://www.ruby-forum.com/t/upload-via-api-leads-to-missing-plus-signs-in-http-body/158412)

<div class="topic-metadata">

**Author:** [@TKAB](https://www.ruby-forum.com/u/TKAB)\
**Replies:** 5\
**Last updated:** [January 23, 2009, 10:47pm UTC](https://www.ruby-forum.com/t/upload-via-api-leads-to-missing-plus-signs-in-http-body/158412 "2009-01-23T22:47:03Z")

</div>

Hi! I’m developing a Rails-app that needs to take images from a separate program. I managed to upload base64 encoded images via HTTP-Post- Request (Cocoa), the HTTP-Body looks like (base64-data is shortened) this: “…

---

## [Model validation](https://www.ruby-forum.com/t/model-validation/158480)

<div class="topic-metadata">

**Author:** [@Dowker](https://www.ruby-forum.com/u/Dowker)\
**Replies:** 3\
**Last updated:** [January 23, 2009, 10:20pm UTC](https://www.ruby-forum.com/t/model-validation/158480 "2009-01-23T22:20:13Z")

</div>

I need a little advice on how to best set things up. I have a model where I will have a short form and a longer form in two different places in my application. Obviously, I would like to apply validating rules to both…

---

## [Problem in installing mysql gem](https://www.ruby-forum.com/t/problem-in-installing-mysql-gem/158493)

<div class="topic-metadata">

**Author:** [@suneeta](https://www.ruby-forum.com/u/suneeta)\
**Replies:** 0\
**Last updated:** [January 23, 2009, 10:13pm UTC](https://www.ruby-forum.com/t/problem-in-installing-mysql-gem/158493 "2009-01-23T22:13:14Z")

</div>

Hi… I’m using mysql 5.1 and now tried to install the mysql gem: C:\\Ruby\>gem install mysql Successfully installed mysql-2.7.3-x86-mswin32 1 gem installed Installing ri documentation for mysql-2.7.3-x86-mswin32… Inst…

---

## [REST - Some doubts](https://www.ruby-forum.com/t/rest-some-doubts/158485)

<div class="topic-metadata">

**Author:** [@homunculus](https://www.ruby-forum.com/u/homunculus)\
**Replies:** 7\
**Last updated:** [January 23, 2009, 9:45pm UTC](https://www.ruby-forum.com/t/rest-some-doubts/158485 "2009-01-23T21:45:00Z")

</div>

Hi, I recently started using rest for building some new rails apps. I find it great and clean, but when I started a big project some days ago some doubts come to my mind. First of all, after implementing the user man…

---

## [:selected option is ignored for collection\_select](https://www.ruby-forum.com/t/selected-option-is-ignored-for-collection-select/158490)

<div class="topic-metadata">

**Author:** [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Replies:** 0\
**Last updated:** [January 23, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/selected-option-is-ignored-for-collection-select/158490 "2009-01-23T21:18:01Z")

</div>

Is there a workaround for this issue yet? I just wasted a ton of time trying to debug this in an AJAX form. http://rails.lighthouseapp.com/projects/8994/tickets/1037-selected-option-is-ignored-for-collection\_select R…

---

## [Printing running total in do loop](https://www.ruby-forum.com/t/printing-running-total-in-do-loop/158342)

<div class="topic-metadata">

**Author:** [@denied39](https://www.ruby-forum.com/u/denied39)\
**Replies:** 5\
**Last updated:** [January 23, 2009, 8:34pm UTC](https://www.ruby-forum.com/t/printing-running-total-in-do-loop/158342 "2009-01-23T20:34:40Z")

</div>

Ok, so I’m really new to Ruby and Rails. I’m trying to create a home budget app, and I’m having some difficulties getting a running total working. I have the following code in my model: def running\_total @total = 0.0 …

---

## [Respond\_to and format](https://www.ruby-forum.com/t/respond-to-and-format/158338)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 3\
**Last updated:** [January 23, 2009, 8:33pm UTC](https://www.ruby-forum.com/t/respond-to-and-format/158338 "2009-01-23T20:33:16Z")

</div>

Hi, I’m creating a new format for an iPhone/iPod connections. My problem is that iPhones/iPods always receive the .html pages. If I comment the format.html # index.html.erb then the devices receive the .xml format, a…

---

## [How to retain values](https://www.ruby-forum.com/t/how-to-retain-values/158459)

<div class="topic-metadata">

**Author:** [@anil123](https://www.ruby-forum.com/u/anil123)\
**Replies:** 2\
**Last updated:** [January 23, 2009, 6:59pm UTC](https://www.ruby-forum.com/t/how-to-retain-values/158459 "2009-01-23T18:59:35Z")

</div>

Hi all, am new to Ruby world. My problem is, I have 4 text fields,i wrote the validations for that like if blank? etc… I filled 3 fields then clicked the submit button, it displayed fine the error that “please ente…

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

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