# Rails

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

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

---

## [Monitor your server with 3 lines of Ruby](https://www.ruby-forum.com/t/monitor-your-server-with-3-lines-of-ruby/147694)

<div class="topic-metadata">

**Author:** [@fjan](https://www.ruby-forum.com/u/fjan)\
**Replies:** 0\
**Last updated:** [September 4, 2008, 9:34am UTC](https://www.ruby-forum.com/t/monitor-your-server-with-3-lines-of-ruby/147694 "2008-09-04T09:34:36Z")

</div>

I thought I’d share this snippet, it simply draws a bar chart of the visitors to your site in the last 24 hours. Great as a poor man’s solution to monitoring server load. What is cool is that it does this in 3 lines o…

---

## [Attempting to use fixtures with STI and references](https://www.ruby-forum.com/t/attempting-to-use-fixtures-with-sti-and-references/147690)

<div class="topic-metadata">

**Author:** [@darrikmazey](https://www.ruby-forum.com/u/darrikmazey)\
**Replies:** 0\
**Last updated:** [September 4, 2008, 9:29am UTC](https://www.ruby-forum.com/t/attempting-to-use-fixtures-with-sti-and-references/147690 "2008-09-04T09:29:53Z")

</div>

Hello. I’m attempting to use STI for a class that contains a reference\_id field. However, the class\_name of the reference isn’t known in the base class because each subclass uses a different reference class\_name. B…

---

## [How to add a class to my anchor?](https://www.ruby-forum.com/t/how-to-add-a-class-to-my-anchor/147673)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [September 4, 2008, 9:28am UTC](https://www.ruby-forum.com/t/how-to-add-a-class-to-my-anchor/147673 "2008-09-04T09:28:43Z")

</div>

Hi, I have \<%= link\_to ‘Add a New Prescription’, :controller =\> ‘forms’, :action =\> ‘new’, :class =\> “sidebar2Text” %\> which is producing Refill a Prescription How do I make the “class” its own attribute? Thanks…

---

## [Where to put mapping functionality](https://www.ruby-forum.com/t/where-to-put-mapping-functionality/147687)

<div class="topic-metadata">

**Author:** [@nick](https://www.ruby-forum.com/u/nick)\
**Replies:** 0\
**Last updated:** [September 4, 2008, 9:28am UTC](https://www.ruby-forum.com/t/where-to-put-mapping-functionality/147687 "2008-09-04T09:28:07Z")

</div>

Hey guys. I’ve been trying to figure out where in my app this functionality should go, but I’m really not sure. Any suggestions? A map can be created for a Neighbourhood or Property. A map has zero or more markers. A …

---

## [Finding the right session file with Session ID in log](https://www.ruby-forum.com/t/finding-the-right-session-file-with-session-id-in-log/147686)

<div class="topic-metadata">

**Author:** [@daniel](https://www.ruby-forum.com/u/daniel)\
**Replies:** 0\
**Last updated:** [September 4, 2008, 9:26am UTC](https://www.ruby-forum.com/t/finding-the-right-session-file-with-session-id-in-log/147686 "2008-09-04T09:26:57Z")

</div>

Hello, I have a dir with a lot of files like this: ruby\_sess.3728d5b872e30b3a ruby\_sess.22e35ac603d7d68f ruby\_sess.4e35d54a477ee9e9 And I am currently working to recover some data we’ve lost using the Production.lo…

---

## [\_path and \_url helpers not working with scaffolding](https://www.ruby-forum.com/t/path-and-url-helpers-not-working-with-scaffolding/143224)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [September 4, 2008, 9:26am UTC](https://www.ruby-forum.com/t/path-and-url-helpers-not-working-with-scaffolding/143224 "2008-09-04T09:26:21Z")

</div>

Here is what is happening, I have rails 2.0.2 on both my local PC running windows XP and my server which is linux. So I generated scaffolding on windows by doing script/generate scaffolding MyRec fld:string fld2:strin…

---

## [Converting web-pages to pdf](https://www.ruby-forum.com/t/converting-web-pages-to-pdf/147685)

<div class="topic-metadata">

**Author:** [@znahar](https://www.ruby-forum.com/u/znahar)\
**Replies:** 0\
**Last updated:** [September 4, 2008, 9:26am UTC](https://www.ruby-forum.com/t/converting-web-pages-to-pdf/147685 "2008-09-04T09:26:21Z")

</div>

hi. i faced such a problem: i have flash-chart on my page. how can i convert it to pdf format, containig image of that chart?

---

## [New Version of IBM\_DB Rails Adapter/Driver for IBM DataServers now available](https://www.ruby-forum.com/t/new-version-of-ibm-db-rails-adapter-driver-for-ibm-dataservers-now-available/147675)

<div class="topic-metadata">

**Author:** [@praveen](https://www.ruby-forum.com/u/praveen)\
**Replies:** 0\
**Last updated:** [September 4, 2008, 6:36am UTC](https://www.ruby-forum.com/t/new-version-of-ibm-db-rails-adapter-driver-for-ibm-dataservers-now-available/147675 "2008-09-04T06:36:42Z")

</div>

Hi All, The new version (0.10.0) of IBM\_DB is now available. This release provides support for Trusted context in the driver. More details on what trusted context is can be found at http://publib.boulder.ibm.com/info…

---

## [Aptana Colorization ... like Textmate](https://www.ruby-forum.com/t/aptana-colorization-like-textmate/147672)

<div class="topic-metadata">

**Author:** [@melvinram](https://www.ruby-forum.com/u/melvinram)\
**Replies:** 0\
**Last updated:** [September 4, 2008, 4:49am UTC](https://www.ruby-forum.com/t/aptana-colorization-like-textmate/147672 "2008-09-04T04:49:10Z")

</div>

For those of you who use Aptana as your Rails dev environment, I’ve shared my colorization (which has a coffee flavor) on github. Just download it follow the readme file. You’ll find it at: http://github.com/melvinra…

---

## [Link\_to\_remote](https://www.ruby-forum.com/t/link-to-remote/147599)

<div class="topic-metadata">

**Author:** [@pipex](https://www.ruby-forum.com/u/pipex)\
**Replies:** 3\
**Last updated:** [September 4, 2008, 4:46am UTC](https://www.ruby-forum.com/t/link-to-remote/147599 "2008-09-04T04:46:14Z")

</div>

Hi, I need to know if there is a way to use a link to remote but instead of using a string link use an image? thank for any response! – Felipe V. Contesse IngenierÃ­a Civil Industrial UC

---

## [Programming the dom in rails](https://www.ruby-forum.com/t/programming-the-dom-in-rails/147570)

<div class="topic-metadata">

**Author:** [@darren](https://www.ruby-forum.com/u/darren)\
**Replies:** 3\
**Last updated:** [September 4, 2008, 4:46am UTC](https://www.ruby-forum.com/t/programming-the-dom-in-rails/147570 "2008-09-04T04:46:14Z")

</div>

hi i’m pretty new to rails, so excuse me. Is there a way to programmatically build the DOM tree in Rails? This seems a pretty fundamental feature to have … eg, generating the view for a calendar. There’s a clear pat…

---

## [Can I call another controllers method from a controller?](https://www.ruby-forum.com/t/can-i-call-another-controllers-method-from-a-controller/147617)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 3\
**Last updated:** [September 4, 2008, 3:40am UTC](https://www.ruby-forum.com/t/can-i-call-another-controllers-method-from-a-controller/147617 "2008-09-04T03:40:10Z")

</div>

Is this possible? I don’t want to redirect, just want to utilize a method for convenience sake. I have a messages controller that just creates messages from user to user and there are many different kinds of messages…

---

## [HABTM fixtures issue](https://www.ruby-forum.com/t/habtm-fixtures-issue/147621)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 4\
**Last updated:** [September 4, 2008, 2:58am UTC](https://www.ruby-forum.com/t/habtm-fixtures-issue/147621 "2008-09-04T02:58:02Z")

</div>

Hi all , (environment : Rails 2.1, Authorization Plugin) I am setting up fixtures (w autogenerated IDs) , but I am stuck with the following issue w the roles\_users table I have a users.yaml fixtures file w following …

---

## [Validates presence of foreign\_key & auto child save](https://www.ruby-forum.com/t/validates-presence-of-foreign-key-auto-child-save/147630)

<div class="topic-metadata">

**Author:** [@rasmus](https://www.ruby-forum.com/u/rasmus)\
**Replies:** 1\
**Last updated:** [September 4, 2008, 2:04am UTC](https://www.ruby-forum.com/t/validates-presence-of-foreign-key-auto-child-save/147630 "2008-09-04T02:04:47Z")

</div>

Hi there, You so you know, I’m fairly new to rails - I still have a lot learn. For fun I’m trying to create a forum in rails. I have some problems with the create method of the topic resource. I’ve set up a virtual at…

---

## [Twice rendering of the pages](https://www.ruby-forum.com/t/twice-rendering-of-the-pages/147656)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 0\
**Last updated:** [September 4, 2008, 1:07am UTC](https://www.ruby-forum.com/t/twice-rendering-of-the-pages/147656 "2008-09-04T01:07:30Z")

</div>

Hello guys, weird problem right now with my web server. Acually it seems the server is rendering all my pages twice. While looking at tail -f log/ development.log I can see twice rendering of my actual page, like twi…

---

## [Shouldn't this work: RAILS\_ENV.development?](https://www.ruby-forum.com/t/shouldnt-this-work-rails-env-development/147650)

<div class="topic-metadata">

**Author:** [@Alfredo](https://www.ruby-forum.com/u/Alfredo)\
**Replies:** 0\
**Last updated:** [September 4, 2008, 12:04am UTC](https://www.ruby-forum.com/t/shouldnt-this-work-rails-env-development/147650 "2008-09-04T00:04:19Z")

</div>

I think some time ago I heard that some method missing functionality had been added to the string class so that you could write: string == ‘mystring’ like this: string.mystring? I tried this with Rails 2.1 and it’s …

---

## [Sharing Methods Across Fixtures](https://www.ruby-forum.com/t/sharing-methods-across-fixtures/147642)

<div class="topic-metadata">

**Author:** [@jonlog](https://www.ruby-forum.com/u/jonlog)\
**Replies:** 1\
**Last updated:** [September 3, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/sharing-methods-across-fixtures/147642 "2008-09-03T22:44:08Z")

</div>

I’ve got a fixture where a couple methods are defined in the top of the fixture that take an argument and return a date. Does anybody have any idea where can I put these methods (test\_helper.rb doesn’t seem to work) …

---

## [Tertiary has\_many association forms, difficult! (SOLUTION)](https://www.ruby-forum.com/t/tertiary-has-many-association-forms-difficult-solution/147612)

<div class="topic-metadata">

**Author:** [@matthew](https://www.ruby-forum.com/u/matthew)\
**Replies:** 3\
**Last updated:** [September 3, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/tertiary-has-many-association-forms-difficult-solution/147612 "2008-09-03T22:35:20Z")

</div>

I’ve got three relationships: Package, PackageItemGroup, and PackageItem \[Package\] has\_many :package\_item\_groups, has\_many :package\_items, :through =\> :package\_item\_groups \[PackageItemGroup\] has\_many :package\_items, …

---

## [Problem installing mysql ruby bindings gem on aix](https://www.ruby-forum.com/t/problem-installing-mysql-ruby-bindings-gem-on-aix/147613)

<div class="topic-metadata">

**Author:** [@johnf](https://www.ruby-forum.com/u/johnf)\
**Replies:** 2\
**Last updated:** [September 3, 2008, 10:09pm UTC](https://www.ruby-forum.com/t/problem-installing-mysql-ruby-bindings-gem-on-aix/147613 "2008-09-03T22:09:59Z")

</div>

After much digging and coaxing, I’ve gotten Ruby and Rails installed on an AIX 5.3 box. However, I can’t seem to get the mysql gem to install. I’ve googled a bit, and I’ve found some similar error messages, but nothi…

---

## [Validates\_uniqueness\_of in update](https://www.ruby-forum.com/t/validates-uniqueness-of-in-update/147523)

<div class="topic-metadata">

**Author:** [@stevel](https://www.ruby-forum.com/u/stevel)\
**Replies:** 2\
**Last updated:** [September 3, 2008, 9:55pm UTC](https://www.ruby-forum.com/t/validates-uniqueness-of-in-update/147523 "2008-09-03T21:55:23Z")

</div>

I have a problem with the usage of validates\_uniqueness\_of that I hope someone can help throw a light on. With a new record, this validation works fine. But my problem came when I am updating a record. I was not able…

---

## [ActionMailer Stripping/Corrupting Special Characters (String Encoding Problem?)](https://www.ruby-forum.com/t/actionmailer-stripping-corrupting-special-characters-string-encoding-problem/143237)

<div class="topic-metadata">

**Author:** [@mahadewa](https://www.ruby-forum.com/u/mahadewa)\
**Replies:** 1\
**Last updated:** [September 3, 2008, 9:43pm UTC](https://www.ruby-forum.com/t/actionmailer-stripping-corrupting-special-characters-string-encoding-problem/143237 "2008-09-03T21:43:39Z")

</div>

I’m hoping that I’m just missing something simple — but I’m banging my head against a wall on this one… I have a simple mailer model that sends a single-part, text/plain message (generated using an ERB template). In …

---

## [Deply application ror on websphere](https://www.ruby-forum.com/t/deply-application-ror-on-websphere/147525)

<div class="topic-metadata">

**Author:** [@avenasatira](https://www.ruby-forum.com/u/avenasatira)\
**Replies:** 1\
**Last updated:** [September 3, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/deply-application-ror-on-websphere/147525 "2008-09-03T21:39:21Z")

</div>

Is posssible delpoy my application ruby on rails in a server websphere???

---

## [The very model of confusion with models and adding a record to joins](https://www.ruby-forum.com/t/the-very-model-of-confusion-with-models-and-adding-a-record-to-joins/147624)

<div class="topic-metadata">

**Author:** [@Ruby\_on\_RailsS\_Talk](https://www.ruby-forum.com/u/Ruby_on_RailsS_Talk)\
**Replies:** 2\
**Last updated:** [September 3, 2008, 9:29pm UTC](https://www.ruby-forum.com/t/the-very-model-of-confusion-with-models-and-adding-a-record-to-joins/147624 "2008-09-03T21:29:00Z")

</div>

Hi (this is an update to a previous problem) I’ve decided my fundamental problem here is a lack of understanding about models. I have enough to get my started by getting lost quickly. So, following previous advice I h…

---

## [When is init.rb run for gems?](https://www.ruby-forum.com/t/when-is-init-rb-run-for-gems/147637)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 0\
**Last updated:** [September 3, 2008, 9:28pm UTC](https://www.ruby-forum.com/t/when-is-init-rb-run-for-gems/147637 "2008-09-03T21:28:22Z")

</div>

If I place a gem in the vendor/gems folder will the init.rb file be ran? Or do I HAVE to place the gem in the vendor/plugins folder? Thanks for your help!

---

## [Replace a new record with an existing one](https://www.ruby-forum.com/t/replace-a-new-record-with-an-existing-one/147638)

<div class="topic-metadata">

**Author:** [@jney](https://www.ruby-forum.com/u/jney)\
**Replies:** 0\
**Last updated:** [September 3, 2008, 9:26pm UTC](https://www.ruby-forum.com/t/replace-a-new-record-with-an-existing-one/147638 "2008-09-03T21:26:03Z")

</div>

Hello, I have overwrited save model in a model and i want in some case overwrite the new record by an existing one. is it possible? thx

---

## [Error using scaffolding in Rails 2.0](https://www.ruby-forum.com/t/error-using-scaffolding-in-rails-2-0/147636)

<div class="topic-metadata">

**Author:** [@amitmahajan](https://www.ruby-forum.com/u/amitmahajan)\
**Replies:** 0\
**Last updated:** [September 3, 2008, 9:00pm UTC](https://www.ruby-forum.com/t/error-using-scaffolding-in-rails-2-0/147636 "2008-09-03T21:00:39Z")

</div>

I need to use scaffolding to generate my model â€œPublisherâ€ and controller â€œadmin/publisherâ€ . I am running following ruby command and getting error script/generate scaffold Publisher ‘admin/publisher’ error …

---

## [Saving to mysql while displaying a partial that calls for the list of mysql items lags](https://www.ruby-forum.com/t/saving-to-mysql-while-displaying-a-partial-that-calls-for-the-list-of-mysql-items-lags/147627)

<div class="topic-metadata">

**Author:** [@tyliong](https://www.ruby-forum.com/u/tyliong)\
**Replies:** 0\
**Last updated:** [September 3, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/saving-to-mysql-while-displaying-a-partial-that-calls-for-the-list-of-mysql-items-lags/147627 "2008-09-03T19:00:33Z")

</div>

Hi, Originally this was part of my highlighting question but now after debugging and slicing up the problem i found that the problem was not rjs but that saving to database does not sync with the ajax partial Control…

---

## [Appending a record to a table](https://www.ruby-forum.com/t/appending-a-record-to-a-table/147533)

<div class="topic-metadata">

**Author:** [@Ruby\_on\_RailsS\_Talk](https://www.ruby-forum.com/u/Ruby_on_RailsS_Talk)\
**Replies:** 5\
**Last updated:** [September 3, 2008, 6:14pm UTC](https://www.ruby-forum.com/t/appending-a-record-to-a-table/147533 "2008-09-03T18:14:13Z")

</div>

Hi I’m not too sure how best to explain this but here goes! I am trying to write an appointment system. I have, through example, just about got the dynamics correct. Even tried to play with some table joins (and excu…

---

## [Error using scaffolding in Rails 2.0](https://www.ruby-forum.com/t/error-using-scaffolding-in-rails-2-0/147611)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [September 3, 2008, 5:33pm UTC](https://www.ruby-forum.com/t/error-using-scaffolding-in-rails-2-0/147611 "2008-09-03T17:33:10Z")

</div>

I need to use scaffolding to generate my model “Publisher” and controller “admin/publisher” . I am running following ruby command and getting error script/generate scaffold Publisher ‘admin/publisher’ error exists…

---

## [Limux wants to keep up with you on Twitter](https://www.ruby-forum.com/t/limux-wants-to-keep-up-with-you-on-twitter/147616)

<div class="topic-metadata">

**Author:** [@limux](https://www.ruby-forum.com/u/limux)\
**Replies:** 0\
**Last updated:** [September 3, 2008, 5:31pm UTC](https://www.ruby-forum.com/t/limux-wants-to-keep-up-with-you-on-twitter/147616 "2008-09-03T17:31:23Z")

</div>

To find out more about Twitter, visit the link below: http://twitter.com/i/9f428420ccd04fef585004ab34079fee7f7ff874 Thanks, -The Twitter Team About Twitter Twitter is a unique approach to communication and networkin…

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

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