# Rails

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

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

---

## [REXML UTF-16 trouble](https://www.ruby-forum.com/t/rexml-utf-16-trouble/145912)

<div class="topic-metadata">

**Author:** [@iga](https://www.ruby-forum.com/u/iga)\
**Replies:** 6\
**Last updated:** [August 15, 2008, 11:36am UTC](https://www.ruby-forum.com/t/rexml-utf-16-trouble/145912 "2008-08-15T11:36:27Z")

</div>

I’ve run into a problem parsing XML with REXML, and it looks like the problem has to do with UTF-16 encoding and a bug with REXML. I’m still running OS X 10.4.11, Ruby 1.8.6 (using Locomotive). I even tried upgrading …

---

## [Difficulty with gem install on osX](https://www.ruby-forum.com/t/difficulty-with-gem-install-on-osx/145944)

<div class="topic-metadata">

**Author:** [@rick](https://www.ruby-forum.com/u/rick)\
**Replies:** 4\
**Last updated:** [August 15, 2008, 11:34am UTC](https://www.ruby-forum.com/t/difficulty-with-gem-install-on-osx/145944 "2008-08-15T11:34:41Z")

</div>

New to the RoR world view and just learning about gems - I’ve hit a snag installing two separate gems that I can’t seem to get past with one of them. My environment is osX 10.5.4 on a ppc processor. I have gcc 4.1 (a…

---

## [Error in instant rails](https://www.ruby-forum.com/t/error-in-instant-rails/145935)

<div class="topic-metadata">

**Author:** [@anandg](https://www.ruby-forum.com/u/anandg)\
**Replies:** 1\
**Last updated:** [August 15, 2008, 10:41am UTC](https://www.ruby-forum.com/t/error-in-instant-rails/145935 "2008-08-15T10:41:54Z")

</div>

I am using instant rails 2.0,while generating a model using command line ,i am getting the following error…Please help me out :: C:/rails/ruby/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 24, col 0 : dat…

---

## [Mysql::Error: #42S02Table 'galleriamacondo\_development.media' doesn't exist: SELECT \* FROM \`media\`](https://www.ruby-forum.com/t/mysql-42s02table-galleriamacondo-development-media-doesnt-exist-select-from-media/145941)

<div class="topic-metadata">

**Author:** [@Memo](https://www.ruby-forum.com/u/Memo)\
**Replies:** 1\
**Last updated:** [August 15, 2008, 10:38am UTC](https://www.ruby-forum.com/t/mysql-42s02table-galleriamacondo-development-media-doesnt-exist-select-from-media/145941 "2008-08-15T10:38:58Z")

</div>

I ran into an error that I can’t quite figure out. I ran the following command and can’t understand why some files were changed to start with media instead of medium. I went through and updated my controller, model, …

---

## [List \> partial \> edit](https://www.ruby-forum.com/t/list-partial-edit/145854)

<div class="topic-metadata">

**Author:** [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Replies:** 21\
**Last updated:** [August 15, 2008, 8:41am UTC](https://www.ruby-forum.com/t/list-partial-edit/145854 "2008-08-15T08:41:08Z")

</div>

HI, i have a simple list of users, underneath each one i want to display the corresponding edit view via a partial. BUt, it always displays the person no1 in the edit view… Person1 …edit(partial) Person1(should be …

---

## [To\_xml and the :include option](https://www.ruby-forum.com/t/to-xml-and-the-include-option/145852)

<div class="topic-metadata">

**Author:** [@tktktk](https://www.ruby-forum.com/u/tktktk)\
**Replies:** 6\
**Last updated:** [August 15, 2008, 7:49am UTC](https://www.ruby-forum.com/t/to-xml-and-the-include-option/145852 "2008-08-15T07:49:03Z")

</div>

Hi all I’m having the following setup Table: customerarticles belongs\_to: article foreign\_key: article\_id Table: articles has\_many: customerarticles Now I’m doing a search on the table articles and I’m returning t…

---

## [Fragment Cache does not report error](https://www.ruby-forum.com/t/fragment-cache-does-not-report-error/145929)

<div class="topic-metadata">

**Author:** [@sharkie](https://www.ruby-forum.com/u/sharkie)\
**Replies:** 0\
**Last updated:** [August 15, 2008, 6:10am UTC](https://www.ruby-forum.com/t/fragment-cache-does-not-report-error/145929 "2008-08-15T06:10:14Z")

</div>

For example, if something goes wrong inside \<% cache(“similar\_stories:block:” + @story.id.to\_s, {:expire =\> 60.minutes}) do %\> \<% end %\> Then, I don’t get any error. That fragment just does not get rendered, and I w…

---

## [Make file\_column\_field editable after file is selected](https://www.ruby-forum.com/t/make-file-column-field-editable-after-file-is-selected/145921)

<div class="topic-metadata">

**Author:** [@LAB](https://www.ruby-forum.com/u/LAB)\
**Replies:** 0\
**Last updated:** [August 15, 2008, 3:11am UTC](https://www.ruby-forum.com/t/make-file-column-field-editable-after-file-is-selected/145921 "2008-08-15T03:11:16Z")

</div>

Hello. I am using the file\_column plugin to upload images. I’ve noticed that the file\_column\_field tag produces a text field box with a browse button, and when the text box is clicked on, it automatically browses, i…

---

## [Digg API Plugin](https://www.ruby-forum.com/t/digg-api-plugin/145920)

<div class="topic-metadata">

**Author:** [@tikaro](https://www.ruby-forum.com/u/tikaro)\
**Replies:** 0\
**Last updated:** [August 15, 2008, 3:10am UTC](https://www.ruby-forum.com/t/digg-api-plugin/145920 "2008-08-15T03:10:05Z")

</div>

Hi All, I’ve written a plugin for the Digg API. You can grab it on Github. Its my first real plugin… Let me know what you think.

---

## [Charting the rails](https://www.ruby-forum.com/t/charting-the-rails/145834)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 5\
**Last updated:** [August 15, 2008, 2:13am UTC](https://www.ruby-forum.com/t/charting-the-rails/145834 "2008-08-15T02:13:57Z")

</div>

Hi, There are a multitude of options for charting in rails. While looking I found Ziya, Open Flash Charts, Google API. Which have you used and what where your experiences with them? Which one do you recommend? – M. …

---

## [Detect users country](https://www.ruby-forum.com/t/detect-users-country/145918)

<div class="topic-metadata">

**Author:** [@DEfusion](https://www.ruby-forum.com/u/DEfusion)\
**Replies:** 1\
**Last updated:** [August 15, 2008, 2:08am UTC](https://www.ruby-forum.com/t/detect-users-country/145918 "2008-08-15T02:08:41Z")

</div>

Does anyone know of a plugin that will help me figure out the country the user is visiting from (e.g. based on the IP etc.)?

---

## [Is there a Litespeed hosting thread?](https://www.ruby-forum.com/t/is-there-a-litespeed-hosting-thread/145914)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 15, 2008, 12:08am UTC](https://www.ruby-forum.com/t/is-there-a-litespeed-hosting-thread/145914 "2008-08-15T00:08:12Z")

</div>

Well after many bumps and tight shoulders I’m ready to host a SasS (Software as a Service) application that I’m sure will start out small but hopefully grow over time. I’ve read many diverse works on the web and feel …

---

## [Foolproof set up under Vista?](https://www.ruby-forum.com/t/foolproof-set-up-under-vista/145821)

<div class="topic-metadata">

**Author:** [@larry](https://www.ruby-forum.com/u/larry)\
**Replies:** 3\
**Last updated:** [August 15, 2008, 12:01am UTC](https://www.ruby-forum.com/t/foolproof-set-up-under-vista/145821 "2008-08-15T00:01:00Z")

</div>

I cannot get a RoR setup under Vista Home Premium up and working with MySQL. Any suggestions. I’ve spend two weekends plus the week in between to no avail. Any help is appreciated. Thanks.

---

## [PGError: syntax error in rake db:test:clone](https://www.ruby-forum.com/t/pgerror-syntax-error-in-rake-dbclone/145822)

<div class="topic-metadata">

**Author:** [@LesleyW](https://www.ruby-forum.com/u/LesleyW)\
**Replies:** 2\
**Last updated:** [August 15, 2008, 12:00am UTC](https://www.ruby-forum.com/t/pgerror-syntax-error-in-rake-dbclone/145822 "2008-08-15T00:00:36Z")

</div>

Hi all, I’m a complete Ruby newbie trying to get a “hello world” Rails app up and running. I’m working through the tutorial, and I’m up to “rake db:test:clone” on http://wiki.rubyonrails.org/rails/pages/TutorialStepF…

---

## [Better way to generate urls such as /:state/:city/:id without having to explicitly set :state and :c](https://www.ruby-forum.com/t/better-way-to-generate-urls-such-as-state-city-id-without-having-to-explicitly-set-state-and-c/145911)

<div class="topic-metadata">

**Author:** [@phallstrom](https://www.ruby-forum.com/u/phallstrom)\
**Replies:** 0\
**Last updated:** [August 14, 2008, 11:11pm UTC](https://www.ruby-forum.com/t/better-way-to-generate-urls-such-as-state-city-id-without-having-to-explicitly-set-state-and-c/145911 "2008-08-14T23:11:22Z")

</div>

Hi all - Here’s my situation. We have a model Foo. All is well. Time for some SEO which gives us this as a route/url: /foos/:id -\> /foos/123-acme-foo Easy to do by defining Foo.to\_param. All is well. Time for som…

---

## [Mod\_proxy\_balancer question](https://www.ruby-forum.com/t/mod-proxy-balancer-question/145900)

<div class="topic-metadata">

**Author:** [@davidf](https://www.ruby-forum.com/u/davidf)\
**Replies:** 6\
**Last updated:** [August 14, 2008, 11:07pm UTC](https://www.ruby-forum.com/t/mod-proxy-balancer-question/145900 "2008-08-14T23:07:04Z")

</div>

Here’s the problem, I want to start running more mongrels on a 2nd server, but I want it so that any file uploads still go to the 1st server. Anyone know how I can do this?

---

## [%F2 in URLs after upgrade](https://www.ruby-forum.com/t/f2-in-urls-after-upgrade/145889)

<div class="topic-metadata">

**Author:** [@tom](https://www.ruby-forum.com/u/tom)\
**Replies:** 4\
**Last updated:** [August 14, 2008, 8:28pm UTC](https://www.ruby-forum.com/t/f2-in-urls-after-upgrade/145889 "2008-08-14T20:28:54Z")

</div>

Hi All, I recently upgraded a rails app to 2.0.2 and I’m having an issue when I build URLs to edit specific items. It seems I’m getting %2F instead of the slash and this causes the controller to not recognize the act…

---

## [Validates\_each, how to set options?](https://www.ruby-forum.com/t/validates-each-how-to-set-options/145848)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 3\
**Last updated:** [August 14, 2008, 8:04pm UTC](https://www.ruby-forum.com/t/validates-each-how-to-set-options/145848 "2008-08-14T20:04:14Z")

</div>

Hi I wrote the following validation in my model (using Rails 2.1) validates\_each :checker :do |record, attr, value| record.errors.add attr, :existing\_checkin\_out if value == 0 end , :on =\> :update, :if =\> :checker\_r…

---

## [Routes for external targets](https://www.ruby-forum.com/t/routes-for-external-targets/145877)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [August 14, 2008, 6:34pm UTC](https://www.ruby-forum.com/t/routes-for-external-targets/145877 "2008-08-14T18:34:13Z")

</div>

Is it possible (and if so, is it advisable?) to set up a named route that has a completely external URL as a target? I have something like this in my routes file: map.merb\_uploaded\_file\_create ‘http://another\_server/…

---

## [Web guy gets screwed over](https://www.ruby-forum.com/t/web-guy-gets-screwed-over/145875)

<div class="topic-metadata">

**Author:** [@silkcom](https://www.ruby-forum.com/u/silkcom)\
**Replies:** 0\
**Last updated:** [August 14, 2008, 6:04pm UTC](https://www.ruby-forum.com/t/web-guy-gets-screwed-over/145875 "2008-08-14T18:04:30Z")

</div>

http://digg.com/tech\_news/BargainBanners\_com\_Screwed\_this\_guy\_over\_how\_bout\_you This is a story of a guy who went to work for a web company, they screwed him over and just didn’t pay him. Help digg it so that he can …

---

## [How to list products from all subcategories?](https://www.ruby-forum.com/t/how-to-list-products-from-all-subcategories/145838)

<div class="topic-metadata">

**Author:** [@jarijokinen](https://www.ruby-forum.com/u/jarijokinen)\
**Replies:** 2\
**Last updated:** [August 14, 2008, 5:56pm UTC](https://www.ruby-forum.com/t/how-to-list-products-from-all-subcategories/145838 "2008-08-14T17:56:54Z")

</div>

Is there an easy way to list latest 10 products from all subcategories of a parent category? The max depth of the category tree is 5 levels. Models: Category belongs\_to :category has\_many :categories has\_many :prod…

---

## [Problem Routing form\_for to update action](https://www.ruby-forum.com/t/problem-routing-form-for-to-update-action/196783)

<div class="topic-metadata">

**Author:** [@mikej](https://www.ruby-forum.com/u/mikej)\
**Replies:** 2\
**Last updated:** [August 14, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/problem-routing-form-for-to-update-action/196783 "2008-08-14T17:32:14Z")

</div>

I have a controller to edit titles and text\_html for a given client. route to page: mynamespace/mycontroller/client-permalink/edit def edit @client = Client.find\_by\_permalink(params\[:id\]) if Title.exists?(\['client\_i…

---

## [Trying to create a counter for a link being clicked](https://www.ruby-forum.com/t/trying-to-create-a-counter-for-a-link-being-clicked/145871)

<div class="topic-metadata">

**Author:** [@brads](https://www.ruby-forum.com/u/brads)\
**Replies:** 0\
**Last updated:** [August 14, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/trying-to-create-a-counter-for-a-link-being-clicked/145871 "2008-08-14T17:10:31Z")

</div>

hi im trying to create a counter for each time a link is clicked, but new links can be created, so somehow i need it a count value to be linked to each link, so that only that the clicked countre increments by 1. sup…

---

## [Upgrade to Rails 2.1 from 1.2.3 :no such file to load vendor/rails/railties/lib/initializer](https://www.ruby-forum.com/t/upgrade-to-rails-2-1-from-1-2-3-no-such-file-to-load-vendor-rails-railties-lib-initializer/145867)

<div class="topic-metadata">

**Author:** [@adinda\_p](https://www.ruby-forum.com/u/adinda_p)\
**Replies:** 1\
**Last updated:** [August 14, 2008, 5:08pm UTC](https://www.ruby-forum.com/t/upgrade-to-rails-2-1-from-1-2-3-no-such-file-to-load-vendor-rails-railties-lib-initializer/145867 "2008-08-14T17:08:13Z")

</div>

Hi all,… First of all, i’ve been looking for a tutorial how to upgrade Rails, specifically upgrading rails project. The best post i can found is http://www.slashdotdash.net/articles/2007/12/03/rails-2-upgrade-notes So …

---

## [Encrypt in flash actionscript, Decrypt in Ruby Using AES](https://www.ruby-forum.com/t/encrypt-in-flash-actionscript-decrypt-in-ruby-using-aes/145866)

<div class="topic-metadata">

**Author:** [@BobiJo](https://www.ruby-forum.com/u/BobiJo)\
**Replies:** 0\
**Last updated:** [August 14, 2008, 4:57pm UTC](https://www.ruby-forum.com/t/encrypt-in-flash-actionscript-decrypt-in-ruby-using-aes/145866 "2008-08-14T16:57:40Z")

</div>

I’ve tried using http://crypto.hurlant.com/demo/ but cant make it work Any ideas? A simple example will suffice :slight\_smile: Thank you in advance Looking Forward To Your Replay

---

## [Counter cache with foreign key](https://www.ruby-forum.com/t/counter-cache-with-foreign-key/145633)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 1\
**Last updated:** [August 14, 2008, 4:28pm UTC](https://www.ruby-forum.com/t/counter-cache-with-foreign-key/145633 "2008-08-14T16:28:04Z")

</div>

Can I use the Rails counter\_cache helper in the following situation; Update.rb has\_many :replies, :class\_name =\> “UpdateReply”, :dependent =\> :destroy UpdateReply.rb belongs\_to :update, :counter\_cache =\> true At the m…

---

## [Ruby on Rails Updates](https://www.ruby-forum.com/t/ruby-on-rails-updates/145801)

<div class="topic-metadata">

**Author:** [@MrSWatson](https://www.ruby-forum.com/u/MrSWatson)\
**Replies:** 3\
**Last updated:** [August 14, 2008, 4:20pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-updates/145801 "2008-08-14T16:20:07Z")

</div>

Hello everyone, Ruby on Rails updates often confusing me, personally. (I hope I am not the only one). So what I am saying is “Is there a web site or a reference indicating what is in the new updates?” The commands ha…

---

## [Problem Routing E](https://www.ruby-forum.com/t/problem-routing-e/145856)

<div class="topic-metadata">

**Author:** [@mikej](https://www.ruby-forum.com/u/mikej)\
**Replies:** 0\
**Last updated:** [August 14, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/problem-routing-e/145856 "2008-08-14T16:16:01Z")

</div>

I have a controller to edit titles and text\_html for a given client. route to page: mynamespace/mycontroller/client-permalink/edit def edit @client = Client.find\_by\_permalink(params\[:id\]) if Title.exists?(\['client\_i…

---

## [Directory upload](https://www.ruby-forum.com/t/directory-upload/145777)

<div class="topic-metadata">

**Author:** [@torso](https://www.ruby-forum.com/u/torso)\
**Replies:** 5\
**Last updated:** [August 14, 2008, 4:07pm UTC](https://www.ruby-forum.com/t/directory-upload/145777 "2008-08-14T16:07:47Z")

</div>

Hi I need to know is it possible to upload whole directory to the server with Rails? Is there any good tutorials for that? How I could chose a directory address and send printed it to user… If i use javascript for pr…

---

## [Drop down in a form\_for action?](https://www.ruby-forum.com/t/drop-down-in-a-form-for-action/145849)

<div class="topic-metadata">

**Author:** [@CPerry](https://www.ruby-forum.com/u/CPerry)\
**Replies:** 2\
**Last updated:** [August 14, 2008, 3:42pm UTC](https://www.ruby-forum.com/t/drop-down-in-a-form-for-action/145849 "2008-08-14T15:42:30Z")

</div>

Hey, I was just looking over the Rails API for form helpers here… http://api.rubyonrails.com/classes/ActionView/Helpers/FormHelper.html I noticed that there is no tag for a select/drop down menu?? I need to create two…

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

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