# Rails

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

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

---

## [API + tokens?](https://www.ruby-forum.com/t/api-tokens/195645)

<div class="topic-metadata">

**Author:** [@paulo](https://www.ruby-forum.com/u/paulo)\
**Replies:** 4\
**Last updated:** [September 27, 2010, 5:38pm UTC](https://www.ruby-forum.com/t/api-tokens/195645 "2010-09-27T17:38:29Z")

</div>

Hi all, This is almost certainly a noob question, but I’ve hit a wall developing my rails3 app. I am looking to integrate various sections with a legacy system based on PHP. I had envisaged this being fairly straight…

---

## [Rails3 customized error message](https://www.ruby-forum.com/t/rails3-customized-error-message/195604)

<div class="topic-metadata">

**Author:** [@Nadal](https://www.ruby-forum.com/u/Nadal)\
**Replies:** 2\
**Last updated:** [September 27, 2010, 5:21pm UTC](https://www.ruby-forum.com/t/rails3-customized-error-message/195604 "2010-09-27T17:21:30Z")

</div>

In rails3 this is what I get. validates\_presence\_of :subject #=\> subject can’t be blank validates\_presence\_of :subject, :message =\> “can’t be empty” #=\> subject can’t be empty However What I want is #=\> Please ente…

---

## [Having trouble with text\_fields and CSS](https://www.ruby-forum.com/t/having-trouble-with-text-fields-and-css/195583)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 2\
**Last updated:** [September 27, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/having-trouble-with-text-fields-and-css/195583 "2010-09-27T16:39:39Z")

</div>

If I don’t use CSS, the text fields only have their labels left justified with the fields wherever they end up. This CSS .household { position:absolute; left:1.8in; } causes the text fields to be left justified at…

---

## [AR3 Selects & Read Only :-(](https://www.ruby-forum.com/t/ar3-selects-read-only/195578)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 7\
**Last updated:** [September 27, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/ar3-selects-read-only/195578 "2010-09-27T16:35:54Z")

</div>

Short version: Is there any way to override the ReadOnly behavior of AR3 when a SELECT clause is specified? I suspect I know why that change was made, but I have a Rails conversion / legacy data situation where I rea…

---

## [Question about securing videos](https://www.ruby-forum.com/t/question-about-securing-videos/195614)

<div class="topic-metadata">

**Author:** [@egervari](https://www.ruby-forum.com/u/egervari)\
**Replies:** 2\
**Last updated:** [September 27, 2010, 11:22am UTC](https://www.ruby-forum.com/t/question-about-securing-videos/195614 "2010-09-27T11:22:33Z")

</div>

Assuming you want to stream some flv videos, what is the best way to secure them via authentication while also embedding them in some kind of web flash player?

---

## [Sending files from RoR application](https://www.ruby-forum.com/t/sending-files-from-ror-application/113791)

<div class="topic-metadata">

**Author:** [@helzer](https://www.ruby-forum.com/u/helzer)\
**Replies:** 9\
**Last updated:** [September 27, 2010, 10:48am UTC](https://www.ruby-forum.com/t/sending-files-from-ror-application/113791 "2010-09-27T10:48:10Z")

</div>

I need to send about 10Mbyte files to users. Am using Apache + mongrel\_cluster. The straight forward way would be using acts\_as\_attachment with file system storage and just send it away. Would there be any big perfor…

---

## [\<\<Mounting and Converting 7z vdi Files Virtual Machine\>\>](https://www.ruby-forum.com/t/mounting-and-converting-7z-vdi-files-virtual-machine/195617)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 27, 2010, 10:28am UTC](https://www.ruby-forum.com/t/mounting-and-converting-7z-vdi-files-virtual-machine/195617 "2010-09-27T10:28:40Z")

</div>

running windows vista: downloaded virtual machine and virtual rails cannot get virtual rails to mount to virtual machine after downloading virtual rails i attempted to extract it so i could convert it to vdi file and…

---

## [Multipe Combo box Query System](https://www.ruby-forum.com/t/multipe-combo-box-query-system/195436)

<div class="topic-metadata">

**Author:** [@PalaniKannan\_K](https://www.ruby-forum.com/u/PalaniKannan_K)\
**Replies:** 6\
**Last updated:** [September 27, 2010, 10:07am UTC](https://www.ruby-forum.com/t/multipe-combo-box-query-system/195436 "2010-09-27T10:07:01Z")

</div>

Hi, Anybody tell me, how i can implement multiple query system which is related hierarchically ? Like Year, Files in that selected year. – With Regards Palani Kannan. K

---

## [I cant' use Netbenas to develop ruby](https://www.ruby-forum.com/t/i-cant-use-netbenas-to-develop-ruby/195439)

<div class="topic-metadata">

**Author:** [@tanawatl](https://www.ruby-forum.com/u/tanawatl)\
**Replies:** 7\
**Last updated:** [September 27, 2010, 9:14am UTC](https://www.ruby-forum.com/t/i-cant-use-netbenas-to-develop-ruby/195439 "2010-09-27T09:14:20Z")

</div>

I try to develop ruby with netbeans and mysql.I try to generate controller XXX and views YYY and I try access my tested web.But it shows me We’re sorry, but something went wrong. We’ve been notified about this issue …

---

## [To\_json not working because reflections are wrong](https://www.ruby-forum.com/t/to-json-not-working-because-reflections-are-wrong/195625)

<div class="topic-metadata">

**Author:** [@Bodo\_T](https://www.ruby-forum.com/u/Bodo_T)\
**Replies:** 0\
**Last updated:** [September 27, 2010, 9:13am UTC](https://www.ruby-forum.com/t/to-json-not-working-because-reflections-are-wrong/195625 "2010-09-27T09:13:10Z")

</div>

I have a class called “Foo” that looks like this: class Foo \< ActiveRecord::Base belongs\_to othermodel end and a class “Bar” that looks like this: class Bar \< Foo belongs\_to thirdmodel end When i try to seriali…

---

## [Rails 3 basic Get JSON with jQuery and output on the page flow question](https://www.ruby-forum.com/t/rails-3-basic-get-json-with-jquery-and-output-on-the-page-flow-question/195600)

<div class="topic-metadata">

**Author:** [@nobosh](https://www.ruby-forum.com/u/nobosh)\
**Replies:** 1\
**Last updated:** [September 27, 2010, 6:25am UTC](https://www.ruby-forum.com/t/rails-3-basic-get-json-with-jquery-and-output-on-the-page-flow-question/195600 "2010-09-27T06:25:47Z")

</div>

Rails newbie, thanks for help with this hopefully basic JSON type question… I have a model Books in my app, which belong\_to users. What’d I’d like to learn how to do, is use jQuery to get a JSON object of the books t…

---

## [Rails 3 - Loading a Subnav with Ajaxâ€¦ Whic h controller owns a subnav?](https://www.ruby-forum.com/t/rails-3-loading-a-subnav-with-ajaxa-whic-h-controller-owns-a-subnav/195592)

<div class="topic-metadata">

**Author:** [@nobosh](https://www.ruby-forum.com/u/nobosh)\
**Replies:** 2\
**Last updated:** [September 27, 2010, 6:22am UTC](https://www.ruby-forum.com/t/rails-3-loading-a-subnav-with-ajaxa-whic-h-controller-owns-a-subnav/195592 "2010-09-27T06:22:51Z")

</div>

Once my Rails 3 app is loaded, a user can click an item which needs to then load a dynamic subnav. My thinking is (since it needs to be dynamic) is onClick to make a jQuery AJAX call to the server and then to inject t…

---

## [Util.html\_escape() in erb file](https://www.ruby-forum.com/t/util-html-escape-in-erb-file/195427)

<div class="topic-metadata">

**Author:** [@mazoz](https://www.ruby-forum.com/u/mazoz)\
**Replies:** 10\
**Last updated:** [September 27, 2010, 6:18am UTC](https://www.ruby-forum.com/t/util-html-escape-in-erb-file/195427 "2010-09-27T06:18:45Z")

</div>

I have this in my .erb file \<%= text\_area\_tag ‘text’, h(@text), :style =\> “width: 100%”, :rows =\> 6 %\> or \<%= text\_area\_tag ‘text’, html\_escape(@text), :style =\> “width: 100%”, :rows =\> 6 %\> and it does not actuall…

---

## [Factory\_girl association with specific values](https://www.ruby-forum.com/t/factory-girl-association-with-specific-values/195577)

<div class="topic-metadata">

**Author:** [@ntk](https://www.ruby-forum.com/u/ntk)\
**Replies:** 3\
**Last updated:** [September 27, 2010, 5:27am UTC](https://www.ruby-forum.com/t/factory-girl-association-with-specific-values/195577 "2010-09-27T05:27:50Z")

</div>

Hope this should be simple: I have a User model and a Role model. Factories for each. When I create a User using FG, I want to assign a specific role. Cant seem to figure out how to do this, getting errors like: uni…

---

## [Rails 3: Engines or/and Railties. How to use them?](https://www.ruby-forum.com/t/rails-3-engines-or-and-railties-how-to-use-them/195549)

<div class="topic-metadata">

**Author:** [@zeka](https://www.ruby-forum.com/u/zeka)\
**Replies:** 2\
**Last updated:** [September 27, 2010, 3:13am UTC](https://www.ruby-forum.com/t/rails-3-engines-or-and-railties-how-to-use-them/195549 "2010-09-27T03:13:02Z")

</div>

Howdy all, I have spent a couple of days trying to figure out how to put different pieces of our (quite large) app into components. The idea was to use Rails 3 Engines/Railties and place them in /lib. Each would have…

---

## [Is there any way to upload a .png file as part of a message here?](https://www.ruby-forum.com/t/is-there-any-way-to-upload-a-png-file-as-part-of-a-message-here/195581)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 2\
**Last updated:** [September 27, 2010, 3:12am UTC](https://www.ruby-forum.com/t/is-there-any-way-to-upload-a-png-file-as-part-of-a-message-here/195581 "2010-09-27T03:12:26Z")

</div>

It would be much easier to explain the problem I’m having with a picture, but I don’t see a way to do attachments or upload files the way the help system talks about. Bob

---

## [Undefined method \`force\_encoding' for "schema\_migrations":String](https://www.ruby-forum.com/t/undefined-method-force-encoding-for-schema-migrations-string/195609)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 27, 2010, 12:39am UTC](https://www.ruby-forum.com/t/undefined-method-force-encoding-for-schema-migrations-string/195609 "2010-09-27T00:39:49Z")

</div>

Hi people! I need some help with some scary problem. I using rails 2.3.8 and can’t run my migrations. Strange thing is all works locally, but fail on server. I think I’ve missed some configuration, but can’t find whi…

---

## [Rails 3 and CentOS](https://www.ruby-forum.com/t/rails-3-and-centos/193144)

<div class="topic-metadata">

**Author:** [@raypereda](https://www.ruby-forum.com/u/raypereda)\
**Replies:** 1\
**Last updated:** [September 26, 2010, 11:18pm UTC](https://www.ruby-forum.com/t/rails-3-and-centos/193144 "2010-09-26T23:18:11Z")

</div>

I’m having a hell of a time deploying a Rails 3 (RC) app on a CentOS server. Bundler blows up in two different ways, depending on the user account that I’m under. Either I get a segment fault or an ‘unable to alloca…

---

## [Any benefit to moving to ubuntu server 10.04](https://www.ruby-forum.com/t/any-benefit-to-moving-to-ubuntu-server-10-04/195294)

<div class="topic-metadata">

**Author:** [@luckydeepak](https://www.ruby-forum.com/u/luckydeepak)\
**Replies:** 1\
**Last updated:** [September 26, 2010, 11:01pm UTC](https://www.ruby-forum.com/t/any-benefit-to-moving-to-ubuntu-server-10-04/195294 "2010-09-26T23:01:18Z")

</div>

hi, does anyone use ubuntu server in production? i am currently using ubuntu server 8.04. is there any benefit to moving to 10.04 for ruby/rails on apache. there are bugfixes in apache (Index of /httpd CHANGES\_2.2) …

---

## [How to get database gem installed for Windows and Netbeans?](https://www.ruby-forum.com/t/how-to-get-database-gem-installed-for-windows-and-netbeans/195571)

<div class="topic-metadata">

**Author:** [@tanawatl](https://www.ruby-forum.com/u/tanawatl)\
**Replies:** 1\
**Last updated:** [September 26, 2010, 8:32pm UTC](https://www.ruby-forum.com/t/how-to-get-database-gem-installed-for-windows-and-netbeans/195571 "2010-09-26T20:32:15Z")

</div>

I change the platform from Linux to Windows and use netbeans to develop The problem about database creation stay still Could not find gem ‘mysql2 (\>= 0, runtime)’ in any of the gem sources. Could not find gem ‘pg (\>= …

---

## [Missing template classified/update.erb in view path app/view](https://www.ruby-forum.com/t/missing-template-classified-update-erb-in-view-path-app-view/195208)

<div class="topic-metadata">

**Author:** [@binbash-x](https://www.ruby-forum.com/u/binbash-x)\
**Replies:** 7\
**Last updated:** [September 26, 2010, 7:34pm UTC](https://www.ruby-forum.com/t/missing-template-classified-update-erb-in-view-path-app-view/195208 "2010-09-26T19:34:38Z")

</div>

Iam trying to build a classified site, I’ve created the code to add,edit,delete posts. I am facing trouble with the edit part. When I click the edit link for a post it shows the form with all the textfields,after ent…

---

## [Autocomplete and database updates](https://www.ruby-forum.com/t/autocomplete-and-database-updates/195602)

<div class="topic-metadata">

**Author:** [@brian](https://www.ruby-forum.com/u/brian)\
**Replies:** 0\
**Last updated:** [September 26, 2010, 6:18pm UTC](https://www.ruby-forum.com/t/autocomplete-and-database-updates/195602 "2010-09-26T18:18:48Z")

</div>

I’m trying to figure out a way to have the rails3-auto-complete plugin pull back a Name field in the text box but when saving to the database, that it would only save a hidden id field and not the name (for database n…

---

## [Capistrano Config Issue](https://www.ruby-forum.com/t/capistrano-config-issue/195002)

<div class="topic-metadata">

**Author:** [@Xenio](https://www.ruby-forum.com/u/Xenio)\
**Replies:** 13\
**Last updated:** [September 26, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/capistrano-config-issue/195002 "2010-09-26T16:35:11Z")

</div>

I am using Bitnamy Rubystack on Windows 7, I have developed a ROR app I would like to deploy to a linux server that I have set up in a VM on my network. Everything works up to the point of cap deploy:check, when I do …

---

## [Adding a new RAILS\_ENV (== Rails.env)](https://www.ruby-forum.com/t/adding-a-new-rails-env-rails-env/195589)

<div class="topic-metadata">

**Author:** [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Replies:** 2\
**Last updated:** [September 26, 2010, 4:45am UTC](https://www.ruby-forum.com/t/adding-a-new-rails-env-rails-env/195589 "2010-09-26T04:45:09Z")

</div>

Easy question: what’s the ‘official’ way to add a new RAILS\_ENV, and invoke it when running the server with script/server. Is there a best practice? Thanks much!

---

## [Trying to refresh a view after changing the user language (I18n, locale)](https://www.ruby-forum.com/t/trying-to-refresh-a-view-after-changing-the-user-language-i18n-locale/195584)

<div class="topic-metadata">

**Author:** [@Patrick\_Meyer](https://www.ruby-forum.com/u/Patrick_Meyer)\
**Replies:** 1\
**Last updated:** [September 26, 2010, 1:35am UTC](https://www.ruby-forum.com/t/trying-to-refresh-a-view-after-changing-the-user-language-i18n-locale/195584 "2010-09-26T01:35:40Z")

</div>

I’m trying to build a language selector into my rails app. The selector is defined within the application layout and upon language selection the current view should be updated to the selected language. The selected la…

---

## [\[JOBS\] Calling all Alpha Males with Ruby on Rails!](https://www.ruby-forum.com/t/jobs-calling-all-alpha-males-with-ruby-on-rails/195573)

<div class="topic-metadata">

**Author:** [@Ruby\_Kate](https://www.ruby-forum.com/u/Ruby_Kate)\
**Replies:** 6\
**Last updated:** [September 25, 2010, 11:58pm UTC](https://www.ruby-forum.com/t/jobs-calling-all-alpha-males-with-ruby-on-rails/195573 "2010-09-25T23:58:24Z")

</div>

Where are you Pack Leaders and/or Peaceful Warriors? Sr. Technology Manager RoR $250k-$300k+ Washington DC & NYC Well-funded, internal startup (a creative team with deep pockets - doesn’t get any better than that!) of…

---

## [Installing Project Spree : Starting Error](https://www.ruby-forum.com/t/installing-project-spree-starting-error/195580)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 2\
**Last updated:** [September 25, 2010, 10:54pm UTC](https://www.ruby-forum.com/t/installing-project-spree-starting-error/195580 "2010-09-25T22:54:07Z")

</div>

Hey, starting the server for the project spree brings following error. Anyone some ideas? Thanks ./script/server =\> Booting Mongrel =\> Rails 2.3.8 application starting on http://0.0.0.0:3000 /System/Library/Framewo…

---

## [Is it a security risk using eval in the model?](https://www.ruby-forum.com/t/is-it-a-security-risk-using-eval-in-the-model/195572)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 7\
**Last updated:** [September 25, 2010, 10:45pm UTC](https://www.ruby-forum.com/t/is-it-a-security-risk-using-eval-in-the-model/195572 "2010-09-25T22:45:17Z")

</div>

Hi, If I want to ensure that someone has filled out the email section of a form I can write this in my model: validates\_presence\_of :email I can also achieve (more or less) the same thing by writing: validate do |ap…

---

## [Just an easy question](https://www.ruby-forum.com/t/just-an-easy-question/195575)

<div class="topic-metadata">

**Author:** [@mumza](https://www.ruby-forum.com/u/mumza)\
**Replies:** 1\
**Last updated:** [September 25, 2010, 8:35pm UTC](https://www.ruby-forum.com/t/just-an-easy-question/195575 "2010-09-25T20:35:37Z")

</div>

how to use bundle install ? I need to complete my library files thanks

---

## [UJS not getting executed upon return, in production only. Works in development](https://www.ruby-forum.com/t/ujs-not-getting-executed-upon-return-in-production-only-works-in-development/195535)

<div class="topic-metadata">

**Author:** [@William\_KSHatch\_Jr](https://www.ruby-forum.com/u/William_KSHatch_Jr)\
**Replies:** 3\
**Last updated:** [September 25, 2010, 8:32pm UTC](https://www.ruby-forum.com/t/ujs-not-getting-executed-upon-return-in-production-only-works-in-development/195535 "2010-09-25T20:32:29Z")

</div>

Hello all, I’ve got an action that’s somewhat heavy (slow) that returns …js.erb. The action completes fine, and I can see the results in firebug in the console, but the javascript isn’t being executed, on the producti…

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

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