# Rails

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

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

---

## [Share session between Node.js and Rails](https://www.ruby-forum.com/t/share-session-between-node-js-and-rails/195969)

<div class="topic-metadata">

**Author:** [@dazuma](https://www.ruby-forum.com/u/dazuma)\
**Replies:** 1\
**Last updated:** [October 5, 2010, 4:26pm UTC](https://www.ruby-forum.com/t/share-session-between-node-js-and-rails/195969 "2010-10-05T16:26:31Z")

</div>

Hi! I’m not an expert on Rails, but I’ve been doing some recent development with it. Right now, I have a working app with devise for authentication. Moreover, I am building a chat with Node.js and Socket.io and I wan…

---

## [Help with a find](https://www.ruby-forum.com/t/help-with-a-find/196017)

<div class="topic-metadata">

**Author:** [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Replies:** 3\
**Last updated:** [October 5, 2010, 3:50pm UTC](https://www.ruby-forum.com/t/help-with-a-find/196017 "2010-10-05T15:50:55Z")

</div>

I have a simple one to many relation: class Precinct has\_many :districts … end I would like to find all Precincts that have no districts in a finder. Is that possible? I also am using the searchlogic gem (very nic…

---

## [Keep collection\_select as selected after "submit"](https://www.ruby-forum.com/t/keep-collection-select-as-selected-after-submit/196006)

<div class="topic-metadata">

**Author:** [@PalaniKannan\_K](https://www.ruby-forum.com/u/PalaniKannan_K)\
**Replies:** 2\
**Last updated:** [October 5, 2010, 3:29pm UTC](https://www.ruby-forum.com/t/keep-collection-select-as-selected-after-submit/196006 "2010-10-05T15:29:43Z")

</div>

Dear All, Anybody knows to keep the selected option as alive even after “submit” in collection\_select. – With Regards Palani Kannan. K

---

## [Looking for a passionate Ruby Developers](https://www.ruby-forum.com/t/looking-for-a-passionate-ruby-developers/196019)

<div class="topic-metadata">

**Author:** [@Darren\_Fernandes](https://www.ruby-forum.com/u/Darren_Fernandes)\
**Replies:** 0\
**Last updated:** [October 5, 2010, 3:29pm UTC](https://www.ruby-forum.com/t/looking-for-a-passionate-ruby-developers/196019 "2010-10-05T15:29:43Z")

</div>

Hello Everyone, I’m looking for passionate Ruby developers with strong over all development experience. This is a full time position with our company and you would be joining an VERY strong team of well known rubyists…

---

## [Como utilizar InternacionalizaÃ§Ã£o no Rails - criar aplicaÃ§Ãµes em portuguÃªs](https://www.ruby-forum.com/t/como-utilizar-internacionalizaa-a-o-no-rails-criar-aplicaa-a-es-em-portugua-s/195981)

<div class="topic-metadata">

**Author:** [@wilson](https://www.ruby-forum.com/u/wilson)\
**Replies:** 3\
**Last updated:** [October 5, 2010, 2:36pm UTC](https://www.ruby-forum.com/t/como-utilizar-internacionalizaa-a-o-no-rails-criar-aplicaa-a-es-em-portugua-s/195981 "2010-10-05T14:36:27Z")

</div>

Depois de buscas exaustivas no google ainda não consegui utilizar o i18n para internacionalização de aplicações com o Rails 3. Parece que houve algumas mudanças em como utilizá-lo a partir do Rails 3. Gostaria de cria…

---

## [Same file in different apps](https://www.ruby-forum.com/t/same-file-in-different-apps/195524)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 6\
**Last updated:** [October 5, 2010, 2:30pm UTC](https://www.ruby-forum.com/t/same-file-in-different-apps/195524 "2010-10-05T14:30:25Z")

</div>

Hello G.s, Is there any way to use same file(model/controllers/views) between two different applications. If possible then how… ? Thanks in advance.

---

## [Vacancy Ruby on Rails Developer (Ukraine, Kyiv)](https://www.ruby-forum.com/t/vacancy-ruby-on-rails-developer-ukraine-kyiv/196009)

<div class="topic-metadata">

**Author:** [@lilit](https://www.ruby-forum.com/u/lilit)\
**Replies:** 0\
**Last updated:** [October 5, 2010, 1:10pm UTC](https://www.ruby-forum.com/t/vacancy-ruby-on-rails-developer-ukraine-kyiv/196009 "2010-10-05T13:10:07Z")

</div>

We are looking for a Ruby on Rails developer to join our team. Requirements to candidates: Strong technical and web development background Strong RoR skills, experience in Ruby on Rails (not required if candidate is …

---

## [10 Points How Cells Improves your Rails Architecture](https://www.ruby-forum.com/t/10-points-how-cells-improves-your-rails-architecture/196007)

<div class="topic-metadata">

**Author:** [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Replies:** 0\
**Last updated:** [October 5, 2010, 11:57am UTC](https://www.ruby-forum.com/t/10-points-how-cells-improves-your-rails-architecture/196007 "2010-10-05T11:57:12Z")

</div>

What steps does it take to improve your architecture with Cells? This article \[1\] discusses the best practices from keeping views dumb, via slim controllers, how to avoid messy helpers, through to hiding your caching…

---

## [Can you use rjs with jquery?](https://www.ruby-forum.com/t/can-you-use-rjs-with-jquery/195977)

<div class="topic-metadata">

**Author:** [@S\_Ahmed](https://www.ruby-forum.com/u/S_Ahmed)\
**Replies:** 1\
**Last updated:** [October 5, 2010, 11:12am UTC](https://www.ruby-forum.com/t/can-you-use-rjs-with-jquery/195977 "2010-10-05T11:12:50Z")

</div>

can rjs be used with jquery?

---

## [Img\_submit\_tag](https://www.ruby-forum.com/t/img-submit-tag/195993)

<div class="topic-metadata">

**Author:** [@dasibre](https://www.ruby-forum.com/u/dasibre)\
**Replies:** 1\
**Last updated:** [October 5, 2010, 11:07am UTC](https://www.ruby-forum.com/t/img-submit-tag/195993 "2010-10-05T11:07:04Z")

</div>

I’m a newbie, running through a rails tutorial. I’m a bit stuck on using the img\_submit\_tag. \<% @products.each do |product| -%\> \<%= link\_to image\_tag(product.image\_url, :border =\>0), :action =\> 'add\_to\_cart', :…

---

## [Cronjob in Rails?](https://www.ruby-forum.com/t/cronjob-in-rails/195983)

<div class="topic-metadata">

**Author:** [@rodrigo3n](https://www.ruby-forum.com/u/rodrigo3n)\
**Replies:** 4\
**Last updated:** [October 5, 2010, 8:18am UTC](https://www.ruby-forum.com/t/cronjob-in-rails/195983 "2010-10-05T08:18:20Z")

</div>

Hello everyone, I have to develop a cronjob in my app, it should run automatically every 2 hours, is there a way of doing it simply creating a rake task? I don’ t know how could I set the interval time for it. Do you …

---

## [Http caching a dynamic page](https://www.ruby-forum.com/t/http-caching-a-dynamic-page/195996)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 4\
**Last updated:** [October 5, 2010, 3:46am UTC](https://www.ruby-forum.com/t/http-caching-a-dynamic-page/195996 "2010-10-05T03:46:48Z")

</div>

Is it possible to take advantage of http caching/proxy caching with dynamic pages? i.e. pages with section/part that can change over time but certain part of the page remain the same. I would rather not keep re-render…

---

## [Uploading Photos - HowTo with Rails 3 ---- Which Gem?, S3?](https://www.ruby-forum.com/t/uploading-photos-howto-with-rails-3-which-gem-s3/195984)

<div class="topic-metadata">

**Author:** [@MadMen](https://www.ruby-forum.com/u/MadMen)\
**Replies:** 3\
**Last updated:** [October 5, 2010, 1:49am UTC](https://www.ruby-forum.com/t/uploading-photos-howto-with-rails-3-which-gem-s3/195984 "2010-10-05T01:49:12Z")

</div>

Hi, Here’s what I’m trying to achieve: Allow users to upload a photo for their profile Allow users to upload photos as blog posts That being said, here’s what I need your expert opinion on: S3, is this still the be…

---

## [How to write an ActiveRecord conditions containing null?](https://www.ruby-forum.com/t/how-to-write-an-activerecord-conditions-containing-null/195963)

<div class="topic-metadata">

**Author:** [@jdunneuk](https://www.ruby-forum.com/u/jdunneuk)\
**Replies:** 13\
**Last updated:** [October 4, 2010, 11:55pm UTC](https://www.ruby-forum.com/t/how-to-write-an-activerecord-conditions-containing-null/195963 "2010-10-04T23:55:12Z")

</div>

Code snippet: conditions = {:org =\> \[“ABC”, “XYZ”\]} Defect.count :conditions =\> conditions work as expected. This doesn’t: conditions = {:org =\> \[“ABC”, “XYZ”, nil\]} Defect.count :conditions =\> conditions Get erro…

---

## [File upload with attachment\_fu](https://www.ruby-forum.com/t/file-upload-with-attachment-fu/195991)

<div class="topic-metadata">

**Author:** [@krunal\_shah](https://www.ruby-forum.com/u/krunal_shah)\
**Replies:** 0\
**Last updated:** [October 4, 2010, 11:30pm UTC](https://www.ruby-forum.com/t/file-upload-with-attachment-fu/195991 "2010-10-04T23:30:00Z")

</div>

Right now i am uploading file in public folder… This is my setting … This code is working fine … Class ClientDocument \< NdsiActiveRecord has\_attachment :storage =\> :file\_system, :max\_size =\> 20.megabytes def self.u…

---

## [Rails 3 DataMapper dm-rails sqlite3 issue](https://www.ruby-forum.com/t/rails-3-datamapper-dm-rails-sqlite3-issue/195989)

<div class="topic-metadata">

**Author:** [@juan](https://www.ruby-forum.com/u/juan)\
**Replies:** 0\
**Last updated:** [October 4, 2010, 11:23pm UTC](https://www.ruby-forum.com/t/rails-3-datamapper-dm-rails-sqlite3-issue/195989 "2010-10-04T23:23:29Z")

</div>

I’ve tried to take a look to DataMapper with Rails 3, so I follow this simple instruction on GitHub - datamapper/dm-rails: Integrate DataMapper with Rails 3. $ rails new testing\_dm3 -m http://datamapper.org/templates/r…

---

## [Newbie q on activerecord - has\_one and has\_many on same table?](https://www.ruby-forum.com/t/newbie-q-on-activerecord-has-one-and-has-many-on-same-table/195986)

<div class="topic-metadata">

**Author:** [@JoshK](https://www.ruby-forum.com/u/JoshK)\
**Replies:** 2\
**Last updated:** [October 4, 2010, 10:27pm UTC](https://www.ruby-forum.com/t/newbie-q-on-activerecord-has-one-and-has-many-on-same-table/195986 "2010-10-04T22:27:13Z")

</div>

Hi I have a table where I need to identify one of the children as the “prime” child. So, its like: Parent has\_many :Child has\_one: Child :as :prime\_child (?) or something like that? Do I put something like prime\_ch…

---

## [Can't modify frozen hash](https://www.ruby-forum.com/t/cant-modify-frozen-hash/195904)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 7\
**Last updated:** [October 4, 2010, 8:46pm UTC](https://www.ruby-forum.com/t/cant-modify-frozen-hash/195904 "2010-10-04T20:46:02Z")

</div>

Hello, eversince I switched to Rails 3 I keep getting following error: RuntimeError: can’t modify frozen hash This is the affected line: self.target.save target is a polymorphic relation and never caused any problem…

---

## [MySQL setup question](https://www.ruby-forum.com/t/mysql-setup-question/195902)

<div class="topic-metadata">

**Author:** [@dazuma](https://www.ruby-forum.com/u/dazuma)\
**Replies:** 3\
**Last updated:** [October 4, 2010, 6:36pm UTC](https://www.ruby-forum.com/t/mysql-setup-question/195902 "2010-10-04T18:36:04Z")

</div>

Hello, I’m new to ror and i really like it so far! for a new application i would like to setup a ror application connecting to mysql but i can’t figure it out how. rails works fine with sqllite out the box but i need…

---

## [Packaging for Rails applications](https://www.ruby-forum.com/t/packaging-for-rails-applications/195311)

<div class="topic-metadata">

**Author:** [@anagri](https://www.ruby-forum.com/u/anagri)\
**Replies:** 9\
**Last updated:** [October 4, 2010, 6:27pm UTC](https://www.ruby-forum.com/t/packaging-for-rails-applications/195311 "2010-10-04T18:27:23Z")

</div>

I am working on a Rails app, for deployment I usually checkout the code from git repository to the production servers which are running apache with mod-rails. But checking out the complete code, I am also checking ou…

---

## [Rails 3 - Using link\_to but adding a # for AJAX Deep Linking](https://www.ruby-forum.com/t/rails-3-using-link-to-but-adding-a-for-ajax-deep-linking/195953)

<div class="topic-metadata">

**Author:** [@nobosh](https://www.ruby-forum.com/u/nobosh)\
**Replies:** 4\
**Last updated:** [October 4, 2010, 6:23pm UTC](https://www.ruby-forum.com/t/rails-3-using-link-to-but-adding-a-for-ajax-deep-linking/195953 "2010-10-04T18:23:52Z")

</div>

Hello, Currently my links in Rails are using link\_to as follows: \<%= link\_to project.name, project %\> Which makes something like: \<a href="/projects/1"\>Project 1\</a\> I’m working to implement an AJAX app with deep lin…

---

## [Rendering View output to a file](https://www.ruby-forum.com/t/rendering-view-output-to-a-file/195954)

<div class="topic-metadata">

**Author:** [@fearless\_fool](https://www.ruby-forum.com/u/fearless_fool)\
**Replies:** 3\
**Last updated:** [October 4, 2010, 6:22pm UTC](https://www.ruby-forum.com/t/rendering-view-output-to-a-file/195954 "2010-10-04T18:22:28Z")

</div>

I want to generate a set of static HTML pages for uploading to a site. Is there a simple way to get a Controller/View to render to a file or directory, suitable for uploading? I know I could fire up the server, render…

---

## [Rails 3, Validates, Custom Message](https://www.ruby-forum.com/t/rails-3-validates-custom-message/195944)

<div class="topic-metadata">

**Author:** [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Replies:** 7\
**Last updated:** [October 4, 2010, 5:49pm UTC](https://www.ruby-forum.com/t/rails-3-validates-custom-message/195944 "2010-10-04T17:49:22Z")

</div>

In Rails \< 3, I could have a validation on model such as: validates\_presence\_of :name, :message =\> “some custom message here” If I try something similar in Rails 3: validates :name, :presence =\> true , :message =\> “s…

---

## [Image upload](https://www.ruby-forum.com/t/image-upload/195964)

<div class="topic-metadata">

**Author:** [@arivarasan](https://www.ruby-forum.com/u/arivarasan)\
**Replies:** 2\
**Last updated:** [October 4, 2010, 5:07pm UTC](https://www.ruby-forum.com/t/image-upload/195964 "2010-10-04T17:07:41Z")

</div>

Hi i am newbie to RoR, i like to know how to upload a image in rails? some one help me plz.

---

## [Newbe - how to add onClick to select option?](https://www.ruby-forum.com/t/newbe-how-to-add-onclick-to-select-option/195934)

<div class="topic-metadata">

**Author:** [@zalek](https://www.ruby-forum.com/u/zalek)\
**Replies:** 2\
**Last updated:** [October 4, 2010, 4:26pm UTC](https://www.ruby-forum.com/t/newbe-how-to-add-onclick-to-select-option/195934 "2010-10-04T16:26:42Z")

</div>

I am just learning Ruby. I created a simple application where an record is added from a “new” view. Some input fields are defined as a select option (using a helper). Now I want to add a Javascript function with “oncl…

---

## [Order of validation execution](https://www.ruby-forum.com/t/order-of-validation-execution/195975)

<div class="topic-metadata">

**Author:** [@Alex\_Greif](https://www.ruby-forum.com/u/Alex_Greif)\
**Replies:** 0\
**Last updated:** [October 4, 2010, 3:18pm UTC](https://www.ruby-forum.com/t/order-of-validation-execution/195975 "2010-10-04T15:18:13Z")

</div>

in which order are the validations executed that apply to the same attribute. Say I have this code in my model: validates\_presence\_of :password validates\_confirmation\_of :password, :message =\> “must match confirm pa…

---

## [Script/rails server thin failed](https://www.ruby-forum.com/t/script-rails-server-thin-failed/194994)

<div class="topic-metadata">

**Author:** [@difei](https://www.ruby-forum.com/u/difei)\
**Replies:** 4\
**Last updated:** [October 4, 2010, 2:51pm UTC](https://www.ruby-forum.com/t/script-rails-server-thin-failed/194994 "2010-10-04T14:51:52Z")

</div>

Greetings, I have my rails 3 newly installed, everything seemed working except I tried start thin server: ~/test/rails3\_1.9$ script/rails server thin Exiting /var/lib/gems/1.9.1/gems/rack-1.2.1/lib/rack/handler/thin…

---

## [Ruby On Rails Ebooks â€“ Free downloads](https://www.ruby-forum.com/t/ruby-on-rails-ebooks-a-free-downloads/195970)

<div class="topic-metadata">

**Author:** [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Replies:** 1\
**Last updated:** [October 4, 2010, 1:56pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-ebooks-a-free-downloads/195970 "2010-10-04T13:56:15Z")

</div>

Some popular Ebooks for Ruby on Rails beginners and as well as for experts. You can find the download links with book name. – Regards, T.Veerasundaravel. @veerasundaravel

---

## [Rake gives Command failed with status (1):](https://www.ruby-forum.com/t/rake-gives-command-failed-with-status-1/195968)

<div class="topic-metadata">

**Author:** [@neilbain](https://www.ruby-forum.com/u/neilbain)\
**Replies:** 0\
**Last updated:** [October 4, 2010, 1:12pm UTC](https://www.ruby-forum.com/t/rake-gives-command-failed-with-status-1/195968 "2010-10-04T13:12:24Z")

</div>

I am trying to run rake on an app I have made. This is what happens neil@neil-laptop:~/\*\*\*\*\*\*\*\*\*\*\*\*$ rake test:units --trace (in /home/neil/\*\*\*\*\*\*\*\*\*\*\*\*) \*\* Invoke test:units (first\_time) \*\* Invoke db:test:prepare (f…

---

## [Polymorphic\_url with map.resource rails 2.3](https://www.ruby-forum.com/t/polymorphic-url-with-map-resource-rails-2-3/195967)

<div class="topic-metadata">

**Author:** [@ssmithstone](https://www.ruby-forum.com/u/ssmithstone)\
**Replies:** 0\
**Last updated:** [October 4, 2010, 12:22pm UTC](https://www.ruby-forum.com/t/polymorphic-url-with-map-resource-rails-2-3/195967 "2010-10-04T12:22:37Z")

</div>

In a rails 2.3 app when i do a polymorphic\_url with a model that is mapped with map.resource instead of map.resources I am getting a funky url “http://test.host/first\_aider.%23\<firstaider:0xb6f12578\>” where I want h…

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

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