Website Setup & Info

ID #1027

How do I setup a Ruby On Rails application?

Its very easy, assuming you're starting from scratch, SSH into login.geekisp.com and type:

$ control_apache add mydomain.com
$ cd www.mydomain.com
$ rails myapp
$ rm -r htdocs
$ ln -s myapp/public htdocs
$ chmod -R g+w myapp/log myapp/tmp

$ cp /usr/local/share/geekisp/rails/dot-htaccess htdocs/.htaccess

$ vi htdocs/.htaccess

While editing the .htaccess file, add the following line right after the line that says 'RewriteEngine On':

RewriteBase /

This is necessary because of the way most virtual hosts are configured at GeekISP. Under certain configurations, this step is not necessary, but it will never do any harm to add it.

Now browse to www.mydomain.com and you should see the Rails welcome page.

Note: With ROR 2.3, CGI mode is no longer installed by default.  While this is good in general, you still want the dispatch.cgi files, even if you're just going to use them briefly.  If you run

rake rails:update:generate_dispatchers

The dispatch.* files will be repopulated.

Tags: -

Related entries:

Last update: 2011-05-15 11:55
Author: Dave Steinberg
Revision: 1.2

Digg it! Print this record Send to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this entry:

Average rating: 4 out of 5 (6 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

Comment of wmat:
I believe the instruction: chmod g+w myapp/logs myapp/logs/* myapp/tmp/* should be: chmod g+w myapp/log myapp/log/* myapp/tmp/* i.e. no 's' on the word log
Added at: 2038-01-18 22:14

Comment of Jared:
Is this up to date for Rails 2.x?
Added at: 2008-06-07 20:02