# Rails

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

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

---

## [Call rb file on HTML](https://www.ruby-forum.com/t/call-rb-file-on-html/175355)

<div class="topic-metadata">

**Author:** [@marlon](https://www.ruby-forum.com/u/marlon)\
**Replies:** 3\
**Last updated:** [September 12, 2009, 2:20am UTC](https://www.ruby-forum.com/t/call-rb-file-on-html/175355 "2009-09-12T02:20:51Z")

</div>

Hi I’m a beginner in ruby and I just to know how to call rb file on HTML. For example I have an .rb file that contains a class and some functions. How can I call that on an HTML for example there’s a link or button o…

---

## [Controlling join table actions based on join table content](https://www.ruby-forum.com/t/controlling-join-table-actions-based-on-join-table-content/175372)

<div class="topic-metadata">

**Author:** [@tony](https://www.ruby-forum.com/u/tony)\
**Replies:** 1\
**Last updated:** [September 12, 2009, 1:04am UTC](https://www.ruby-forum.com/t/controlling-join-table-actions-based-on-join-table-content/175372 "2009-09-12T01:04:46Z")

</div>

I have an active record association that when I delete the parent object the ::dependent =\> :nullify option works correctly and sets the FKs to nil in the join table. Is there a way to make this happen when the reco…

---

## [Displaying form errors with nested resources](https://www.ruby-forum.com/t/displaying-form-errors-with-nested-resources/175363)

<div class="topic-metadata">

**Author:** [@Perceptes](https://www.ruby-forum.com/u/Perceptes)\
**Replies:** 2\
**Last updated:** [September 12, 2009, 1:01am UTC](https://www.ruby-forum.com/t/displaying-form-errors-with-nested-resources/175363 "2009-09-12T01:01:15Z")

</div>

Hi all, I’m having trouble with getting ActiveRecord validation errors to display on a form which submits to an action in a nested resource. This is for a basic blog application - the form in question is for adding a…

---

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

<div class="topic-metadata">

**Author:** [@paerez](https://www.ruby-forum.com/u/paerez)\
**Replies:** 3\
**Last updated:** [September 12, 2009, 12:12am UTC](https://www.ruby-forum.com/t/belongs-to-multiple-things/175244 "2009-09-12T00:12:40Z")

</div>

I am wondering what the best way to go about this situation is from a design perspective: A has many Cs. A has many Bs. B has many Cs. Example (not the example from my real app, so hopefully it makes sense). We hav…

---

## [Render ERB templates via script/runner](https://www.ruby-forum.com/t/render-erb-templates-via-script-runner/175242)

<div class="topic-metadata">

**Author:** [@jdevine](https://www.ruby-forum.com/u/jdevine)\
**Replies:** 1\
**Last updated:** [September 11, 2009, 11:54pm UTC](https://www.ruby-forum.com/t/render-erb-templates-via-script-runner/175242 "2009-09-11T23:54:32Z")

</div>

Is there an approved, easy way to generate files via erb templates through script/runner? I need to generate a set of html files offline (via a cron job). I would like to use script/runner and use an erb template with…

---

## [Attachment\_fu error? Help!](https://www.ruby-forum.com/t/attachment-fu-error-help/123360)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 1\
**Last updated:** [September 11, 2009, 11:31pm UTC](https://www.ruby-forum.com/t/attachment-fu-error-help/123360 "2009-09-11T23:31:59Z")

</div>

FreeImage exception for type ???: IPTC: Invalid key 'Tag 0x0275 Anyone seen this? FreeImage exception for type ???: IPTC: Invalid key ‘Tag 0x0275’ \[RAILS\_ROOT\]/vendor/plugins/attachment\_fu/lib/technoweenie/attachment\_…

---

## [Converting gif images to png images on the fly for PDF generation](https://www.ruby-forum.com/t/converting-gif-images-to-png-images-on-the-fly-for-pdf-generation/175378)

<div class="topic-metadata">

**Author:** [@Hypnotizing\_C](https://www.ruby-forum.com/u/Hypnotizing_C)\
**Replies:** 0\
**Last updated:** [September 11, 2009, 11:10pm UTC](https://www.ruby-forum.com/t/converting-gif-images-to-png-images-on-the-fly-for-pdf-generation/175378 "2009-09-11T23:10:02Z")

</div>

I have been using the prawn library + prawnto plugin to generate PDF files from a set of models. each model has one or more images associated with it and I include each of these images into the pdf by looping through…

---

## [Help debugging Trace/BPT trap on MacOSx 5.6.1](https://www.ruby-forum.com/t/help-debugging-trace-bpt-trap-on-macosx-5-6-1/175375)

<div class="topic-metadata">

**Author:** [@hknaksu](https://www.ruby-forum.com/u/hknaksu)\
**Replies:** 0\
**Last updated:** [September 11, 2009, 10:53pm UTC](https://www.ruby-forum.com/t/help-debugging-trace-bpt-trap-on-macosx-5-6-1/175375 "2009-09-11T22:53:40Z")

</div>

Hi All, We are trying to run our app with latest ruby 1.9.1-p243 and rails v2.3.4 but when we hit some of the controllers mongrel quits with “Trace/BPT trap” error, same thing happens with webrick. There are no addit…

---

## [Adding associate objects without persistence operation](https://www.ruby-forum.com/t/adding-associate-objects-without-persistence-operation/175374)

<div class="topic-metadata">

**Author:** [@stefans](https://www.ruby-forum.com/u/stefans)\
**Replies:** 0\
**Last updated:** [September 11, 2009, 10:46pm UTC](https://www.ruby-forum.com/t/adding-associate-objects-without-persistence-operation/175374 "2009-09-11T22:46:13Z")

</div>

Hello, I have two models, Publication and Person, that are connected via a has many - through association (join-model: Contribution). I have a Publication-object that has already been persisted (i.e. new\_record? eval…

---

## [Wish To Modify Railslist (an Open Source Rails Script)](https://www.ruby-forum.com/t/wish-to-modify-railslist-an-open-source-rails-script/175368)

<div class="topic-metadata">

**Author:** [@Digital\_Doctor](https://www.ruby-forum.com/u/Digital_Doctor)\
**Replies:** 0\
**Last updated:** [September 11, 2009, 10:14pm UTC](https://www.ruby-forum.com/t/wish-to-modify-railslist-an-open-source-rails-script/175368 "2009-09-11T22:14:26Z")

</div>

Blessings and Peace: I am a veteran technologist, but not a coder. There is an impressive Craigslist clone (Railslist.Com), that I wish to modify. My aim to create a bit more dynamic Classified meets Local News crea…

---

## [Passenger problem](https://www.ruby-forum.com/t/passenger-problem/174767)

<div class="topic-metadata">

**Author:** [@Eric\_J\_Gruber](https://www.ruby-forum.com/u/Eric_J_Gruber)\
**Replies:** 4\
**Last updated:** [September 11, 2009, 10:14pm UTC](https://www.ruby-forum.com/t/passenger-problem/174767 "2009-09-11T22:14:26Z")

</div>

I’ve used the Slicehost Intrepid instructions (http:// articles.slicehost.com/ubuntu-intrepid) to install a new Ubuntu server with Ruby, Rails and passenger. Everything seems to be working OK, save for one thing: my a…

---

## [Redeveloped static site as rails site but where have my .html gone](https://www.ruby-forum.com/t/redeveloped-static-site-as-rails-site-but-where-have-my-html-gone/174997)

<div class="topic-metadata">

**Author:** [@rpflaum](https://www.ruby-forum.com/u/rpflaum)\
**Replies:** 6\
**Last updated:** [September 11, 2009, 9:21pm UTC](https://www.ruby-forum.com/t/redeveloped-static-site-as-rails-site-but-where-have-my-html-gone/174997 "2009-09-11T21:21:45Z")

</div>

I’ve replaced a well established static site, http://pollenceramics.com with a rails based site. Rails seems rather ideal for adding various dynamic facilities like a shopping carts etc. During development, I ignored …

---

## [Select\_tag and remote\_function not passing params in IE](https://www.ruby-forum.com/t/select-tag-and-remote-function-not-passing-params-in-ie/175365)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 0\
**Last updated:** [September 11, 2009, 8:55pm UTC](https://www.ruby-forum.com/t/select-tag-and-remote-function-not-passing-params-in-ie/175365 "2009-09-11T20:55:27Z")

</div>

Hi all, I have this code: \<%= select\_tag “user\_prefix”, “\<Choose Prefix\> Mr Mrs Miss Dr Ms Captain Father Hon Judge Prof Mstr Rabbi Rev Sen Sie Sister”, :onchange =\> remote\_function( :update =\> ‘prefi…

---

## [Hoe to set production mode in rails 2.3.3](https://www.ruby-forum.com/t/hoe-to-set-production-mode-in-rails-2-3-3/175352)

<div class="topic-metadata">

**Author:** [@marmolin](https://www.ruby-forum.com/u/marmolin)\
**Replies:** 3\
**Last updated:** [September 11, 2009, 8:54pm UTC](https://www.ruby-forum.com/t/hoe-to-set-production-mode-in-rails-2-3-3/175352 "2009-09-11T20:54:14Z")

</div>

I have a very basic question, that I cannot find the answer to How to configure your application fro production mode in rails 2.3.3 The result of my googling is that I should uncomment a line ENV \[‘RAILS\_ENV’\] ||= ‘pr…

---

## [TableSort JQuery not working with dynamic Rails Table](https://www.ruby-forum.com/t/tablesort-jquery-not-working-with-dynamic-rails-table/175357)

<div class="topic-metadata">

**Author:** [@Raghav\_endiran](https://www.ruby-forum.com/u/Raghav_endiran)\
**Replies:** 1\
**Last updated:** [September 11, 2009, 8:46pm UTC](https://www.ruby-forum.com/t/tablesort-jquery-not-working-with-dynamic-rails-table/175357 "2009-09-11T20:46:38Z")

</div>

Dear All, I am trying to use Table sort Jquery plugin to sort my table in Rails application by clicking Table header. But it is not working.I added \<%= javascript\_include\_tag ‘jquery.js’%\> \<%= javascript\_include\_ta…

---

## [Lost connection to MySQL server during query](https://www.ruby-forum.com/t/lost-connection-to-mysql-server-during-query/175361)

<div class="topic-metadata">

**Author:** [@flamingsole](https://www.ruby-forum.com/u/flamingsole)\
**Replies:** 0\
**Last updated:** [September 11, 2009, 8:08pm UTC](https://www.ruby-forum.com/t/lost-connection-to-mysql-server-during-query/175361 "2009-09-11T20:08:57Z")

</div>

Thank you for any help you might provide. This is keeping me awake nights… Mysql::Error in # Lost connection to MySQL server during query RAILS\_ROOT: Application Trace c:/ruby/lib/ruby/site\_ruby/1.8/mysql.rb:1116:…

---

## [Heroku gem and two different heroku accounts](https://www.ruby-forum.com/t/heroku-gem-and-two-different-heroku-accounts/175334)

<div class="topic-metadata">

**Author:** [@anton](https://www.ruby-forum.com/u/anton)\
**Replies:** 4\
**Last updated:** [September 11, 2009, 8:08pm UTC](https://www.ruby-forum.com/t/heroku-gem-and-two-different-heroku-accounts/175334 "2009-09-11T20:08:42Z")

</div>

Heroku support works so slowly I want to ask community. 1)I have a problem with switching between my two heroku accounts on the same laptop. All of the commands execute from one of these, but I want to execute it from…

---

## [Send attached tar.gz file on rails email](https://www.ruby-forum.com/t/send-attached-tar-gz-file-on-rails-email/196998)

<div class="topic-metadata">

**Author:** [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Replies:** 3\
**Last updated:** [September 11, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/send-attached-tar-gz-file-on-rails-email/196998 "2009-09-11T19:36:59Z")

</div>

How to send attached tar.gz file on ruby mail sending. If anyone aware already, please let me know. Regards, S.Vellingiri.

---

## [Freezing Rails 2.3.4 to application](https://www.ruby-forum.com/t/freezing-rails-2-3-4-to-application/175273)

<div class="topic-metadata">

**Author:** [@neetal](https://www.ruby-forum.com/u/neetal)\
**Replies:** 3\
**Last updated:** [September 11, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/freezing-rails-2-3-4-to-application/175273 "2009-09-11T19:32:52Z")

</div>

Hi Everyone I am trying to update my Rails 2.1.2 to Rails 2.3.4. I have upgraded to Rails 2.3.4 and freezed the Rails 2.3.4 to my application. But when am trying to run the server , am getting this error config.gem:…

---

## [Nesting View Folders](https://www.ruby-forum.com/t/nesting-view-folders/175320)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 3\
**Last updated:** [September 11, 2009, 7:26pm UTC](https://www.ruby-forum.com/t/nesting-view-folders/175320 "2009-09-11T19:26:26Z")

</div>

I like to nest my view folders the same way as my resources. So, if I have: map.resources :foos do |foos| foos.resources :bars end map.resources :sums Then I’ll structure my view folders like: views/ foos/ bars/ …

---

## [Rails deployment issue... no such file or directory - getcwd? huh?](https://www.ruby-forum.com/t/rails-deployment-issue-no-such-file-or-directory-getcwd-huh/146834)

<div class="topic-metadata">

**Author:** [@arachnd](https://www.ruby-forum.com/u/arachnd)\
**Replies:** 6\
**Last updated:** [September 11, 2009, 7:23pm UTC](https://www.ruby-forum.com/t/rails-deployment-issue-no-such-file-or-directory-getcwd-huh/146834 "2009-09-11T19:23:51Z")

</div>

Everything works fine locally but when I deploy I get this: Errno::ENOENT (No such file or directory - getcwd): /vendor/rails/activerecord/lib/…/…/activesupport/lib/ active\_support/dependencies.rb:78:in expand\_path' /…

---

## [Splitting up user data entry into separate tabs](https://www.ruby-forum.com/t/splitting-up-user-data-entry-into-separate-tabs/175322)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 1\
**Last updated:** [September 11, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/splitting-up-user-data-entry-into-separate-tabs/175322 "2009-09-11T19:17:39Z")

</div>

Hi My rails app needs to input several items. Too many to show on a single page so my decision is to split the entry up into tabs. I do not want any other tabs in my app, just for that specific data entry. As exampl…

---

## [Multi user messaging](https://www.ruby-forum.com/t/multi-user-messaging/175221)

<div class="topic-metadata">

**Author:** [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Replies:** 8\
**Last updated:** [September 11, 2009, 7:01pm UTC](https://www.ruby-forum.com/t/multi-user-messaging/175221 "2009-09-11T19:01:18Z")

</div>

I’m not sure what to call this system. I’ve been trying to create something along the lines of lmgtfy’s live view\[1\]. It’s not working badly but I’m completely stuck on one thing. It’s turning more into a multi-user…

---

## [Scaffold (form) for single record](https://www.ruby-forum.com/t/scaffold-form-for-single-record/175333)

<div class="topic-metadata">

**Author:** [@RVince](https://www.ruby-forum.com/u/RVince)\
**Replies:** 2\
**Last updated:** [September 11, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/scaffold-form-for-single-record/175333 "2009-09-11T18:39:01Z")

</div>

I am looking for a sort of scaffolding (because the schema of the individual table whose individual record I do not know until runtime) for putting into a div to be displayed in say, redbox. Does anyone have anything …

---

## [Rails + Sybase ASE : group effort, please](https://www.ruby-forum.com/t/rails-sybase-ase-group-effort-please/175132)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 2\
**Last updated:** [September 11, 2009, 6:08pm UTC](https://www.ruby-forum.com/t/rails-sybase-ase-group-effort-please/175132 "2009-09-11T18:08:30Z")

</div>

Here’s what I have: Ruby 1.8.7 Rails 2.3.3 (activerecord 2.3.3, etc) activerecord-sybase-adapter ( Index of / ) Here is the base code (login info was changed to protect me) require ‘rubygems’ require ‘activerecord’ …

---

## [SELECT, belongs\_to and ActiveRecord](https://www.ruby-forum.com/t/select-belongs-to-and-activerecord/175343)

<div class="topic-metadata">

**Author:** [@glex](https://www.ruby-forum.com/u/glex)\
**Replies:** 2\
**Last updated:** [September 11, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/select-belongs-to-and-activerecord/175343 "2009-09-11T17:31:06Z")

</div>

def A belongs\_to B belongs\_to C end I want to select all the A where a.b.name LIKE “x” and a.c.name LIKE Y. Is it possible to do this with one SQL statement?

---

## [Complete Newbie needs help!](https://www.ruby-forum.com/t/complete-newbie-needs-help/175321)

<div class="topic-metadata">

**Author:** [@brad](https://www.ruby-forum.com/u/brad)\
**Replies:** 26\
**Last updated:** [September 11, 2009, 4:43pm UTC](https://www.ruby-forum.com/t/complete-newbie-needs-help/175321 "2009-09-11T16:43:04Z")

</div>

Hey, I am so stoked to learn rails. i am on an iMac so i know it’s pre- installed. I have installed rubystack. I would like to know how to start my project etc. I have tried a number of tutorials including creating a…

---

## [Counter cache help](https://www.ruby-forum.com/t/counter-cache-help/175318)

<div class="topic-metadata">

**Author:** [@chero](https://www.ruby-forum.com/u/chero)\
**Replies:** 3\
**Last updated:** [September 11, 2009, 4:26pm UTC](https://www.ruby-forum.com/t/counter-cache-help/175318 "2009-09-11T16:26:42Z")

</div>

My :counter\_cache column isn’t working properly. I wouldn’t normally ask about a relatively trivial issue like this but I’ve been banging my head on this for a bit and haven’t gotten anywhere. I must be missing some…

---

## [Output\_compression with Rails 2.3.4](https://www.ruby-forum.com/t/output-compression-with-rails-2-3-4/175335)

<div class="topic-metadata">

**Author:** [@neetal](https://www.ruby-forum.com/u/neetal)\
**Replies:** 4\
**Last updated:** [September 11, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/output-compression-with-rails-2-3-4/175335 "2009-09-11T15:23:29Z")

</div>

Hi Am in a process of upgrading my rails 2.1.2 to Rails 2.3.4. I have freezed the Rails 2.3.4 to my application as well. Here comes the problem , am using output\_compression plugin for Gzip. But it is creating proble…

---

## [Regular expression matching date, author and agency in string](https://www.ruby-forum.com/t/regular-expression-matching-date-author-and-agency-in-string/175338)

<div class="topic-metadata">

**Author:** [@san2821](https://www.ruby-forum.com/u/san2821)\
**Replies:** 2\
**Last updated:** [September 11, 2009, 2:11pm UTC](https://www.ruby-forum.com/t/regular-expression-matching-date-author-and-agency-in-string/175338 "2009-09-11T14:11:28Z")

</div>

Hello All, I wanted regular expression for the following patterns like Nauzer Bharucha, TNN 10 September 2009, 12:01am IST IANS 3 September 2009, 02:57pm IST regular expression should return date in first group aut…

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

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