# Rails

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

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

---

## [How would I set up a Rails-style Public dir in a Gem?](https://www.ruby-forum.com/t/how-would-i-set-up-a-rails-style-public-dir-in-a-gem/195058)

<div class="topic-metadata">

**Author:** [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Replies:** 4\
**Last updated:** [September 16, 2010, 2:00am UTC](https://www.ruby-forum.com/t/how-would-i-set-up-a-rails-style-public-dir-in-a-gem/195058 "2010-09-16T02:00:23Z")

</div>

I am working on a Rails CMS gem. I want the Gem to have its own Public dir (like Rails) to hold css/js/images etc… I have been trying a lot of different pathing options from my Gem-centric views, but no matter what I …

---

## [OT: Installing static binary of wkhtmltopdf](https://www.ruby-forum.com/t/ot-installing-static-binary-of-wkhtmltopdf/195041)

<div class="topic-metadata">

**Author:** [@ntk](https://www.ruby-forum.com/u/ntk)\
**Replies:** 5\
**Last updated:** [September 16, 2010, 12:36am UTC](https://www.ruby-forum.com/t/ot-installing-static-binary-of-wkhtmltopdf/195041 "2010-09-16T00:36:53Z")

</div>

This is OT but have not been able to get a response elsewhere (stack overflow and the project site itself) so thought someone here might know or have some ideas. First, I am using wkhtmltopdf stand alone without any …

---

## ["belongs\_to" two different people](https://www.ruby-forum.com/t/belongs-to-two-different-people/194843)

<div class="topic-metadata">

**Author:** [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Replies:** 11\
**Last updated:** [September 15, 2010, 11:36pm UTC](https://www.ruby-forum.com/t/belongs-to-two-different-people/194843 "2010-09-15T23:36:30Z")

</div>

I have a People table and a Tasks table. Some People are Managers, some are Workers. Each Task has a Manager and a Worker. How do I define the relationships? I tried a STI setup, where Managers and Workers inherit fro…

---

## [csv/Rails 3/ruby 1.9.2p0/mysql encoding problem](https://www.ruby-forum.com/t/csv-rails-3-ruby-1-9-2p0-mysql-encoding-problem/195054)

<div class="topic-metadata">

**Author:** [@paul](https://www.ruby-forum.com/u/paul)\
**Replies:** 1\
**Last updated:** [September 15, 2010, 11:33pm UTC](https://www.ruby-forum.com/t/csv-rails-3-ruby-1-9-2p0-mysql-encoding-problem/195054 "2010-09-15T23:33:05Z")

</div>

I’m having an encoding problem, even though I’m attempting to have all my data always be in utf-8. Here’s the path the data takes: I have a CSV file that I believe is in utf-8, because I’m looking at it in a hex edito…

---

## [Ckediter & ckfinder integration](https://www.ruby-forum.com/t/ckediter-ckfinder-integration/195050)

<div class="topic-metadata">

**Author:** [@HaNNiBaL80](https://www.ruby-forum.com/u/HaNNiBaL80)\
**Replies:** 0\
**Last updated:** [September 15, 2010, 10:42pm UTC](https://www.ruby-forum.com/t/ckediter-ckfinder-integration/195050 "2010-09-15T22:42:09Z")

</div>

Has anyone integrated ckfinder in rails ? Is there any other file browser plugin i can use with ckeditor ? tanks in advance

---

## [Post form example](https://www.ruby-forum.com/t/post-form-example/195027)

<div class="topic-metadata">

**Author:** [@Crooksey](https://www.ruby-forum.com/u/Crooksey)\
**Replies:** 3\
**Last updated:** [September 15, 2010, 7:47pm UTC](https://www.ruby-forum.com/t/post-form-example/195027 "2010-09-15T19:47:29Z")

</div>

Im looking for a very very basic POST form that will post data to an external website with Net:http I wonder if anyone has created one they could share?

---

## [How to send raw data from a temp file as a base64 value?](https://www.ruby-forum.com/t/how-to-send-raw-data-from-a-temp-file-as-a-base64-value/194980)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 5\
**Last updated:** [September 15, 2010, 7:44pm UTC](https://www.ruby-forum.com/t/how-to-send-raw-data-from-a-temp-file-as-a-base64-value/194980 "2010-09-15T19:44:11Z")

</div>

I am trying to send data from a remote file attachment… attachment\[‘url’\] = “http://www.mydomain.com/resource/download/54643” I wrote a class RemoteFile \< ::Tempfile to fetch to remote data remote\_file = RemoteFile.ne…

---

## [Rails3 development mode performance issues](https://www.ruby-forum.com/t/rails3-development-mode-performance-issues/195043)

<div class="topic-metadata">

**Author:** [@CUCUCU](https://www.ruby-forum.com/u/CUCUCU)\
**Replies:** 1\
**Last updated:** [September 15, 2010, 7:25pm UTC](https://www.ruby-forum.com/t/rails3-development-mode-performance-issues/195043 "2010-09-15T19:25:27Z")

</div>

Hi I’m developing an app on Rails3. Development mode performance seems to be pretty poor, especially on pages involving AJAX and several queries. On an AJAX search page, result requests take anything from 500-600ms t…

---

## [Rails connection sqlserver 2005 there some wrong!](https://www.ruby-forum.com/t/rails-connection-sqlserver-2005-there-some-wrong/194958)

<div class="topic-metadata">

**Author:** [@deandeng](https://www.ruby-forum.com/u/deandeng)\
**Replies:** 2\
**Last updated:** [September 15, 2010, 2:55pm UTC](https://www.ruby-forum.com/t/rails-connection-sqlserver-2005-there-some-wrong/194958 "2010-09-15T14:55:34Z")

</div>

hi erevy one i use ruby 1.8.7 ,rails is 2.2.2 fisrt get the latest source distribution of Ruby-DBI from: http://rubyforge.org/projects/ruby-dbi/ and copy the file: rub-DBI is 0.2.2 lib/dbd/ADO.rb to: X:/ruby/li…

---

## [Good hosting for Rails3?](https://www.ruby-forum.com/t/good-hosting-for-rails3/194977)

<div class="topic-metadata">

**Author:** [@pu2011](https://www.ruby-forum.com/u/pu2011)\
**Replies:** 5\
**Last updated:** [September 15, 2010, 2:43pm UTC](https://www.ruby-forum.com/t/good-hosting-for-rails3/194977 "2010-09-15T14:43:54Z")

</div>

Hi guys any advice about hosting for Rails 3 ? I will need to use a search engine like Sunspot / Solr Heroku ? Slicehost ? Rackspace ? advice will be appreciated. thanks. – Aldo

---

## [Adding a selected checkbox to a new nested model without polluting the model](https://www.ruby-forum.com/t/adding-a-selected-checkbox-to-a-new-nested-model-without-polluting-the-model/194631)

<div class="topic-metadata">

**Author:** [@gamov](https://www.ruby-forum.com/u/gamov)\
**Replies:** 5\
**Last updated:** [September 15, 2010, 2:06pm UTC](https://www.ruby-forum.com/t/adding-a-selected-checkbox-to-a-new-nested-model-without-polluting-the-model/194631 "2010-09-15T14:06:58Z")

</div>

Context: I have a GoodsReturn model with many ReturnedItem. For the new view, I create a new GoodsReturn with many new ReturnedItems from a sale (and its SoldItems). Problem: I want to have a Add/Selected checkbox w…

---

## [Time Zone](https://www.ruby-forum.com/t/time-zone/195016)

<div class="topic-metadata">

**Author:** [@priyadharsini](https://www.ruby-forum.com/u/priyadharsini)\
**Replies:** 3\
**Last updated:** [September 15, 2010, 2:01pm UTC](https://www.ruby-forum.com/t/time-zone/195016 "2010-09-15T14:01:41Z")

</div>

Hi All, How can i get time zone for a country through rails code? For example, i need time zone for the countries like UK,USA,Japan,Thailand,etc… Thanks, Priya

---

## [Affiliate program](https://www.ruby-forum.com/t/affiliate-program/195019)

<div class="topic-metadata">

**Author:** [@zurich\_by\_night](https://www.ruby-forum.com/u/zurich_by_night)\
**Replies:** 0\
**Last updated:** [September 15, 2010, 1:27pm UTC](https://www.ruby-forum.com/t/affiliate-program/195019 "2010-09-15T13:27:09Z")

</div>

Hello all, Does anyone know of a tutorial / gem / plugin that keeps track of / manage affiliate programs? I’ve got links, such as http://localhost:3000/referrals/ae46308a1 I need to know how I can manage this in my a…

---

## [Mp3 recorder in rails](https://www.ruby-forum.com/t/mp3-recorder-in-rails/188079)

<div class="topic-metadata">

**Author:** [@prad\_kris](https://www.ruby-forum.com/u/prad_kris)\
**Replies:** 2\
**Last updated:** [September 15, 2010, 1:05pm UTC](https://www.ruby-forum.com/t/mp3-recorder-in-rails/188079 "2010-09-15T13:05:02Z")

</div>

Hi, I want to have a voice recorder in my website. Users can record their voice & after they record, when they save it, it should be saved as mp3 file. I don’t have any idea about this. Pls help me how to do this. T…

---

## [Update\_all without callbacks](https://www.ruby-forum.com/t/update-all-without-callbacks/195006)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 2\
**Last updated:** [September 15, 2010, 11:34am UTC](https://www.ruby-forum.com/t/update-all-without-callbacks/195006 "2010-09-15T11:34:33Z")

</div>

How do I stop callbacks when using Model.update\_all? Or stop it for certain columns?

---

## [Ruby and Rails on JVM](https://www.ruby-forum.com/t/ruby-and-rails-on-jvm/193642)

<div class="topic-metadata">

**Author:** [@adi](https://www.ruby-forum.com/u/adi)\
**Replies:** 2\
**Last updated:** [September 15, 2010, 10:28am UTC](https://www.ruby-forum.com/t/ruby-and-rails-on-jvm/193642 "2010-09-15T10:28:02Z")

</div>

Hi, sorry if this is OT. I wanted to if there are any limitations of jRuby. The community does not discuss this much and i feel its not used that much. What are the reasons? Thanks, Adi

---

## [How to set otherlang.yml as default for my ROR application](https://www.ruby-forum.com/t/how-to-set-otherlang-yml-as-default-for-my-ror-application/195003)

<div class="topic-metadata">

**Author:** [@arunachandu](https://www.ruby-forum.com/u/arunachandu)\
**Replies:** 2\
**Last updated:** [September 15, 2010, 9:57am UTC](https://www.ruby-forum.com/t/how-to-set-otherlang-yml-as-default-for-my-ror-application/195003 "2010-09-15T09:57:48Z")

</div>

Hi , I am working on Internationalization . I have the otherlanguagefile.yml file for all the locales . By default my application takes en.yml . How could i set otherlanguagefile.yml as default.

---

## [Where to get the plugin "acts\_as\_attachment"](https://www.ruby-forum.com/t/where-to-get-the-plugin-acts-as-attachment/194952)

<div class="topic-metadata">

**Author:** [@lambda](https://www.ruby-forum.com/u/lambda)\
**Replies:** 7\
**Last updated:** [September 15, 2010, 9:24am UTC](https://www.ruby-forum.com/t/where-to-get-the-plugin-acts-as-attachment/194952 "2010-09-15T09:24:30Z")

</div>

I tried to get “acts\_as\_attachment”. All I get from the website is the link list below. http://svn.techno-weenie.net/projects/plugins/acts\_as\_attachment/ This link seems not availiable now. Does anyone know about othe…

---

## [Storing a file download in a temp file](https://www.ruby-forum.com/t/storing-a-file-download-in-a-temp-file/194989)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 6\
**Last updated:** [September 15, 2010, 9:18am UTC](https://www.ruby-forum.com/t/storing-a-file-download-in-a-temp-file/194989 "2010-09-15T09:18:21Z")

</div>

In my app, I have an URL to download a file from a remote site , when using this URL in a browser I download the file… “http://www.anotherdomain.com/resource/download/579633” but I need to to get the content of this …

---

## [Slow loading application phusion passenger](https://www.ruby-forum.com/t/slow-loading-application-phusion-passenger/194996)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 1\
**Last updated:** [September 15, 2010, 7:58am UTC](https://www.ruby-forum.com/t/slow-loading-application-phusion-passenger/194996 "2010-09-15T07:58:09Z")

</div>

Hi I have successfully used phusion passenger with my rails application. But the problem is it takes more time to load the first page. And also if I load a page and wait for some time then again next time it takes mo…

---

## [Overriding object instantiation?](https://www.ruby-forum.com/t/overriding-object-instantiation/194971)

<div class="topic-metadata">

**Author:** [@moonshadow](https://www.ruby-forum.com/u/moonshadow)\
**Replies:** 4\
**Last updated:** [September 15, 2010, 5:44am UTC](https://www.ruby-forum.com/t/overriding-object-instantiation/194971 "2010-09-15T05:44:07Z")

</div>

Hi all, ROR newbie coming from a PHP background here. I have a model that inherits from ActiveRecord::Base. I would like to extend that into two further models, to separate functionality from each other. Basically: c…

---

## [Can't see http://localhost:3000/pages/home in browser](https://www.ruby-forum.com/t/cant-see-http-localhost-3000-pages-home-in-browser/194966)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 2\
**Last updated:** [September 15, 2010, 2:31am UTC](https://www.ruby-forum.com/t/cant-see-http-localhost-3000-pages-home-in-browser/194966 "2010-09-15T02:31:00Z")

</div>

Am working my way through the railstutorial.org lesson at http://railstutorial.org/chapters/filling-in-the-layout#top Am not clear about how to start the autotest, and when I tried to see the above page in the broswer…

---

## [Using URLs as resource IDs: how to make work with Apache/Passenger?](https://www.ruby-forum.com/t/using-urls-as-resource-ids-how-to-make-work-with-apache-passenger/194983)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 2\
**Last updated:** [September 14, 2010, 10:12pm UTC](https://www.ruby-forum.com/t/using-urls-as-resource-ids-how-to-make-work-with-apache-passenger/194983 "2010-09-14T22:12:20Z")

</div>

I have a resource whose public ID is a URL. The resulting URLs look like this http://my-app.com/things/http%3A%2F%2Fexample.com/foo.png I make sure manually, that “.” in URLs are encoded as “%2E”. The route looks lik…

---

## [Textmate vs. MacVim](https://www.ruby-forum.com/t/textmate-vs-macvim/194667)

<div class="topic-metadata">

**Author:** [@gr0k](https://www.ruby-forum.com/u/gr0k)\
**Replies:** 27\
**Last updated:** [September 14, 2010, 9:55pm UTC](https://www.ruby-forum.com/t/textmate-vs-macvim/194667 "2010-09-14T21:55:21Z")

</div>

Hi Rails Community, I am about to commit to a text editor for both Ruby and RoR development. What are your opinions about investing time into Textmate vs. MacVim? I’ve already purchased Textmate and download MacVim…

---

## [Indexing feature](https://www.ruby-forum.com/t/indexing-feature/194916)

<div class="topic-metadata">

**Author:** [@awijeet](https://www.ruby-forum.com/u/awijeet)\
**Replies:** 4\
**Last updated:** [September 14, 2010, 9:37pm UTC](https://www.ruby-forum.com/t/indexing-feature/194916 "2010-09-14T21:37:48Z")

</div>

How can I enable my admin to index the tables, just after he/she makes change into database.

---

## [Automatic type casting of query parameters in finds](https://www.ruby-forum.com/t/automatic-type-casting-of-query-parameters-in-finds/194982)

<div class="topic-metadata">

**Author:** [@alexmic](https://www.ruby-forum.com/u/alexmic)\
**Replies:** 0\
**Last updated:** [September 14, 2010, 7:11pm UTC](https://www.ruby-forum.com/t/automatic-type-casting-of-query-parameters-in-finds/194982 "2010-09-14T19:11:46Z")

</div>

I’m new to ruby on rails and am using active record 3 to create some object models on top of a postgres db. I have an Environment record with a :name attribute that maps to the :name column of type :string. When I do…

---

## [Singleton user of a given role in Rails 3](https://www.ruby-forum.com/t/singleton-user-of-a-given-role-in-rails-3/194973)

<div class="topic-metadata">

**Author:** [@Manish\_Chakravarty](https://www.ruby-forum.com/u/Manish_Chakravarty)\
**Replies:** 1\
**Last updated:** [September 14, 2010, 6:49pm UTC](https://www.ruby-forum.com/t/singleton-user-of-a-given-role-in-rails-3/194973 "2010-09-14T18:49:46Z")

</div>

Hello All, I have a requirement where a site needs to have a “Super User” and exactly one of those could be created. The flow would be like this User installs the app the web app comes up the first thing that the w…

---

## [How to disable a select?](https://www.ruby-forum.com/t/how-to-disable-a-select/194912)

<div class="topic-metadata">

**Author:** [@trapper](https://www.ruby-forum.com/u/trapper)\
**Replies:** 5\
**Last updated:** [September 14, 2010, 6:19pm UTC](https://www.ruby-forum.com/t/how-to-disable-a-select/194912 "2010-09-14T18:19:20Z")

</div>

I want to use form template to render data for show. My idea is, to readonly/disable formelements. This works fine, except with selects. The following three variants of render code do not emit the keyword disabled to …

---

## [Problem with attr\_accessor](https://www.ruby-forum.com/t/problem-with-attr-accessor/194924)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 5\
**Last updated:** [September 14, 2010, 4:27pm UTC](https://www.ruby-forum.com/t/problem-with-attr-accessor/194924 "2010-09-14T16:27:29Z")

</div>

I pass a value from controller to model with attr\_accessor. before\_save works fine but not after\_find. What could be wrong? This is what I use in index @test = Test.find(:all) @test.each {|a| a.key = cookies\[:thekey\]…

---

## [Problem with tests and cookies](https://www.ruby-forum.com/t/problem-with-tests-and-cookies/194972)

<div class="topic-metadata">

**Author:** [@albert](https://www.ruby-forum.com/u/albert)\
**Replies:** 0\
**Last updated:** [September 14, 2010, 4:23pm UTC](https://www.ruby-forum.com/t/problem-with-tests-and-cookies/194972 "2010-09-14T16:23:23Z")

</div>

Hi, very briefly, this is my interaction in debugger mode in a controller test. I have my test where I initialize some cookies, but then the test itself, when the controller action is executed, fails because even thou…

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

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