# Rails

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

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

---

## [Deployment to a new 10.6 server (for a Rails beginner)?](https://www.ruby-forum.com/t/deployment-to-a-new-10-6-server-for-a-rails-beginner/184947)

<div class="topic-metadata">

**Author:** [@Clay\_H](https://www.ruby-forum.com/u/Clay_H)\
**Replies:** 0\
**Last updated:** [March 10, 2010, 8:39pm UTC](https://www.ruby-forum.com/t/deployment-to-a-new-10-6-server-for-a-rails-beginner/184947 "2010-03-10T20:39:36Z")

</div>

Hi, I’ve done a few small projects with Rails, mainly learning the framework. I use my laptop for development (and to-date, for production, though I haven’t really put anything into ‘real’ production). I recently pic…

---

## [Belongs\_to :through](https://www.ruby-forum.com/t/belongs-to-through/184934)

<div class="topic-metadata">

**Author:** [@joahking](https://www.ruby-forum.com/u/joahking)\
**Replies:** 2\
**Last updated:** [March 10, 2010, 6:14pm UTC](https://www.ruby-forum.com/t/belongs-to-through/184934 "2010-03-10T18:14:56Z")

</div>

hi there, lets say you have: A that belongs\_to :b, and B belongs\_to :c how do you normally go about saying A belongs\_to :c, :through =\> :b ?? searching I found two solutions: method: class A def c b.c end end …

---

## [Xml question](https://www.ruby-forum.com/t/xml-question/184923)

<div class="topic-metadata">

**Author:** [@nyxx](https://www.ruby-forum.com/u/nyxx)\
**Replies:** 2\
**Last updated:** [March 10, 2010, 4:30pm UTC](https://www.ruby-forum.com/t/xml-question/184923 "2010-03-10T16:30:26Z")

</div>

Hi People, Does anyone know what the correct way of setting an attribute for an xml element is? I know how to do it, but once I try to pass data to it, it shows up as an empty element in de outputted xml. What I have…

---

## [EAV Model vs Rails](https://www.ruby-forum.com/t/eav-model-vs-rails/184879)

<div class="topic-metadata">

**Author:** [@Sumeet\_P](https://www.ruby-forum.com/u/Sumeet_P)\
**Replies:** 4\
**Last updated:** [March 10, 2010, 4:13pm UTC](https://www.ruby-forum.com/t/eav-model-vs-rails/184879 "2010-03-10T16:13:46Z")

</div>

Hi, I have a relational database (MySQL) with 200 tables in it. Now I want to reduce number of tables (If it helps in improving the application). One approach is to use EAV database model. In which we can use a table …

---

## [Using store values from drop down list](https://www.ruby-forum.com/t/using-store-values-from-drop-down-list/184931)

<div class="topic-metadata">

**Author:** [@RVRoadie](https://www.ruby-forum.com/u/RVRoadie)\
**Replies:** 3\
**Last updated:** [March 10, 2010, 3:44pm UTC](https://www.ruby-forum.com/t/using-store-values-from-drop-down-list/184931 "2010-03-10T15:44:02Z")

</div>

Hi, I was trying to understand stored values vs display values. model code CLUB\_TYPES = \[ Displayed stored in db \[ “Public” , “pub” \], \[ “Village” , “vil” \], \[ “Private” , “pvt” \] \] validates\_inclusion\_of :club\_ty…

---

## [Path problems](https://www.ruby-forum.com/t/path-problems/184929)

<div class="topic-metadata">

**Author:** [@binbash-x](https://www.ruby-forum.com/u/binbash-x)\
**Replies:** 0\
**Last updated:** [March 10, 2010, 3:05pm UTC](https://www.ruby-forum.com/t/path-problems/184929 "2010-03-10T15:05:30Z")

</div>

%\>rails expense /usr/local/bin/rails:19: undefined method \`bin\_path’ for Gem:Module (NoMethodError). I keep getting the above error after installing rails. I have gone through every step at hivelogic. It worked once…

---

## [Passenger problem: "Missing the Rails 2.3.5 gem"](https://www.ruby-forum.com/t/passenger-problem-missing-the-rails-2-3-5-gem/184924)

<div class="topic-metadata">

**Author:** [@valafar](https://www.ruby-forum.com/u/valafar)\
**Replies:** 0\
**Last updated:** [March 10, 2010, 1:59pm UTC](https://www.ruby-forum.com/t/passenger-problem-missing-the-rails-2-3-5-gem/184924 "2010-03-10T13:59:59Z")

</div>

I’m using RVM to handle basicly two Rubies, REE and 1.9.1. I want to make sure that my Rails app works with both. For some reason it seems that Passenger can’t find my 1.9.1 Rails gem located in /home/myhome/.rvm/gems…

---

## [Request from jabber simple to openfire server](https://www.ruby-forum.com/t/request-from-jabber-simple-to-openfire-server/184920)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 0\
**Last updated:** [March 10, 2010, 1:56pm UTC](https://www.ruby-forum.com/t/request-from-jabber-simple-to-openfire-server/184920 "2010-03-10T13:56:39Z")

</div>

Dear all, I am using jabber simple api in my rails application and i have installed openfire server too. now i want to know how to send chat request from my rails application to openfire server using jabber::simple.n…

---

## [Uploading any type of file faster in rails](https://www.ruby-forum.com/t/uploading-any-type-of-file-faster-in-rails/184771)

<div class="topic-metadata">

**Author:** [@arunvoip](https://www.ruby-forum.com/u/arunvoip)\
**Replies:** 4\
**Last updated:** [March 10, 2010, 1:07pm UTC](https://www.ruby-forum.com/t/uploading-any-type-of-file-faster-in-rails/184771 "2010-03-10T13:07:09Z")

</div>

Hi all, I am working in rails (1.2.6 version), i developed file upload using file\_column plugin in my application, it is working fine, but thought that it is bit slow. i need another upload system that make the rai…

---

## [Broken route path?](https://www.ruby-forum.com/t/broken-route-path/184904)

<div class="topic-metadata">

**Author:** [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Replies:** 1\
**Last updated:** [March 10, 2010, 9:05am UTC](https://www.ruby-forum.com/t/broken-route-path/184904 "2010-03-10T09:05:26Z")

</div>

I’ve added the following to routes.rb map.resource :login if I do a rake routes I see yadav@Energy64X2 $ rake routes (in /home/yadav/dev/rails/upload) new\_login GET /login/new(.:format) {:controller=\>“logins”, :…

---

## [Undefined method join for STRING error](https://www.ruby-forum.com/t/undefined-method-join-for-string-error/184883)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 3\
**Last updated:** [March 10, 2010, 9:02am UTC](https://www.ruby-forum.com/t/undefined-method-join-for-string-error/184883 "2010-03-10T09:02:30Z")

</div>

Hey all, I was converting a haml file to erb and when finished, I ran the app and got this error message: NoMethodError in Students#student\_fail Showing app/views/students/student\_fail.erb where line #40 raised: un…

---

## [Variable Scope Within a controller](https://www.ruby-forum.com/t/variable-scope-within-a-controller/184886)

<div class="topic-metadata">

**Author:** [@Ashwin\_V](https://www.ruby-forum.com/u/Ashwin_V)\
**Replies:** 3\
**Last updated:** [March 10, 2010, 8:02am UTC](https://www.ruby-forum.com/t/variable-scope-within-a-controller/184886 "2010-03-10T08:02:36Z")

</div>

I have a controller for registering an user. i am not able to use the instance variable @username in “Process”. How do i use them ? and also is it safe to declare usernames and passwords as global variables. I am pre…

---

## [How to implement email code in RoR?](https://www.ruby-forum.com/t/how-to-implement-email-code-in-ror/197126)

<div class="topic-metadata">

**Author:** [@manish\_belsare](https://www.ruby-forum.com/u/manish_belsare)\
**Replies:** 0\
**Last updated:** [March 10, 2010, 7:59am UTC](https://www.ruby-forum.com/t/how-to-implement-email-code-in-ror/197126 "2010-03-10T07:59:48Z")

</div>

Sir , I want to implement email section in ma web application… so i found the method ‘server\_setting’ for it… Following is the method: config.action\_mailer.server\_settings = { :address =\> “smtp.gmail.com” , :port =\> …

---

## [RESTful photo album](https://www.ruby-forum.com/t/restful-photo-album/184848)

<div class="topic-metadata">

**Author:** [@DmitryPush](https://www.ruby-forum.com/u/DmitryPush)\
**Replies:** 6\
**Last updated:** [March 10, 2010, 7:56am UTC](https://www.ruby-forum.com/t/restful-photo-album/184848 "2010-03-10T07:56:58Z")

</div>

Hi, all! I’m new in Rails. I’ve read “Agile web development” and now I want made my very first rails application - photo album. But I don’t know how to design it RESTful. For example I have 3 chapters and 100 photo…

---

## [Config.action\_mailer.default\_url\_options = { :host =\> }](https://www.ruby-forum.com/t/config-action-mailer-default-url-options-host/184898)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 2\
**Last updated:** [March 10, 2010, 7:30am UTC](https://www.ruby-forum.com/t/config-action-mailer-default-url-options-host/184898 "2010-03-10T07:30:59Z")

</div>

Hi In my application I have a mail sending part in which a user get mail with a link to activate his account. What I am currently doing is as a part of test I created a staging environment And in config/environments/…

---

## ["must be nil" validation?](https://www.ruby-forum.com/t/must-be-nil-validation/184892)

<div class="topic-metadata">

**Author:** [@Seirie](https://www.ruby-forum.com/u/Seirie)\
**Replies:** 2\
**Last updated:** [March 10, 2010, 5:34am UTC](https://www.ruby-forum.com/t/must-be-nil-validation/184892 "2010-03-10T05:34:09Z")

</div>

Hey guys, is there a validation that essentially acts the opposite way of “validates\_presence\_of”. That is, the attribute in question must be nil, or blank, non-existent. If not, what’s the best way to prevent a user …

---

## [Rails ActiveRecord associations autosave option](https://www.ruby-forum.com/t/rails-activerecord-associations-autosave-option/184894)

<div class="topic-metadata">

**Author:** [@ash34](https://www.ruby-forum.com/u/ash34)\
**Replies:** 0\
**Last updated:** [March 10, 2010, 5:13am UTC](https://www.ruby-forum.com/t/rails-activerecord-associations-autosave-option/184894 "2010-03-10T05:13:38Z")

</div>

I have the following associations. class Document \< ActiveRecord::Base has\_many :document\_sections, :dependent =\> :destroy, :autosave =\> true has\_many :document\_items, :through =\> :document\_sections end class Docume…

---

## [\[ANN\] loofah 0.4.7 Released](https://www.ruby-forum.com/t/ann-loofah-0-4-7-released/184891)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 2\
**Last updated:** [March 10, 2010, 4:36am UTC](https://www.ruby-forum.com/t/ann-loofah-0-4-7-released/184891 "2010-03-10T04:36:47Z")

</div>

loofah version 0.4.7 has been released! http://github.com/flavorjones/loofah http://loofah.rubyforge.org http://rubyforge.org/projects/loofah Loofah is a general library for manipulating and transforming HTML/XML doc…

---

## [Where to put helper fns for fixtures?](https://www.ruby-forum.com/t/where-to-put-helper-fns-for-fixtures/197193)

<div class="topic-metadata">

**Author:** [@fearless\_fool](https://www.ruby-forum.com/u/fearless_fool)\
**Replies:** 2\
**Last updated:** [March 10, 2010, 2:14am UTC](https://www.ruby-forum.com/t/where-to-put-helper-fns-for-fixtures/197193 "2010-03-10T02:14:42Z")

</div>

I’m writing a fixture in test/fixtures/parrots\_model.yml, and I’m happily using ERB to flesh out my fixture. Suddenly, I realize that I need a helper function to call from my erb code, such as: polly: subtype: parak…

---

## [Ruby 1.9 and Searchlogic problem](https://www.ruby-forum.com/t/ruby-1-9-and-searchlogic-problem/184847)

<div class="topic-metadata">

**Author:** [@dries](https://www.ruby-forum.com/u/dries)\
**Replies:** 1\
**Last updated:** [March 10, 2010, 12:07am UTC](https://www.ruby-forum.com/t/ruby-1-9-and-searchlogic-problem/184847 "2010-03-10T00:07:05Z")

</div>

Hello, After updating our Rails app to ruby 1.9 there are some problems with searchlogic, here you can find the error : Error : wrong number of arguments (1 for 0) Full trace ( passenger ) : /usr/local/lib/ruby/gems…

---

## [Filter access to static content](https://www.ruby-forum.com/t/filter-access-to-static-content/184882)

<div class="topic-metadata">

**Author:** [@Geoffroy\_G](https://www.ruby-forum.com/u/Geoffroy_G)\
**Replies:** 2\
**Last updated:** [March 9, 2010, 11:26pm UTC](https://www.ruby-forum.com/t/filter-access-to-static-content/184882 "2010-03-09T23:26:02Z")

</div>

How can I filter access to static content (images, movies, pdf, …). I’m familiar with filtering access to parts of a website, but how can I manage to filter access to static files (uploaded images,…)? Greetz Geoffroy …

---

## [Automating CSS in a plugin](https://www.ruby-forum.com/t/automating-css-in-a-plugin/184624)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 2\
**Last updated:** [March 9, 2010, 10:25pm UTC](https://www.ruby-forum.com/t/automating-css-in-a-plugin/184624 "2010-03-09T22:25:43Z")

</div>

Hi, I’m looking for advice on how best to implement a plugin that contains some CSS. I would like the CSS to be automatically added to any layout so that the only action I need to perform is installation of the plugin…

---

## [Db:migrate fails after upgrade to Rails 2.3.5](https://www.ruby-forum.com/t/db-migrate-fails-after-upgrade-to-rails-2-3-5/184881)

<div class="topic-metadata">

**Author:** [@Kurt](https://www.ruby-forum.com/u/Kurt)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 9:03pm UTC](https://www.ruby-forum.com/t/db-migrate-fails-after-upgrade-to-rails-2-3-5/184881 "2010-03-09T21:03:49Z")

</div>

Hi – I’m upgrading an app from Rails 2.0.2 to 2.3.5 in development on a Mac OS/X Leopard. I unfroze the old Rails files, froze the 2.3.5 gem on the machine into the app, and some quick tests of the app showed no prob…

---

## [Retain Form Values on reset](https://www.ruby-forum.com/t/retain-form-values-on-reset/184875)

<div class="topic-metadata">

**Author:** [@Ashwin\_V](https://www.ruby-forum.com/u/Ashwin_V)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 9:02pm UTC](https://www.ruby-forum.com/t/retain-form-values-on-reset/184875 "2010-03-09T21:02:04Z")

</div>

I have a Login page created with 4 fields and a submit button for an application i am developing. Username : Email address : Password : Confirm Password : i am validating each field. so if the username is missing …

---

## [File Upload - Preserving Original File Name](https://www.ruby-forum.com/t/file-upload-preserving-original-file-name/184823)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 4\
**Last updated:** [March 9, 2010, 8:38pm UTC](https://www.ruby-forum.com/t/file-upload-preserving-original-file-name/184823 "2010-03-09T20:38:04Z")

</div>

I am using the following line of code in an action to provide a file upload capability. File.open(params\[:upload\_directory\]+’/’+‘test1’,‘wb’){|f| f.write(params\[:file2upload\].read)} Admittedly, I’m not real clear on …

---

## [How can I check my current version of rails?](https://www.ruby-forum.com/t/how-can-i-check-my-current-version-of-rails/184869)

<div class="topic-metadata">

**Author:** [@Muhammad\_mohsin\_ali](https://www.ruby-forum.com/u/Muhammad_mohsin_ali)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 7:38pm UTC](https://www.ruby-forum.com/t/how-can-i-check-my-current-version-of-rails/184869 "2010-03-09T19:38:57Z")

</div>

How can I check my current version of rails?

---

## [RoR Developer Needed For Long Term Project \[Jobs\]](https://www.ruby-forum.com/t/ror-developer-needed-for-long-term-project-jobs/184807)

<div class="topic-metadata">

**Author:** [@Blue\_D](https://www.ruby-forum.com/u/Blue_D)\
**Replies:** 3\
**Last updated:** [March 9, 2010, 7:30pm UTC](https://www.ruby-forum.com/t/ror-developer-needed-for-long-term-project-jobs/184807 "2010-03-09T19:30:45Z")

</div>

We are currently seeking a very experienced Ruby on Rails developer to complete our Rails development; a social networking platform for businesses and their customers. The project is 90%-95% complete, but we need som…

---

## [Help on deployemnt](https://www.ruby-forum.com/t/help-on-deployemnt/184850)

<div class="topic-metadata">

**Author:** [@M\_I\_R](https://www.ruby-forum.com/u/M_I_R)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 7:24pm UTC](https://www.ruby-forum.com/t/help-on-deployemnt/184850 "2010-03-09T19:24:53Z")

</div>

Look at this hmis.w3whizz.com this is my server for rail and i think its ok, i upload all my files from my local machine but it only display the homepage and any other url is not accessible like w3whizz.com please so…

---

## [How to obtain the index of selected item from select box?](https://www.ruby-forum.com/t/how-to-obtain-the-index-of-selected-item-from-select-box/184476)

<div class="topic-metadata">

**Author:** [@veena](https://www.ruby-forum.com/u/veena)\
**Replies:** 21\
**Last updated:** [March 9, 2010, 7:16pm UTC](https://www.ruby-forum.com/t/how-to-obtain-the-index-of-selected-item-from-select-box/184476 "2010-03-09T19:16:05Z")

</div>

Hai friends, I am a newbie in ROR.I hav created a select box which takes value from the databaseI dont know how to get the id or index of the value selected. Controller: class ReadingsController \< ApplicationControl…

---

## [Inverse Translation](https://www.ruby-forum.com/t/inverse-translation/184622)

<div class="topic-metadata">

**Author:** [@Veet](https://www.ruby-forum.com/u/Veet)\
**Replies:** 9\
**Last updated:** [March 9, 2010, 6:56pm UTC](https://www.ruby-forum.com/t/inverse-translation/184622 "2010-03-09T18:56:45Z")

</div>

Is there a commonly accepted method for translating user input using I18n ? I would like users to be able to enter the names of books in an entry form in their own language. The list of books is large but finite (defi…

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

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