Other Server-Side Scripting

ID #294

Do you support Ruby on Rails ?

Applies to: Grid System

Our support for Ruby on Rails is preliminary and experimental; we'd appreciate any feedback you might have. Please note that currently we are not running Ruby using FastCGI which will reduce the performance of any Ruby Scripts.

Ruby, RubyGems, and Rails are already installed, so you just need to create you project. First, log in to your shell account via telnet/SSH.

The rail must be web accessable, so make the project somewhere in /htdocs:

$ rails /htdocs/www/your_project_name

Change to the project directory:

$ cd /htdocs/www/your_project_name

Adjust .htaccess file for Modwest servers:

$ vim public/.htaccess

Type on the first line of .htaccess (press 'i' to enter insert mode):

RewriteBase /your_project_name/public

Press 'esc' to exit insert mode, then type ':wq' 'cr' to save and exit vim.
Make a test controller:

$ ruby script/generate controller Test

Edit the test controller:

$ vim app/controllers/test_controller.rb

Insert text between "class TestController < ApplicationController" and "end":

def index
render_text "Hello World!"

View test:
Go to http://yourdomain.com/your_project_name/public/Test. If you see "Hello World!," then you have successfully created a new Ruby on Rails project.

Last update: 2010-10-04 14:47
Author: FAQ Admin
Revision: 1.3

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You can comment this FAQ

Comment of Anonymous:
To set up a database connection in ruby you need to modify the database.yml settings:
adapter: mysql
database: database
host: db.modwest.com
username: yourusername
password: yourpassword

The database.yml file should be located under

Here is a great tutorial on how set up a connection:
Added at: 2005-12-29 17:04