# Beginner questions

**URL:** <https://www.ruby-forum.com/t/beginner-questions/71132>\
**Category:** Rails\
**Created:** [October 5, 2006, 2:46pm UTC](https://www.ruby-forum.com/t/beginner-questions/71132 "2006-10-05T14:46:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nephish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8e7dd6/32.png) [@nephish](https://www.ruby-forum.com/u/nephish)\
**Post date:** [October 5, 2006, 2:46pm UTC](https://www.ruby-forum.com/t/beginner-questions/71132/1 "2006-10-05T14:46:43Z")

</div>

Lo there,

I am wanting to redo our company website in rails ( it now uses php ).  
I have the Agile book on the way here from Amazon. I am really new at  
this, and had a couple of questions.

First off, we run three websites off of our apache server at work (  
debian linux ). I know that ror can use apache instead of webbrick as a  
server. Is it possible to run more than one rails app from one server  
using virtual hosting (name based).

Next. We do a lot of intense graphing apps that are written in php  
using a class called JpGraph. How well do rails and php play together ?  
or would it be worth it to use a ruby charting and graphing app ?

lastly, I know that there are certain conventions that rails looks for  
in how it uses a database. Our tables follow none of these. Would i  
have to restructure my SQL tables to make use of rails? I mean, i know  
that i can follow our own conventions ( which stink ) but will that  
prove a configuration nightmare ? Would it be best to just restructure  
everything according to rails conventions ?

I guess thats it. The reason i want to use rails is because I have just  
started getting into ruby, and rails looks like a really cool way to  
handle our web front end. Many many of our scripts that we use to run  
the site now are php and need to be revamped anyway. I started building  
the site about a year ago whilst learning php.

Anyway, please, any tips would be greatly appreciated.

thanks.  
sk

---

<div class="post-metadata">

**Author:** ![nephish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8e7dd6/32.png) [@nephish](https://www.ruby-forum.com/u/nephish)\
**Post date:** [October 5, 2006, 3:10pm UTC](https://www.ruby-forum.com/t/beginner-questions/71132/2 "2006-10-05T15:10:46Z")

</div>

Hi nephish,

Let me just share some experiences.

- It is fully possible to run your different rails apps behind an  
apache server. I would recommend you to set up one mongrel server (or a  
cluster of mongrel servers, read about it on the webpage) per  
application, and point your different Vhosts to those server ports.  
Apache dont have native rails support as a module, so the best way to  
go is mongrel in my opinion. There are other options like Fastcgi to  
run your app, but I myself only had bad experiences with it.

- There should definatly be some ruby script for your graph needs. Im  
not an expert in the area, but i use FusionCharts on a site to generate  
nice looking flash graphs. If you dont want to involve flash, there  
should be some ruby script to generate graphics. Look at RMagick, but i  
reckon thats at a too low level for what your looking for.

- I really, really recommend applying the Rails conventions on your  
database structure. It will for sure spare you lots of time later on  
with all the magic thats involved. I cant imagine my daily work today  
if it wasnt for the rails convention-related help i get 🙂

Best of luck,

Richard Johansson

---

<div class="post-metadata">

**Author:** ![nephish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8e7dd6/32.png) [@nephish](https://www.ruby-forum.com/u/nephish)\
**Post date:** [October 5, 2006, 3:32pm UTC](https://www.ruby-forum.com/t/beginner-questions/71132/3 "2006-10-05T15:32:49Z")

</div>

nephish wrote:

> Next. We do a lot of intense graphing apps that are written in php  
> using a class called JpGraph. How well do rails and php play together ?  
> or would it be worth it to use a ruby charting and graphing app ?

Gruff is a popular graphing library for Ruby. It relies on ImageMagick  
and RMagick at the backend.

[http://nubyonrails.com/pages/gruff](http://nubyonrails.com/pages/gruff)

Chris

---

<div class="post-metadata">

**Author:** ![nephish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8e7dd6/32.png) [@nephish](https://www.ruby-forum.com/u/nephish)\
**Post date:** [October 5, 2006, 3:38pm UTC](https://www.ruby-forum.com/t/beginner-questions/71132/4 "2006-10-05T15:38:51Z")

</div>

Hey thanks,  
I had never heard of mongrel before, looks good, and simple.  
And, since i need to restructure so much of our stuff anyway, i think  
more and more about redoing it rails style.  
I still would like to keep some of our php scripts, unless they will  
create a conflict.

thanks for the tips, a lot.

sk

On Oct 5, 8:08 am, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![nephish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8e7dd6/32.png) [@nephish](https://www.ruby-forum.com/u/nephish)\
**Post date:** [October 5, 2006, 6:09pm UTC](https://www.ruby-forum.com/t/beginner-questions/71132/5 "2006-10-05T18:09:09Z")

</div>

Chris M. wrote:

> nephish wrote:
> 
> > Next. We do a lot of intense graphing apps that are written in php  
> > using a class called JpGraph. How well do rails and php play together ?  
> > or would it be worth it to use a ruby charting and graphing app ?
> 
> Gruff is a popular graphing library for Ruby. It relies on ImageMagick  
> and RMagick at the backend.
> 
> [http://nubyonrails.com/pages/gruff](http://nubyonrails.com/pages/gruff)

Charting is a huge part of our application. After researching lots of  
charting packages, including Gruff, I found ChartDirector to the best  
by far. At the time there were no Ruby bindings, so I wrote our  
charting code with php + ChartDirector and had Rails request graphs  
from our chart server via XML-RPC. If you are absolutely tied to  
JpGraph, you could use that option.

However, as of last week, there are now Ruby bindings for  
ChartDirector. I’m very excited. I would love to see more Rails’ers  
use ChartDirector so we could find any bugs in the Ruby bindings.

Note that I am in no way affiliated with ChartDirector or Advanced  
Software Engineering, I’ve just been using it for over a year and I  
really like it.

> **[ChartDirector Chart Component and Control Library for .NET (C#/VB), Java,...](https://www.advsofteng.com/)**
>
> Universal chart and graph component and control library for .NET (C#/VB), Java, C++, ASP, COM, PHP, Perl, Python.
> Extensive chart types, supports track cursors, zoom/scroll, viewports and other mouse interactions. 
> Suitable for web as well as...

Of course, your other good option is doing the charts in Flash.

-Jeff

---

<div class="post-metadata">

**Author:** ![nephish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8e7dd6/32.png) [@nephish](https://www.ruby-forum.com/u/nephish)\
**Post date:** [October 5, 2006, 8:25pm UTC](https://www.ruby-forum.com/t/beginner-questions/71132/6 "2006-10-05T20:25:26Z")

</div>

i don’t have a lot of flash experience, but i do like what i see on  
your link.  
the flash charting app that Richard showed me, the Fusion Charts looked  
really cool.  
i almost want to re-write all of that stuff anyway.

thanks for your help.

shawn
