# Rails

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

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

---

## [Subdomainfu](https://www.ruby-forum.com/t/subdomainfu/173699)

<div class="topic-metadata">

**Author:** [@prabesh](https://www.ruby-forum.com/u/prabesh)\
**Replies:** 3\
**Last updated:** [August 20, 2009, 8:07pm UTC](https://www.ruby-forum.com/t/subdomainfu/173699 "2009-08-20T20:07:47Z")

</div>

Hi all, I am using subdomainfu plugin for subdomain in my project.I can get the subdomain in the url with ‘current\_subdomain’. But for subdomain to be accepted by my browser I need to change the / etc/hosts : 127.0.…

---

## [Habtm and accepts\_nested\_attributes\_for](https://www.ruby-forum.com/t/habtm-and-accepts-nested-attributes-for/174092)

<div class="topic-metadata">

**Author:** [@helix\_tp](https://www.ruby-forum.com/u/helix_tp)\
**Replies:** 0\
**Last updated:** [August 20, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/habtm-and-accepts-nested-attributes-for/174092 "2009-08-20T18:54:02Z")

</div>

Do habtm and accepts\_nested\_attributes play well together? Some things I read imply yes, some no… and they don’t seem to, based on what I’ve been trying. Thx, dwh

---

## [\*\* Removing all instances of mysql on mac osx \*\*](https://www.ruby-forum.com/t/removing-all-instances-of-mysql-on-mac-osx/173970)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 7\
**Last updated:** [August 20, 2009, 6:52pm UTC](https://www.ruby-forum.com/t/removing-all-instances-of-mysql-on-mac-osx/173970 "2009-08-20T18:52:45Z")

</div>

I am trying to switch from sqllite3 to mysql on Ruby on Rails. Whenever I try to install the mysql gem, i get an error: \*\*\* extconf.rb failed \*\*\* Could not create Makefile due to some reason, probably lack of necessa…

---

## [Can :conditions use an array and a dictionary together?](https://www.ruby-forum.com/t/can-conditions-use-an-array-and-a-dictionary-together/174062)

<div class="topic-metadata">

**Author:** [@coolaj86](https://www.ruby-forum.com/u/coolaj86)\
**Replies:** 5\
**Last updated:** [August 20, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/can-conditions-use-an-array-and-a-dictionary-together/174062 "2009-08-20T18:35:17Z")

</div>

This is what I’m trying to do: @contacts = Contact.find(:all, :conditions =\> \[\[“jobs.name LIKE ?”, ‘Teacher%’\], {:group\_id =\> current\_contact.group}\], :include =\> \[:jobs, :photos\]) Obviously it’s not working. Is this…

---

## [Master/Slave database setup with Rails?](https://www.ruby-forum.com/t/master-slave-database-setup-with-rails/173963)

<div class="topic-metadata">

**Author:** [@yannimac](https://www.ruby-forum.com/u/yannimac)\
**Replies:** 5\
**Last updated:** [August 20, 2009, 4:49pm UTC](https://www.ruby-forum.com/t/master-slave-database-setup-with-rails/173963 "2009-08-20T16:49:19Z")

</div>

I currently setting up a master slave configuration with MySQL where I will have 1 master for reads/writes and a slave for reads. Just looking around, I see the Masochism plugin was written for this. Has anyone used…

---

## [Select tags](https://www.ruby-forum.com/t/select-tags/174074)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 3\
**Last updated:** [August 20, 2009, 4:45pm UTC](https://www.ruby-forum.com/t/select-tags/174074 "2009-08-20T16:45:13Z")

</div>

Hello, Is dere any way to give default value or value to select tags … My scenario is:- \<% value\_array = \[1, 2, 3, 4, 5\] %\> \<%= options\_for\_select (value\_array) %\> Now i am storing these values in database… But …

---

## [Quick json question](https://www.ruby-forum.com/t/quick-json-question/173992)

<div class="topic-metadata">

**Author:** [@twaters](https://www.ruby-forum.com/u/twaters)\
**Replies:** 5\
**Last updated:** [August 20, 2009, 4:02pm UTC](https://www.ruby-forum.com/t/quick-json-question/173992 "2009-08-20T16:02:04Z")

</div>

How does one format a time when serializing an active record object? Server side somehow or leave it up to client side javascript? -tim

---

## [How write the excel with formula](https://www.ruby-forum.com/t/how-write-the-excel-with-formula/174079)

<div class="topic-metadata">

**Author:** [@jayarajmohan](https://www.ruby-forum.com/u/jayarajmohan)\
**Replies:** 0\
**Last updated:** [August 20, 2009, 2:42pm UTC](https://www.ruby-forum.com/t/how-write-the-excel-with-formula/174079 "2009-08-20T14:42:46Z")

</div>

Hi all, I can write a excel file in normal, Now i need to write the excel with formula inside the column. Is it possible.... ? Please update me... Thanks

---

## [In IE there is delay in loading png images](https://www.ruby-forum.com/t/in-ie-there-is-delay-in-loading-png-images/197093)

<div class="topic-metadata">

**Author:** [@shanmu](https://www.ruby-forum.com/u/shanmu)\
**Replies:** 3\
**Last updated:** [August 20, 2009, 2:25pm UTC](https://www.ruby-forum.com/t/in-ie-there-is-delay-in-loading-png-images/197093 "2009-08-20T14:25:02Z")

</div>

Hi all, Can some one help me in this issue. My application consists only png images where it takes normal time to get loaded in all browsers except IE. In IE i can see nearly 950 requests where other browsers show on…

---

## [Best InPace editing plugin / method](https://www.ruby-forum.com/t/best-inpace-editing-plugin-method/174065)

<div class="topic-metadata">

**Author:** [@mike343](https://www.ruby-forum.com/u/mike343)\
**Replies:** 1\
**Last updated:** [August 20, 2009, 1:30pm UTC](https://www.ruby-forum.com/t/best-inpace-editing-plugin-method/174065 "2009-08-20T13:30:35Z")

</div>

I’m wanting to add some InPlace editing code to my application and have seen a number of methods to do this. I therefore wanted to get a gauge on what this group thinks is the best approach for the latest version of r…

---

## [Fields when entered needs to be validated](https://www.ruby-forum.com/t/fields-when-entered-needs-to-be-validated/174064)

<div class="topic-metadata">

**Author:** [@karthik](https://www.ruby-forum.com/u/karthik)\
**Replies:** 3\
**Last updated:** [August 20, 2009, 1:04pm UTC](https://www.ruby-forum.com/t/fields-when-entered-needs-to-be-validated/174064 "2009-08-20T13:04:27Z")

</div>

hi guys Thanks for the support you give I have some four fields which is not mandatory, but when that field is entered need to be validated before saved else it can take null value can you please guide me – Karth…

---

## [Can't create/write to file '/usr/local/mysql/data/](https://www.ruby-forum.com/t/cant-create-write-to-file-usr-local-mysql-data/174071)

<div class="topic-metadata">

**Author:** [@RubyonRails\_newbie](https://www.ruby-forum.com/u/RubyonRails_newbie)\
**Replies:** 0\
**Last updated:** [August 20, 2009, 11:42am UTC](https://www.ruby-forum.com/t/cant-create-write-to-file-usr-local-mysql-data/174071 "2009-08-20T11:42:00Z")

</div>

Hello there, I am new to ruby on rails, and have followed a tutorial to get set up using mysql. THis is now running, so using terminal, my next steps are to create a database, and a table for the database. The dsata…

---

## [Delay in loading png images in IE](https://www.ruby-forum.com/t/delay-in-loading-png-images-in-ie/174069)

<div class="topic-metadata">

**Author:** [@shanmu](https://www.ruby-forum.com/u/shanmu)\
**Replies:** 0\
**Last updated:** [August 20, 2009, 10:56am UTC](https://www.ruby-forum.com/t/delay-in-loading-png-images-in-ie/174069 "2009-08-20T10:56:18Z")

</div>

Hi all, Can some one help me in this issue. My application consists only png images where it takes normal time to get loaded in all browsers except IE. In IE i can see nearly 950 requests where other browsers show on…

---

## [Undefined local variable or method"](https://www.ruby-forum.com/t/undefined-local-variable-or-method/129351)

<div class="topic-metadata">

**Author:** [@ialameh](https://www.ruby-forum.com/u/ialameh)\
**Replies:** 4\
**Last updated:** [August 20, 2009, 10:37am UTC](https://www.ruby-forum.com/t/undefined-local-variable-or-method/129351 "2009-08-20T10:37:01Z")

</div>

Hello, I am trying to render a partial with a collection \<%= render :partial =\> ‘classified’, :collection =\> @classifieds %\> this one works but if I changed my partial name to list for example \<%= render :partial =\> …

---

## [Render a file](https://www.ruby-forum.com/t/render-a-file/174067)

<div class="topic-metadata">

**Author:** [@mahesh](https://www.ruby-forum.com/u/mahesh)\
**Replies:** 4\
**Last updated:** [August 20, 2009, 10:32am UTC](https://www.ruby-forum.com/t/render-a-file/174067 "2009-08-20T10:32:20Z")

</div>

Im trying render a file 404 from public folder Is possible to render a file from ruby code i have a separate code in the lib file.i got a error like undefined method \`render’ for AdminController:Class

---

## [How to validate checkboxes](https://www.ruby-forum.com/t/how-to-validate-checkboxes/174044)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [August 20, 2009, 10:11am UTC](https://www.ruby-forum.com/t/how-to-validate-checkboxes/174044 "2009-08-20T10:11:15Z")

</div>

have the following in a partial \<% OrganisationType.find\_all\_by\_live(true).each do |ot| %\> \<%= check\_box\_tag “organisation\[‘organisation\_type\_ids’\]\[\]”, ot.id, @organisation.have\_org\_type(ot.id, @organisation.id) %\> \<%…

---

## [Will\_paginate with ajax](https://www.ruby-forum.com/t/will-paginate-with-ajax/174032)

<div class="topic-metadata">

**Author:** [@soller](https://www.ruby-forum.com/u/soller)\
**Replies:** 1\
**Last updated:** [August 20, 2009, 9:48am UTC](https://www.ruby-forum.com/t/will-paginate-with-ajax/174032 "2009-08-20T09:48:56Z")

</div>

I tried to delete from a datatable that I represent with will\_paginate and ajax. In the view there are something like that: \<% @items.each do |i| %\> "\> \<%= i.name %\> \<%= i.quantity %\> \<%= i.p…

---

## [Starter DB's (general web app question) Where to get them?](https://www.ruby-forum.com/t/starter-dbs-general-web-app-question-where-to-get-them/174050)

<div class="topic-metadata">

**Author:** [@brianp](https://www.ruby-forum.com/u/brianp)\
**Replies:** 2\
**Last updated:** [August 20, 2009, 8:53am UTC](https://www.ruby-forum.com/t/starter-dbs-general-web-app-question-where-to-get-them/174050 "2009-08-20T08:53:58Z")

</div>

Hey, I was wondering where people scrape information for the beginning of production db’s for particular things. Like if I wanted to have a website related to cars. Someones isn’t actually entering in every vehicle t…

---

## [Acts\_as\_list / acts\_as\_tree / acts\_as\_nested\_set - which one](https://www.ruby-forum.com/t/acts-as-list-acts-as-tree-acts-as-nested-set-which-one/174017)

<div class="topic-metadata">

**Author:** [@railslist](https://www.ruby-forum.com/u/railslist)\
**Replies:** 10\
**Last updated:** [August 20, 2009, 7:51am UTC](https://www.ruby-forum.com/t/acts-as-list-acts-as-tree-acts-as-nested-set-which-one/174017 "2009-08-20T07:51:29Z")

</div>

I am creating forum application which needs usage of acts\_as\_list or acts\_as\_tree or acts\_as\_nested\_set. I am unable to decide among these. please could some one recommend from their experience?

---

## [Page.replace\_html](https://www.ruby-forum.com/t/page-replace-html/174016)

<div class="topic-metadata">

**Author:** [@wap](https://www.ruby-forum.com/u/wap)\
**Replies:** 2\
**Last updated:** [August 20, 2009, 7:46am UTC](https://www.ruby-forum.com/t/page-replace-html/174016 "2009-08-20T07:46:39Z")

</div>

Hello guys I have animals/index.html.erb \<%= link\_to\_remote(‘List’,:update =\> ‘cont’, :url =\> {:action =\> :list})%\> page list And animals/list.html.erb \<%= render :partial =\> 'list'%\> And animals/\_lis…

---

## [RJS: Button to set style to visible](https://www.ruby-forum.com/t/rjs-button-to-set-style-to-visible/174026)

<div class="topic-metadata">

**Author:** [@maniga](https://www.ruby-forum.com/u/maniga)\
**Replies:** 1\
**Last updated:** [August 20, 2009, 12:58am UTC](https://www.ruby-forum.com/t/rjs-button-to-set-style-to-visible/174026 "2009-08-20T00:58:59Z")

</div>

Hi everybody! I’m back with a new question, this time about ruby on rails with javascript I have a hidden div in my page and like to set its style to visible if someone clicks a button. But this: add new item …

---

## [Create! Syntax](https://www.ruby-forum.com/t/create-syntax/174020)

<div class="topic-metadata">

**Author:** [@chero](https://www.ruby-forum.com/u/chero)\
**Replies:** 2\
**Last updated:** [August 19, 2009, 10:20pm UTC](https://www.ruby-forum.com/t/create-syntax/174020 "2009-08-19T22:20:33Z")

</div>

Hey All, Two questions. Firstly, what is the difference between create and create! I see that create is document in the api What is the difference between the two of these functions and where is the create! funct…

---

## [Issue while installing mysql gem](https://www.ruby-forum.com/t/issue-while-installing-mysql-gem/174023)

<div class="topic-metadata">

**Author:** [@Rajeswar\_reddy\_G](https://www.ruby-forum.com/u/Rajeswar_reddy_G)\
**Replies:** 1\
**Last updated:** [August 19, 2009, 9:58pm UTC](https://www.ruby-forum.com/t/issue-while-installing-mysql-gem/174023 "2009-08-19T21:58:58Z")

</div>

Hi All, I am getting below issue while installing mysql gem on my windows machine. Please help to resolve this issue. C:\\Documents and Settings\\Raj\>gem install mysql Building native extensions. This could take a whi…

---

## [Malformed XML](https://www.ruby-forum.com/t/malformed-xml/173973)

<div class="topic-metadata">

**Author:** [@tim](https://www.ruby-forum.com/u/tim)\
**Replies:** 2\
**Last updated:** [August 19, 2009, 9:42pm UTC](https://www.ruby-forum.com/t/malformed-xml/173973 "2009-08-19T21:42:14Z")

</div>

Hey all, rails 2.1 When I do this from the controller: render :xml =\> @address.errors, :status =\> :unprocessable\_entity I get a malformed root node in the XML \<active-record/errors type=“array”\> … \</active-record/er…

---

## [Regarding class\_inheritable\_accessor](https://www.ruby-forum.com/t/regarding-class-inheritable-accessor/174034)

<div class="topic-metadata">

**Author:** [@satynos](https://www.ruby-forum.com/u/satynos)\
**Replies:** 1\
**Last updated:** [August 19, 2009, 9:15pm UTC](https://www.ruby-forum.com/t/regarding-class-inheritable-accessor/174034 "2009-08-19T21:15:49Z")

</div>

By looking at the implementation of class\_inheritable\_accessor by ActiveSupport, looks like it is defining not only class methods as well as instance methods. Whats the reason behind defining both class level as well …

---

## [Mongrel in development](https://www.ruby-forum.com/t/mongrel-in-development/174031)

<div class="topic-metadata">

**Author:** [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Replies:** 6\
**Last updated:** [August 19, 2009, 8:43pm UTC](https://www.ruby-forum.com/t/mongrel-in-development/174031 "2009-08-19T20:43:50Z")

</div>

A newbie Q here… In the default leopard env. Is mongrel serving dev rails apps without sitting behind apache? In know on a production env apache or nginx etc. Is a required part of the stack. The reason I ask is, whe…

---

## [How to get current time including milliseconds for div id?](https://www.ruby-forum.com/t/how-to-get-current-time-including-milliseconds-for-div-id/174029)

<div class="topic-metadata">

**Author:** [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Replies:** 11\
**Last updated:** [August 19, 2009, 8:10pm UTC](https://www.ruby-forum.com/t/how-to-get-current-time-including-milliseconds-for-div-id/174029 "2009-08-19T20:10:07Z")

</div>

I need to auto generate a guaranteed to be unique number or string to be used something like this in a partial view \<div id=\<%=unique\_div\_id%\>\> I thought of using time.now but that only goes to seconds. I have tried r…

---

## [Method not found \> Error page](https://www.ruby-forum.com/t/method-not-found-error-page/173999)

<div class="topic-metadata">

**Author:** [@brianp](https://www.ruby-forum.com/u/brianp)\
**Replies:** 2\
**Last updated:** [August 19, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/method-not-found-error-page/173999 "2009-08-19T19:36:07Z")

</div>

Hey, I was wondering. If someone travels to a url ie. app.com/controller/method and method does not exist. How do i present them with a page not found error instead of getting Rails method not found errors? thanks, …

---

## [LAMP Developers](https://www.ruby-forum.com/t/lamp-developers/174033)

<div class="topic-metadata">

**Author:** [@Avishai](https://www.ruby-forum.com/u/Avishai)\
**Replies:** 1\
**Last updated:** [August 19, 2009, 7:26pm UTC](https://www.ruby-forum.com/t/lamp-developers/174033 "2009-08-19T19:26:10Z")

</div>

Hi everyone, Do you know any good LAMP developers in Israel who are open to doing projects for people in the US? I have someone who is looking for teams or individuals with experience in e-commerce and shopping soluti…

---

## [Rendering different views for a given action](https://www.ruby-forum.com/t/rendering-different-views-for-a-given-action/173975)

<div class="topic-metadata">

**Author:** [@glex](https://www.ruby-forum.com/u/glex)\
**Replies:** 3\
**Last updated:** [August 19, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/rendering-different-views-for-a-given-action/173975 "2009-08-19T18:13:54Z")

</div>

Hi, everyone, this is my first post here! I have a “HomeController” that has an “index” method. I have 4 views for this method: index.html.erb index.mobile\_lofi.erb index.mobile\_hifi.erb index.iphone.erb I also have…

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

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