Support Forums

Full Version: [RoR] Noob question.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How does Ruby on Rails work?
I already know PHP but I want to extend my programming knowledge.

For PHP I would just install PHP to my web server and then set a file with the extension of ".PHP" and then I could use PHP scripts.

How does Ruby on Rails work?
(07-30-2010, 10:48 AM)PurpleHaze Wrote: [ -> ]How does Ruby on Rails work?
I already know PHP but I want to extend my programming knowledge.

For PHP I would just install PHP to my web server and then set a file with the extension of ".PHP" and then I could use PHP scripts.

How does Ruby on Rails work?

Ruby on Rails is a framework. It handles the mundane, common tasks you see from solution to solution. And it offers helper classes to aid you in handling most everything else. You can get a similar experience with Zend Framework or CodeIgnitor in PHP, but neither of them shape up to Ruby on Rails yet.

As for how RoR deploys: that's where things can get tricky. How you deploy an RoR application is entirely dependent on your hosting. Many hosts that support RoR will run LiteSpeed, an HTTP server that can be run alongside Apache. LiteSpeed comes with native support (more or less) for RoR.

If your host solely runs Apache, or you run your server(/VPS) and use Apache, you need a module or a specific server application for Rails solutions. The most popular Apache module is Phusion's Passenger. I use it on my own servers. A monkey could install it and I'd trust my two year old niece to configure it.

At work we use Unicorn, which is comparable to Passenger but it's a full-scale HTTP server for Rack (Ruby's web server interface) and we've found it scales much better with the traffic we need to support.

By default RoR comes packed with Mongrel (also a web server), which is certainly capable (we used it from 2006 until just this past year) but its performance and resource usage has a larger footprint than the likes of Passenger or Unicorn.
(10-07-2010, 05:27 AM)Disease Wrote: [ -> ]Ruby on Rails is a framework. It handles the mundane, common tasks you see from solution to solution. And it offers helper classes to aid you in handling most everything else. You can get a similar experience with Zend Framework or CodeIgnitor in PHP, but neither of them shape up to Ruby on Rails yet.

As for how RoR deploys: that's where things can get tricky. How you deploy an RoR application is entirely dependent on your hosting. Many hosts that support RoR will run LiteSpeed, an HTTP server that can be run alongside Apache. LiteSpeed comes with native support (more or less) for RoR.

If your host solely runs Apache, or you run your server(/VPS) and use Apache, you need a module or a specific server application for Rails solutions. The most popular Apache module is Phusion's Passenger. I use it on my own servers. A monkey could install it and I'd trust my two year old niece to configure it.

At work we use Unicorn, which is comparable to Passenger but it's a full-scale HTTP server for Rack (Ruby's web server interface) and we've found it scales much better with the traffic we need to support.

By default RoR comes packed with Mongrel (also a web server), which is certainly capable (we used it from 2006 until just this past year) but its performance and resource usage has a larger footprint than the likes of Passenger or Unicorn.

This helped me out, So this must of helped you out Smile