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:


  1. yum install ruby ruby-devel
  2. wget
  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 -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
    • 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: Logo

You are commenting using your 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


October 2008
« Sep   Aug »

Most Recent Posts

%d bloggers like this: