Ruby On rails Installation for developers

October 23, 2008 at 9:11 am Leave a comment

To install ruby and start rolling on rails is as simple as the following steps:

Installing Ruby:

CODE:

  1. yum install ruby ruby-devel
  2. wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
  3. tar -xzf rubygems-0.9.0.tgz
  4. cd rubygems-0.9.0
  5. ruby setup.rb
And you are set for development:
To install mongrel:
  1. gem install mongrel
Now you are all set to start the new rails application;
  1. rails mytest

this will create the directory structure and the basic rails framework where you can write your own controllers, model and views.

Starting the server:

Once Mongrel has been installed you can start it up to host your project by executing the following, from the root of your application:

skx@host:~/Rails/mytest$ mongrel_rails start -d -e production -a 127.0.0.1 -p 3000

Here we’ve used several arguments (for an overview of more options run “mogrel_rails start -t“) here is a quick explanation of what they mean:

  • -d
    • To detach and run in the background
  • -e production
    • To run the application in “production” mode.
  • -a 127.0.0.1
    • To bind to the localhost only.
  • -p 3000
    • To listen upon port 3000.

Note: you don’t need to start the server as root, since you’re binding to a “non privileged” port.

All being well you should receive no errors and browsing at http://localhost:3000 should show you your applications front page.

To stop the server you may run:

skx@host:~/Rails/mytests$ mongrel_rails stop
Sending TERM to Mongrel at PID 9698...Done.

Entry filed under: Uncategorized. Tags: , , , , , , , , , , .

Apache Configuration For Rails Apps Time estimates: failure or success

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

October 2008
M T W T F S S
« Sep   Aug »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Most Recent Posts


%d bloggers like this: