# Rails

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

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

---

## [Ultrasphinx::UsageError (Invalid class name "Place")](https://www.ruby-forum.com/t/ultrasphinx-usageerror-invalid-class-name-place/165017)

<div class="topic-metadata">

**Author:** [@lucas](https://www.ruby-forum.com/u/lucas)\
**Replies:** 0\
**Last updated:** [April 8, 2009, 9:59am UTC](https://www.ruby-forum.com/t/ultrasphinx-usageerror-invalid-class-name-place/165017 "2009-04-08T09:59:33Z")

</div>

Hi, all … My application can run normally on development environment ,but when i change it to production, I got the problem below: Ultrasphinx::UsageError (Invalid class name “Place”): /vendor/plugins/ultrasphinx…

---

## [Problem in understanding respond\_to in rails 2.0 and above](https://www.ruby-forum.com/t/problem-in-understanding-respond-to-in-rails-2-0-and-above/165018)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 0\
**Last updated:** [April 8, 2009, 9:52am UTC](https://www.ruby-forum.com/t/problem-in-understanding-respond-to-in-rails-2-0-and-above/165018 "2009-04-08T09:52:56Z")

</div>

Hi, I am using rails 2.2. I have created a controller using “ruby script/generate scaffold person”. This created the code like this. def index @people = Person.find(:all) respond\_to do |format| format.html for…

---

## [Help -Ultrasphinx::UsageError (Invalid class name "Product")](https://www.ruby-forum.com/t/help-ultrasphinx-usageerror-invalid-class-name-product/134597)

<div class="topic-metadata">

**Author:** [@a2ahmad](https://www.ruby-forum.com/u/a2ahmad)\
**Replies:** 4\
**Last updated:** [April 8, 2009, 9:44am UTC](https://www.ruby-forum.com/t/help-ultrasphinx-usageerror-invalid-class-name-product/134597 "2009-04-08T09:44:17Z")

</div>

Hi, I’ve got Ultrasphinx running under RoR on both my local Windows development machine and now on the production Linux server. On my dev machine I’m able to search and it returns queries. On my production server I g…

---

## [Initializers not available in controllers](https://www.ruby-forum.com/t/initializers-not-available-in-controllers/164977)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 1\
**Last updated:** [April 8, 2009, 9:13am UTC](https://www.ruby-forum.com/t/initializers-not-available-in-controllers/164977 "2009-04-08T09:13:09Z")

</div>

Hi all, I have a file in config/initializers that specifies plan types. The file is: ====================== APP\_PLANS = \[ { “id” =\> 0, “name” =\> ‘free’, “Price” =\> 0, “Users” =\> 1, “Sto…

---

## [Validate file format: not by extension](https://www.ruby-forum.com/t/validate-file-format-not-by-extension/165014)

<div class="topic-metadata">

**Author:** [@brijesh](https://www.ruby-forum.com/u/brijesh)\
**Replies:** 0\
**Last updated:** [April 8, 2009, 8:22am UTC](https://www.ruby-forum.com/t/validate-file-format-not-by-extension/165014 "2009-04-08T08:22:00Z")

</div>

Hi All, I want to validate a file format before uploaded on server. I know it can be validate by content-type or using regex. But I wonder if someone change the extension of file and then uploaded it… I have to vali…

---

## [Understand rails 2.0 and above](https://www.ruby-forum.com/t/understand-rails-2-0-and-above/165007)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 1\
**Last updated:** [April 8, 2009, 8:07am UTC](https://www.ruby-forum.com/t/understand-rails-2-0-and-above/165007 "2009-04-08T08:07:32Z")

</div>

Hi, I worked on rails 1.2.3 for one and half year. Right now, I started to work on the rails 2.2. Is there any tutorial project available on any site ? So that I will understand the rails 2.0 in more details. I thin…

---

## [Font selection](https://www.ruby-forum.com/t/font-selection/165004)

<div class="topic-metadata">

**Author:** [@ewo](https://www.ruby-forum.com/u/ewo)\
**Replies:** 0\
**Last updated:** [April 8, 2009, 6:54am UTC](https://www.ruby-forum.com/t/font-selection/165004 "2009-04-08T06:54:23Z")

</div>

Hi all, I need to create a form that allows the user to select a font, including style and color. Anybody have any pointers on this? I would like to do the usual thing of having a list of font names, sizes, italic/bo…

---

## [Adding image in pdf using pdf writer](https://www.ruby-forum.com/t/adding-image-in-pdf-using-pdf-writer/164935)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 2\
**Last updated:** [April 8, 2009, 6:48am UTC](https://www.ruby-forum.com/t/adding-image-in-pdf-using-pdf-writer/164935 "2009-04-08T06:48:28Z")

</div>

Hi, I am using this code, but I am not able to add the image in pdf using pdf writer. Is there any wrong with code? def pdf1 \_pdf = PDF::Writer.new \_pdf.select\_font “Times-Roman” \_pdf.text “Hello, Ruby.”, :font\_si…

---

## [Displaying 'ticked' check boxes](https://www.ruby-forum.com/t/displaying-ticked-check-boxes/164908)

<div class="topic-metadata">

**Author:** [@helensmith](https://www.ruby-forum.com/u/helensmith)\
**Replies:** 1\
**Last updated:** [April 8, 2009, 6:43am UTC](https://www.ruby-forum.com/t/displaying-ticked-check-boxes/164908 "2009-04-08T06:43:52Z")

</div>

I need to display check boxes as ‘ticked’ in my edit function where there is a corresponding value for them in the database. In my new function a user can select between 1 and 4 tick boxes and I need these ticked chec…

---

## [Multipart REST post, XML body with file](https://www.ruby-forum.com/t/multipart-rest-post-xml-body-with-file/164997)

<div class="topic-metadata">

**Author:** [@e\_deleflie](https://www.ruby-forum.com/u/e_deleflie)\
**Replies:** 0\
**Last updated:** [April 8, 2009, 6:29am UTC](https://www.ruby-forum.com/t/multipart-rest-post-xml-body-with-file/164997 "2009-04-08T06:29:15Z")

</div>

Hi, Can anyone shed light on how to do a classic RAILS REST POST (i.e. post an XML structure representing an ActiveResource) … whilst at the same time posting a file? My current code (working) is below. It does not h…

---

## [STI Problem When Using Same Controller](https://www.ruby-forum.com/t/sti-problem-when-using-same-controller/164952)

<div class="topic-metadata">

**Author:** [@chenillen](https://www.ruby-forum.com/u/chenillen)\
**Replies:** 2\
**Last updated:** [April 8, 2009, 5:45am UTC](https://www.ruby-forum.com/t/sti-problem-when-using-same-controller/164952 "2009-04-08T05:45:24Z")

</div>

Hi there, I created few models with STI, parent model is Account, child models are CreditCard, DebitCard, etc… several sub-models, using STI. Every model works fine individually, but I have another model user associa…

---

## [Getting the associated model in a join table](https://www.ruby-forum.com/t/getting-the-associated-model-in-a-join-table/164874)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 6\
**Last updated:** [April 8, 2009, 5:15am UTC](https://www.ruby-forum.com/t/getting-the-associated-model-in-a-join-table/164874 "2009-04-08T05:15:35Z")

</div>

Let’s say we have the following models: Product \< ActiveRecord::Base has\_many :products\_suppliers has\_many :suppliers, :through =\> :products\_supplier Supplier \< ActiveRecord::Base has\_many :products\_suppliers has\_m…

---

## [Disable routing?](https://www.ruby-forum.com/t/disable-routing/164757)

<div class="topic-metadata">

**Author:** [@dacbo](https://www.ruby-forum.com/u/dacbo)\
**Replies:** 4\
**Last updated:** [April 8, 2009, 4:10am UTC](https://www.ruby-forum.com/t/disable-routing/164757 "2009-04-08T04:10:44Z")

</div>

I have a Rails application that a couple of folders in the root (of public) for Wordpress and Mediawiki that I want to completely exclude from Rails routing. How do I have the routing function of my Rails app ignore …

---

## [Association and validation](https://www.ruby-forum.com/t/association-and-validation/164990)

<div class="topic-metadata">

**Author:** [@Tiago\_Z.C](https://www.ruby-forum.com/u/Tiago_Z.C)\
**Replies:** 1\
**Last updated:** [April 8, 2009, 3:48am UTC](https://www.ruby-forum.com/t/association-and-validation/164990 "2009-04-08T03:48:31Z")

</div>

Hi I’m having some issues with models that i don’t know which is the best way of doing that. I have Post model… class Post \< ActiveRecord::Base validates\_presence\_of :name, :title has\_many :comments end and the …

---

## [What version of a gem loaded?](https://www.ruby-forum.com/t/what-version-of-a-gem-loaded/164989)

<div class="topic-metadata">

**Author:** [@robredford](https://www.ruby-forum.com/u/robredford)\
**Replies:** 0\
**Last updated:** [April 8, 2009, 2:51am UTC](https://www.ruby-forum.com/t/what-version-of-a-gem-loaded/164989 "2009-04-08T02:51:39Z")

</div>

Is there an easy way to tell what version of a gem was loaded? For example, ActiveRecord? R

---

## [\[JOBS\]Opportunity for a ROR lead programmer as co-founder](https://www.ruby-forum.com/t/jobs-opportunity-for-a-ror-lead-programmer-as-co-founder/164985)

<div class="topic-metadata">

**Author:** [@Master\_Chief](https://www.ruby-forum.com/u/Master_Chief)\
**Replies:** 2\
**Last updated:** [April 8, 2009, 2:12am UTC](https://www.ruby-forum.com/t/jobs-opportunity-for-a-ror-lead-programmer-as-co-founder/164985 "2009-04-08T02:12:29Z")

</div>

We a re a prefunding stage company working on a prototype, looking for a RoR expert. The RoR guru will help launch the company and be a part of this from the beginning. This is your chance to be part of something whic…

---

## [Slashdot: twitter on scala](https://www.ruby-forum.com/t/slashdot-twitter-on-scala/164986)

<div class="topic-metadata">

**Author:** [@tim](https://www.ruby-forum.com/u/tim)\
**Replies:** 0\
**Last updated:** [April 8, 2009, 1:32am UTC](https://www.ruby-forum.com/t/slashdot-twitter-on-scala/164986 "2009-04-08T01:32:09Z")

</div>

I suspect this is old news to many but I just picked it up on slashdot today, so in case you missed it:

---

## [More Complex Join with Rails/ActiveRecord](https://www.ruby-forum.com/t/more-complex-join-with-rails-activerecord/164969)

<div class="topic-metadata">

**Author:** [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Replies:** 2\
**Last updated:** [April 7, 2009, 11:43pm UTC](https://www.ruby-forum.com/t/more-complex-join-with-rails-activerecord/164969 "2009-04-07T23:43:38Z")

</div>

Hi, I have an Articles model. And a Moderations model. And a Users model. Articles have many Users (moderators) through Moderations. Users have many Articles (moderated articles) through Moderations. This works fin…

---

## [No method error!](https://www.ruby-forum.com/t/no-method-error/164972)

<div class="topic-metadata">

**Author:** [@mace](https://www.ruby-forum.com/u/mace)\
**Replies:** 7\
**Last updated:** [April 7, 2009, 10:32pm UTC](https://www.ruby-forum.com/t/no-method-error/164972 "2009-04-07T22:32:28Z")

</div>

Its driving me crazy!! I searched online for the answer and there are no clear explanations for the NO METHOD ERROR. in my new.html.erb file I have something like this: EmpApp#new Find me in app/views/emp\_app/new.html…

---

## [Rails assumption about getting new thread on each request](https://www.ruby-forum.com/t/rails-assumption-about-getting-new-thread-on-each-request/164973)

<div class="topic-metadata">

**Author:** [@buddycat](https://www.ruby-forum.com/u/buddycat)\
**Replies:** 0\
**Last updated:** [April 7, 2009, 10:24pm UTC](https://www.ruby-forum.com/t/rails-assumption-about-getting-new-thread-on-each-request/164973 "2009-04-07T22:24:13Z")

</div>

hi all, i am wondering if there is consensus around whether it is an assumption of the rails core that each request will be served by a new, clean thread? i ask because i am using Thread.current hash and while mongre…

---

## [\[JOBS\]Rails Developers Sought for Venture Funded Startup](https://www.ruby-forum.com/t/jobs-rails-developers-sought-for-venture-funded-startup/164965)

<div class="topic-metadata">

**Author:** [@SamH](https://www.ruby-forum.com/u/SamH)\
**Replies:** 0\
**Last updated:** [April 7, 2009, 9:32pm UTC](https://www.ruby-forum.com/t/jobs-rails-developers-sought-for-venture-funded-startup/164965 "2009-04-07T21:32:33Z")

</div>

Workstreamer LLC, a New York based startup software company pioneering the concepts of workstreams and workstreaming, is looking to hire additional Ruby on Rails developers to grow our engineering team. We are current…

---

## [Converting a date to mysql format](https://www.ruby-forum.com/t/converting-a-date-to-mysql-format/164958)

<div class="topic-metadata">

**Author:** [@chrismalek](https://www.ruby-forum.com/u/chrismalek)\
**Replies:** 1\
**Last updated:** [April 7, 2009, 8:55pm UTC](https://www.ruby-forum.com/t/converting-a-date-to-mysql-format/164958 "2009-04-07T20:55:34Z")

</div>

Is there an easy way to convert ‘13-Mar-2009 20:55 PDT’ into something that ruby understands, so that I can output it in a format that mysql understands? Thanks, Chris

---

## [Fields\_for items not updating child records?](https://www.ruby-forum.com/t/fields-for-items-not-updating-child-records/164880)

<div class="topic-metadata">

**Author:** [@internetchris](https://www.ruby-forum.com/u/internetchris)\
**Replies:** 2\
**Last updated:** [April 7, 2009, 7:41pm UTC](https://www.ruby-forum.com/t/fields-for-items-not-updating-child-records/164880 "2009-04-07T19:41:03Z")

</div>

Hey everyone, I need some help. I have an accounts controller, and am working with the show view. Each account has an “owner” and a “customer”. I can create the accounts/owners/customers just fine, but when it comes t…

---

## [Strategies for securing attachment files from unwanted access](https://www.ruby-forum.com/t/strategies-for-securing-attachment-files-from-unwanted-access/164945)

<div class="topic-metadata">

**Author:** [@apm](https://www.ruby-forum.com/u/apm)\
**Replies:** 5\
**Last updated:** [April 7, 2009, 7:16pm UTC](https://www.ruby-forum.com/t/strategies-for-securing-attachment-files-from-unwanted-access/164945 "2009-04-07T19:16:24Z")

</div>

Hi, we are developing an app for a company and their data has to be private. There will be different stakeholders with different roles accesing the application and there will be lots of attachments. We are using pape…

---

## [Add record and playback sound feature](https://www.ruby-forum.com/t/add-record-and-playback-sound-feature/164949)

<div class="topic-metadata">

**Author:** [@hapkido\_kid](https://www.ruby-forum.com/u/hapkido_kid)\
**Replies:** 0\
**Last updated:** [April 7, 2009, 7:10pm UTC](https://www.ruby-forum.com/t/add-record-and-playback-sound-feature/164949 "2009-04-07T19:10:45Z")

</div>

I am working on a project that requires a feature of record and playback voice. Does anyone have a good suggestion of approaches? The length of voice recorded is less than ten seconds. Thanks Z

---

## [Partial rendering results in a blank page?](https://www.ruby-forum.com/t/partial-rendering-results-in-a-blank-page/164948)

<div class="topic-metadata">

**Author:** [@niczm25](https://www.ruby-forum.com/u/niczm25)\
**Replies:** 1\
**Last updated:** [April 7, 2009, 6:27pm UTC](https://www.ruby-forum.com/t/partial-rendering-results-in-a-blank-page/164948 "2009-04-07T18:27:41Z")

</div>

I’m stuck with a bug at the moment which is puzzling me. I have a layout containing some HTML and a partial (for the navigation) - there is nothing else there other than the yield. If the nav is included as a partia…

---

## [File created using Spreadsheet Excel can't read on linux](https://www.ruby-forum.com/t/file-created-using-spreadsheet-excel-cant-read-on-linux/164947)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 0\
**Last updated:** [April 7, 2009, 6:08pm UTC](https://www.ruby-forum.com/t/file-created-using-spreadsheet-excel-cant-read-on-linux/164947 "2009-04-07T18:08:07Z")

</div>

Hi All, Created xls file using spreadsheet Excel is not read on linux. I am creating an xls file are as follows workbook = Spreadsheet::Excel.new(“Filepath”) worksheet = workbook.add\_worksheet(“Sheet1”) | | | wor…

---

## [Support Ruby(Rails) Growth](https://www.ruby-forum.com/t/support-ruby-rails-growth/164872)

<div class="topic-metadata">

**Author:** [@supasta](https://www.ruby-forum.com/u/supasta)\
**Replies:** 4\
**Last updated:** [April 7, 2009, 5:59pm UTC](https://www.ruby-forum.com/t/support-ruby-rails-growth/164872 "2009-04-07T17:59:59Z")

</div>

Hey Ruby\\Rails users, (like me) I know that Prototype (cough “jQuery”)is the library of choice for most rails developers. When it comes to enterprise level apps and having an extensive commercially supported library, …

---

## [How do I fix this? Power went down](https://www.ruby-forum.com/t/how-do-i-fix-this-power-went-down/164868)

<div class="topic-metadata">

**Author:** [@eengnerd](https://www.ruby-forum.com/u/eengnerd)\
**Replies:** 11\
**Last updated:** [April 7, 2009, 5:39pm UTC](https://www.ruby-forum.com/t/how-do-i-fix-this-power-went-down/164868 "2009-04-07T17:39:14Z")

</div>

I was successful in reaching page 184 in the book “Agile Web Development with Rails” 3rd edition and while running the website with PostGreSQL as the backend, the power went down. The PostGreSQL database contents loo…

---

## [Postgres - how to connect?](https://www.ruby-forum.com/t/postgres-how-to-connect/120972)

<div class="topic-metadata">

**Author:** [@makenai](https://www.ruby-forum.com/u/makenai)\
**Replies:** 6\
**Last updated:** [April 7, 2009, 3:59pm UTC](https://www.ruby-forum.com/t/postgres-how-to-connect/120972 "2009-04-07T15:59:34Z")

</div>

I am trying to connect to postgres database from RoR. I have username and password in database.yml, but when trying to connect, I get the following error: No such file or directory - /tmp/.s.PGSQL.5432 Why is it? I w…

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

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