# Rails

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

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

---

## [How-to verify rails is using mysql gem instead of whatever "-d mysql" provides](https://www.ruby-forum.com/t/how-to-verify-rails-is-using-mysql-gem-instead-of-whatever-d-mysql-provides/157871)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [January 16, 2009, 7:01am UTC](https://www.ruby-forum.com/t/how-to-verify-rails-is-using-mysql-gem-instead-of-whatever-d-mysql-provides/157871 "2009-01-16T07:01:20Z")

</div>

How does one verify that a Rails project is using the mysql gem (which I assume is faster) instead of whatever “-d mysql” provides ?

---

## [Can any one give me answer about remote\_form\_for..?](https://www.ruby-forum.com/t/can-any-one-give-me-answer-about-remote-form-for/157875)

<div class="topic-metadata">

**Author:** [@vikas](https://www.ruby-forum.com/u/vikas)\
**Replies:** 0\
**Last updated:** [January 16, 2009, 6:25am UTC](https://www.ruby-forum.com/t/can-any-one-give-me-answer-about-remote-form-for/157875 "2009-01-16T06:25:03Z")

</div>

Can any one give me answer??? I want to check whether textfield is empty or not at onsubmit event of form, but it is not working. Can any one tell me how to check empty textfield on remote\_form\_for’s onsubmit event?…

---

## [How to use onsubmit in remote\_form\_for.....?](https://www.ruby-forum.com/t/how-to-use-onsubmit-in-remote-form-for/157872)

<div class="topic-metadata">

**Author:** [@vikas](https://www.ruby-forum.com/u/vikas)\
**Replies:** 0\
**Last updated:** [January 16, 2009, 6:09am UTC](https://www.ruby-forum.com/t/how-to-use-onsubmit-in-remote-form-for/157872 "2009-01-16T06:09:21Z")

</div>

I want to check whether textfield is empty or not at onsubmit event of form, but it is not working. Can any one tell me how to check empty textfield on remote\_form\_for’s onsubmit event??? my code is ---------------\> …

---

## [Unable to render lowercase french accent character in mssql](https://www.ruby-forum.com/t/unable-to-render-lowercase-french-accent-character-in-mssql/157862)

<div class="topic-metadata">

**Author:** [@Pengzhi](https://www.ruby-forum.com/u/Pengzhi)\
**Replies:** 0\
**Last updated:** [January 16, 2009, 2:38am UTC](https://www.ruby-forum.com/t/unable-to-render-lowercase-french-accent-character-in-mssql/157862 "2009-01-16T02:38:07Z")

</div>

Hello, We initially save french characters using friendly html code, ie: Ç into our db. Problems started when user tried to save actual accented characters, ie:Ç, in the forms. The accented characters become garbled …

---

## [New record doesn't appear in db yet rails shows save success](https://www.ruby-forum.com/t/new-record-doesnt-appear-in-db-yet-rails-shows-save-success/157852)

<div class="topic-metadata">

**Author:** [@rubylicious](https://www.ruby-forum.com/u/rubylicious)\
**Replies:** 2\
**Last updated:** [January 16, 2009, 1:45am UTC](https://www.ruby-forum.com/t/new-record-doesnt-appear-in-db-yet-rails-shows-save-success/157852 "2009-01-16T01:45:28Z")

</div>

This is a first for me so bear with the example. Simple 2 model application with simple relationship between the two models. Models: Transaction “has\_many :steps” Step “belongs\_to :transaction” Database tables: tr…

---

## [Can one test manual transactions in Rspec/UnitTest noting the testing framework wraps its DB work in](https://www.ruby-forum.com/t/can-one-test-manual-transactions-in-rspec-unittest-noting-the-testing-framework-wraps-its-db-work-in/157663)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 4\
**Last updated:** [January 16, 2009, 1:44am UTC](https://www.ruby-forum.com/t/can-one-test-manual-transactions-in-rspec-unittest-noting-the-testing-framework-wraps-its-db-work-in/157663 "2009-01-16T01:44:18Z")

</div>

Hi, Just wondering, can one test manual transactions in Rspec/UnitTest noting the testing framework wraps its DB work in a transaction & mysql doesn’t allow nested transactions? – Greg http://blog.gregnet.org/

---

## [How do I deploy a rails app in a subdirectory using mod\_rails?](https://www.ruby-forum.com/t/how-do-i-deploy-a-rails-app-in-a-subdirectory-using-mod-rails/157857)

<div class="topic-metadata">

**Author:** [@yaphi](https://www.ruby-forum.com/u/yaphi)\
**Replies:** 0\
**Last updated:** [January 16, 2009, 1:43am UTC](https://www.ruby-forum.com/t/how-do-i-deploy-a-rails-app-in-a-subdirectory-using-mod-rails/157857 "2009-01-16T01:43:43Z")

</div>

Hello, I’m launching a small web app that my client wants deployed to domain.com/app. They don’t want to do a subdomain. I am trying to figure out how to set the vhost file to tell mod\_rails that domain.com/ app is a…

---

## [Pass ruby array with Ajax.Request](https://www.ruby-forum.com/t/pass-ruby-array-with-ajax-request/157804)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 6\
**Last updated:** [January 16, 2009, 1:19am UTC](https://www.ruby-forum.com/t/pass-ruby-array-with-ajax-request/157804 "2009-01-16T01:19:09Z")

</div>

I am hoping someone can please help me with this. I am trying to pass an array using Ajax.Request and cannot get it working. This is what I have so far: @data is a ruby array new Ajax.Request( ‘/users/test’, { par…

---

## [Render a PHP menu in rails template](https://www.ruby-forum.com/t/render-a-php-menu-in-rails-template/157851)

<div class="topic-metadata">

**Author:** [@kim](https://www.ruby-forum.com/u/kim)\
**Replies:** 0\
**Last updated:** [January 16, 2009, 12:44am UTC](https://www.ruby-forum.com/t/render-a-php-menu-in-rails-template/157851 "2009-01-16T00:44:01Z")

</div>

I need to integrate some RoR generated pages into a Drupal website. My idea is to re-use the PHP files that make up the layout of the Drupal site in the Rails template files. So instead of rendering the menu in a part…

---

## [Application/octet-stream from flash: binary data, not swfupload](https://www.ruby-forum.com/t/application-octet-stream-from-flash-binary-data-not-swfupload/157766)

<div class="topic-metadata">

**Author:** [@sarahg](https://www.ruby-forum.com/u/sarahg)\
**Replies:** 4\
**Last updated:** [January 16, 2009, 12:07am UTC](https://www.ruby-forum.com/t/application-octet-stream-from-flash-binary-data-not-swfupload/157766 "2009-01-16T00:07:43Z")

</div>

Hello, I’m working on a rails app with a flash application in it, and the flash application posts binary data to the rails app, to create and upload an image. The image arrives from Flash with a Content-Type of “app…

---

## [Stuck on Git message](https://www.ruby-forum.com/t/stuck-on-git-message/153403)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 12\
**Last updated:** [January 15, 2009, 11:42pm UTC](https://www.ruby-forum.com/t/stuck-on-git-message/153403 "2009-01-15T23:42:04Z")

</div>

I’m trying to learn git. After doing the initial add . I come to a message. Do I add my comment as a comment with # before my line, or what? And how to I get out of there? I’ve been trying to find a good tutorial but …

---

## [In\_place\_editor isn't working?](https://www.ruby-forum.com/t/in-place-editor-isnt-working/157850)

<div class="topic-metadata">

**Author:** [@adambeazley](https://www.ruby-forum.com/u/adambeazley)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 11:39pm UTC](https://www.ruby-forum.com/t/in-place-editor-isnt-working/157850 "2009-01-15T23:39:00Z")

</div>

I installed the in\_place\_editor plugin from http://dev.rubyonrails.org/svn/rails/plugins/in\_place\_editing/ This is what I have: \<%= in\_place\_editor\_field :frontpage, ‘page\_text’, :in\_place\_editor\_options =\> { :rows =\>…

---

## [Gem install problem](https://www.ruby-forum.com/t/gem-install-problem/157844)

<div class="topic-metadata">

**Author:** [@neridaj](https://www.ruby-forum.com/u/neridaj)\
**Replies:** 1\
**Last updated:** [January 15, 2009, 10:35pm UTC](https://www.ruby-forum.com/t/gem-install-problem/157844 "2009-01-15T22:35:42Z")

</div>

Hello, I’m following Dan Benjamin’s install tutorial and got stuck at the gem install. It looks like it installed successfully but the gem command is not recognized. I located another rubygems install from macports at …

---

## [Ruby telnet question](https://www.ruby-forum.com/t/ruby-telnet-question/157843)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 9:30pm UTC](https://www.ruby-forum.com/t/ruby-telnet-question/157843 "2009-01-15T21:30:24Z")

</div>

Is there a way to implement a logout on any error that comes up while doing a telnet? I have eqpt that gets a bit crazy with cli sessions left hung up on the server.

---

## [Equivalent of Instant Rails in Mac](https://www.ruby-forum.com/t/equivalent-of-instant-rails-in-mac/157756)

<div class="topic-metadata">

**Author:** [@erptool](https://www.ruby-forum.com/u/erptool)\
**Replies:** 3\
**Last updated:** [January 15, 2009, 8:59pm UTC](https://www.ruby-forum.com/t/equivalent-of-instant-rails-in-mac/157756 "2009-01-15T20:59:10Z")

</div>

Hi all, I have written full ERP Accounting application TooLERP - The Best Small Business ERP Accounting Software. I am using Instant Rails to make it available to windows users. I was wondering if there is an equivale…

---

## [Method\_missing only in production using custom validation](https://www.ruby-forum.com/t/method-missing-only-in-production-using-custom-validation/157770)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 4\
**Last updated:** [January 15, 2009, 8:46pm UTC](https://www.ruby-forum.com/t/method-missing-only-in-production-using-custom-validation/157770 "2009-01-15T20:46:46Z")

</div>

I’ve written a custom validation ah la advanced rails recipes. When i’m in development everything works great. As soon as I “script/server -e production” then my console gets lit up with errors http://www.pastie.org/3…

---

## [Mongrel error](https://www.ruby-forum.com/t/mongrel-error/157772)

<div class="topic-metadata">

**Author:** [@amrita](https://www.ruby-forum.com/u/amrita)\
**Replies:** 3\
**Last updated:** [January 15, 2009, 7:53pm UTC](https://www.ruby-forum.com/t/mongrel-error/157772 "2009-01-15T19:53:48Z")

</div>

Hi, I have my rails application deployed on a 32-bit machine and I’m trying to move it to a 64-bit machine. Thing is, I have rails and gem installed in my home directory. I re-installed mongrel and mongrel\_cluster on…

---

## [Problem with named\_scope and test-spec?](https://www.ruby-forum.com/t/problem-with-named-scope-and-test-spec/157819)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [January 15, 2009, 7:49pm UTC](https://www.ruby-forum.com/t/problem-with-named-scope-and-test-spec/157819 "2009-01-15T19:49:06Z")

</div>

I may be overlooking something, but it seems to me that it is a problem if with this code… Class Blog \< ActiveRecord::Base named\_scope :unseen, :conditions =\> “displayed IS NULL” end this test fails… it “should giv…

---

## [Select in fields\_for not selecting](https://www.ruby-forum.com/t/select-in-fields-for-not-selecting/157739)

<div class="topic-metadata">

**Author:** [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Replies:** 3\
**Last updated:** [January 15, 2009, 7:41pm UTC](https://www.ruby-forum.com/t/select-in-fields-for-not-selecting/157739 "2009-01-15T19:41:51Z")

</div>

I have a user who has a location that location contains a country\_id. Location has a polymorphic interface locatable. What works: The user can edit their name, country and city. This all saves to the DB on the update…

---

## [Backticks returns "Bad File Descriptor" error with Apache](https://www.ruby-forum.com/t/backticks-returns-bad-file-descriptor-error-with-apache/157835)

<div class="topic-metadata">

**Author:** [@daniellesteel](https://www.ruby-forum.com/u/daniellesteel)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 7:40pm UTC](https://www.ruby-forum.com/t/backticks-returns-bad-file-descriptor-error-with-apache/157835 "2009-01-15T19:40:26Z")

</div>

Hello, I wanted to run a command line program from Ruby. I used \`(backticks) to do this. It was successful if I run the program using Webrick but if I run it using Apache 2.2.8, a “Bad File Descriptor” error is return…

---

## [Render an alternate partial](https://www.ruby-forum.com/t/render-an-alternate-partial/157747)

<div class="topic-metadata">

**Author:** [@johnsonmlw](https://www.ruby-forum.com/u/johnsonmlw)\
**Replies:** 3\
**Last updated:** [January 15, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/render-an-alternate-partial/157747 "2009-01-15T19:32:38Z")

</div>

I want to render a partial from two different views (class/index; cohort/index) in order to iterate (?) through the pupils model using \_pupil.html.erb (in the pupils/views directory) class has many pupils cohort has …

---

## [Help needed](https://www.ruby-forum.com/t/help-needed/157708)

<div class="topic-metadata">

**Author:** [@dbest](https://www.ruby-forum.com/u/dbest)\
**Replies:** 6\
**Last updated:** [January 15, 2009, 7:06pm UTC](https://www.ruby-forum.com/t/help-needed/157708 "2009-01-15T19:06:42Z")

</div>

Hi guys, i am now trying to learn ruby, there was another developer that left and i have a problem with our company website, www.italyabroad.com. when clicking on wine on the navigation bar, the page does not open and…

---

## [Looking for a rails mentor](https://www.ruby-forum.com/t/looking-for-a-rails-mentor/157826)

<div class="topic-metadata">

**Author:** [@caneridge](https://www.ruby-forum.com/u/caneridge)\
**Replies:** 1\
**Last updated:** [January 15, 2009, 6:41pm UTC](https://www.ruby-forum.com/t/looking-for-a-rails-mentor/157826 "2009-01-15T18:41:29Z")

</div>

I’m looking for a rails mentor. I can’t offer to pay you but I can offer to mentor someone else to give back to the community after I’ve learned rails. Here is where I stand. I’ve been a software engineer since 1984 …

---

## [Thinking sphinx problem](https://www.ruby-forum.com/t/thinking-sphinx-problem/156103)

<div class="topic-metadata">

**Author:** [@tashfeen.ekram](https://www.ruby-forum.com/u/tashfeen.ekram)\
**Replies:** 3\
**Last updated:** [January 15, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/thinking-sphinx-problem/156103 "2009-01-15T18:13:51Z")

</div>

a beginner quesition. i can not start the sphinx service. i type rake thinking\_sphinx:start and it gives me the following searchd --config …/config/development.sphinx.conf Failed to start searchd daemon. Check …/log/…

---

## [Connecting to MySQL database](https://www.ruby-forum.com/t/connecting-to-mysql-database/157827)

<div class="topic-metadata">

**Author:** [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/connecting-to-mysql-database/157827 "2009-01-15T18:13:15Z")

</div>

hi all - I’ve just lanched my first app I have a huge list of IP addresses (thousands) that I would like to add to my MySQL production database I naiively thought it would be as simple as connecting to the database …

---

## [App Configuration Setting](https://www.ruby-forum.com/t/app-configuration-setting/157809)

<div class="topic-metadata">

**Author:** [@daz](https://www.ruby-forum.com/u/daz)\
**Replies:** 1\
**Last updated:** [January 15, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/app-configuration-setting/157809 "2009-01-15T17:25:24Z")

</div>

What is the best way to allow site-wide setting to be changed? For example, an admin user could be able to set the site theme, the number of images shown on the landing page, the title of the app, greeting given etc. …

---

## [Using multiple models in one view](https://www.ruby-forum.com/t/using-multiple-models-in-one-view/157820)

<div class="topic-metadata">

**Author:** [@Javier\_CH](https://www.ruby-forum.com/u/Javier_CH)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 5:24pm UTC](https://www.ruby-forum.com/t/using-multiple-models-in-one-view/157820 "2009-01-15T17:24:49Z")

</div>

Could anyone help me with that pastie? It’s about using objects of multiple models in one form (everything else is documented in the pastie): http://pastie.textmate.org/private/5abvempgeb8ytkuqni0pq Thanks a lot! Sa…

---

## ["rake test" works but "rake test:units" fails](https://www.ruby-forum.com/t/rake-test-works-but-rake-test-units-fails/157818)

<div class="topic-metadata">

**Author:** [@railsmagazine](https://www.ruby-forum.com/u/railsmagazine)\
**Replies:** 0\
**Last updated:** [January 15, 2009, 5:01pm UTC](https://www.ruby-forum.com/t/rake-test-works-but-rake-test-units-fails/157818 "2009-01-15T17:01:18Z")

</div>

“rake test” runs all the tests as it should… but “rake test:units” C:…\>rake test:units (in C:/…/…) rake aborted! FATAL C3D000 Mdatabase “postgres” does not exist Fpostinit.c L274 RInitPostgres (See full tr…

---

## [How to define primary\_key at migrate](https://www.ruby-forum.com/t/how-to-define-primary-key-at-migrate/157748)

<div class="topic-metadata">

**Author:** [@hapkido\_kid](https://www.ruby-forum.com/u/hapkido_kid)\
**Replies:** 2\
**Last updated:** [January 15, 2009, 4:32pm UTC](https://www.ruby-forum.com/t/how-to-define-primary-key-at-migrate/157748 "2009-01-15T16:32:32Z")

</div>

Hi, I am a newbie. I am wondering if anyone can show me how to define a primary\_key at migrate create table (:zis, :primary\_key =\> ‘quwie’) do |t| t.column :quwie, :integer, :limit =\> 4 end Is it the right way to d…

---

## [Sequential "page." commands in a js.rjs file?](https://www.ruby-forum.com/t/sequential-page-commands-in-a-js-rjs-file/157816)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [January 15, 2009, 3:50pm UTC](https://www.ruby-forum.com/t/sequential-page-commands-in-a-js-rjs-file/157816 "2009-01-15T15:50:41Z")

</div>

After the (remote) delete action for my lesson\_categories controller i fall through to this js.rjs file: page.visual\_effect :fade, “lesson\_category\_#{@lesson\_category.id}”, :duration =\> 1 page.remove “lesson\_category…

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

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