beginner questions

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

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 :slight_smile:

Best of luck,

Richard Johansson

nephish 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

Chris

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

Chris Mear 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

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.

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

-Jeff

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