# What is rails? Newbie question

**URL:** <https://www.ruby-forum.com/t/what-is-rails-newbie-question/105969>\
**Category:** Rails\
**Created:** [June 5, 2007, 3:10am UTC](https://www.ruby-forum.com/t/what-is-rails-newbie-question/105969 "2007-06-05T03:10:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DBC\_User](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Post date:** [June 5, 2007, 3:10am UTC](https://www.ruby-forum.com/t/what-is-rails-newbie-question/105969/1 "2007-06-05T03:10:25Z")

</div>

I went through the documents and tutorials and they are all good to  
know how to create web apps using rails.

I would like to understand the fundamental concept about Rails. I  
understand using rails you can create a web page very fast and how to  
use them . But I would like to know what makes Rails? If I have linux  
box, can I host rails? what are the things I need to install, how a  
request get processed on a web server for a rails page?

I would like to understand what happens when the client hits a web  
page, how the request flows to the server and how the server knows  
what to execute etc.,

I really like the rails but before I go in detail, I want to know more  
about the fundaments. Please direct me some url or some document which  
explains these things, thanks.

---

<div class="post-metadata">

**Author:** ![DBC\_User](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Post date:** [June 5, 2007, 3:27am UTC](https://www.ruby-forum.com/t/what-is-rails-newbie-question/105969/2 "2007-06-05T03:27:27Z")

</div>

On Jun 4, 8:09 pm, DBC User [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> page, how the request flows to the server and how the server knows  
> what to execute etc.,
> 
> I really like the rails but before I go in detail, I want to know more  
> about the fundaments. Please direct me some url or some document which  
> explains these things, thanks.

That’s a lot of ground to cover with one question.

For a background in the major design pattern behind Rails, it’s  
important that you understand Model-View-Controller [MVC].

> **[Model–view–controller](https://en.wikipedia.org/wiki/Model-view-controller)**
>
> Model–view–controller (MVC) is a software design pattern commonly used for developing user interfaces that divides the related program logic into three interconnected elements. This is done to separate internal representations of information from the ways information is presented to and accepted from the user.
> Traditionally used for desktop graphical user interfaces (GUIs), this pattern became popular for designing web applications. Popular programming languages have MVC frameworks that facilita...

Yes, you can host a Rails app on Linux. A common, and solid, setup is  
to use Apache 2.2 + mongrel + mongrel\_cluster with either MySQL or  
PostgreSQL on the backend.

[http://mongrel.rubyforge.org/](http://mongrel.rubyforge.org/)

[http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/](http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/)

This is only when you’re ready to deploy a production-quality  
application though. If you just want to get something running to play  
with, all you need is Rails. Installing mongrel is trivial so you  
might as well do that too. Keep it simple to start with until you  
have a working application.

And while it might sound trite, I have to say “use Google” for a lot  
of the newbie questions you might have about Apache, mongrel, Rails,  
etc. Everything you can imagine has been asked and answered 1000  
times already. If you’re willing to read documentation, you’ll end up  
with a nice set-up.

– James

---

<div class="post-metadata">

**Author:** ![DBC\_User](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Post date:** [June 5, 2007, 3:46am UTC](https://www.ruby-forum.com/t/what-is-rails-newbie-question/105969/3 "2007-06-05T03:46:34Z")

</div>

On Jun 4, 8:26 pm, jdl [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > understand using rails you can create a web page very fast and how to  
> > explains these things, thanks.  
> > [http://mongrel.rubyforge.org/](http://mongrel.rubyforge.org/)  
> > of the newbie questions you might have about Apache, mongrel, Rails,  
> > etc. Everything you can imagine has been asked and answered 1000  
> > times already. If you’re willing to read documentation, you’ll end up  
> > with a nice set-up.
> 
> – James- Hide quoted text -
> 
> - Show quoted text -

Thanks James. Yes I am aware of MVC pattern and I use it a lot so that  
was easy to understand. Only thing I wanted to understand is, if I a  
linux box with PHP and MySql support, can I install rails and make  
rails run in parallel to PHP application.  
Again thanks. Now that I have some links the ones you put up, I will  
start the reading.

---

<div class="post-metadata">

**Author:** ![DBC\_User](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Post date:** [June 5, 2007, 8:00am UTC](https://www.ruby-forum.com/t/what-is-rails-newbie-question/105969/4 "2007-06-05T08:00:24Z")

</div>

The first thing that you need to understand here, and I struggled with  
this division for a while was what was Ruby and what was Rails.

So:  
Ruby is an object orientated scripting language. In this case you  
mentioned PHP, PHP is also a scripting language.

Rails is a framework that is created using the Ruby language, there  
are also PHP frameworks out there, again made in PHP.  
All those gems that are installed when you install Rails…  
They are all pure ruby and the make up the Rails framework, you add to  
the framework by adding new gems and including them in your  
project… Niiece huh.

But under it all, what is Rails…? It’s Ruby, and can you run more  
than one language on your computer at once…???  
Of course you can, you should have no problems at all running PHP and  
Ruby/RubyOnRails on one machine( I’m doing it on this machine right  
now ), I also run, Erlang, Python, Java etc etc, the list goes on.

Hope this helps,  
Cam

---

<div class="post-metadata">

**Author:** ![DBC\_User](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Post date:** [June 5, 2007, 4:42am UTC](https://www.ruby-forum.com/t/what-is-rails-newbie-question/105969/5 "2007-06-05T04:42:38Z")

</div>

On Jun 5, 3:09 am, DBC User [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I would like to understand the fundamental concept about Rails. I  
> understand using rails you can create a web page very fast and how to  
> use them . But I would like to know what makes Rails? If I have linux  
> box, can I host rails?

Linux was always preferred for hosting stuff made with open source,  
cross-platform languages like PHP, Python, Perl, Ruby … So yeah, of  
course you can host Rails on a Linux box. Most of the people do it!

> what are the things I need to install

Ruby, rubgems, Rails and database adapters (through gems), Apache/  
Lighthttpd/Nginx with FastCGI or reverse proxy to Mongrel clusters.  
There are many good deployment articles:  
[http://del.icio.us/mislav/rails+deployment](http://del.icio.us/mislav/rails+deployment)

All of them describe exactly what to install.

> I would like to understand what happens when the client hits a web  
> page, how the request flows to the server and how the server knows  
> what to execute etc.

Want to poke at the internals, eh? Here you go (roughly):  
[http://www.gliffy.com/publish/1008976/](http://www.gliffy.com/publish/1008976/)

- Mislav

---

<div class="post-metadata">

**Author:** ![DBC\_User](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Post date:** [June 5, 2007, 5:16pm UTC](https://www.ruby-forum.com/t/what-is-rails-newbie-question/105969/6 "2007-06-05T17:16:48Z")

</div>

On Jun 5, 1:00 am, cammo [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> They are all pure ruby and the make up the Rails framework, you add to  
> Cam
> 
> > > box, can I host rails?
> 
> - Show quoted text -  
> Thank you very much and it is exactly what I am looking for. If you  
> have time for one more question. I know how exactly IIS work to pharse  
> an asp or [asp.net](http://asp.net) page. Is there a document or link explaining how the  
> same thing is done for Rails?

---

<div class="post-metadata">

**Author:** ![DBC\_User](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Post date:** [June 5, 2007, 5:19pm UTC](https://www.ruby-forum.com/t/what-is-rails-newbie-question/105969/7 "2007-06-05T17:19:48Z")

</div>

On Jun 5, 10:16 am, DBC User [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Ruby is an object orientated scripting language. In this case you  
> > than one language on your computer at once…???
> 
> > > Want to poke at the internals, eh? Here you go (roughly):[http://www.gliffy.com/publish/1008976/](http://www.gliffy.com/publish/1008976/)
> 
> - Show quoted text -  
> Mislav already answered the flow in his link  
> [http://www.gliffy.com/publish/1008976/](http://www.gliffy.com/publish/1008976/)

Thanks Mislav

---

<div class="post-metadata">

**Author:** ![DBC\_User](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Post date:** [June 5, 2007, 6:31pm UTC](https://www.ruby-forum.com/t/what-is-rails-newbie-question/105969/8 "2007-06-05T18:31:01Z")

</div>

Also check out Obie’s upcoming book The Rails Way. It’s not published  
yet, but it’s available in RoughCut form from O’reilly, and it goes  
into more of the gory details you sound interested in.

On 6/5/07, DBC User [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > The first thing that you need to understand here, and I struggled with  
> > > the framework by adding new gems and including them in your
> > 
> > > > cross-platform languages like PHP, Python, Perl, Ruby … So yeah, of
> > > > 
> > > > > I would like to understand what happens when the client hits a web  
> > > > > have time for one more question. I know how exactly IIS work to pharse
> 
> >

–  
Gabe da Silveira  
[http://darwinweb.net](http://darwinweb.net)
