Typo on Site5
Posted by Chris Sun, 10 Jun 2007 11:51:00 GMT
I thought I’d post a quick summary on what I went through to get Typo up and running on Site5, since it’s a bit more tricky now that the SiteAdmin interface no longer contains an automatic install script.
I decided to go the gem route on this, so that’s the only way I’m going to talk about. If you want to install from SVN trunk, you’re on your own.
First, you’ll want to set up your account with a local gem installation directory, as detailed in this forum thread.
Then, ssh into your account (if you’re not still there), and type:
gem install typoThere’s a good chance this will fail the first time, with an error on attempting to install the sqlite3-ruby gem. This can be solved by opening a ticket with Site5’s support, and asking to have the sqlite-devel package installed on your server, then trying again.
Once the gem is installed, you just need to run
typo <installation directory>ENV['RAILS_ENV'] = 'production'and add the line:
ENV['GEM_PATH'] = '/home/<your_username>/<path_to_gems>:/usr/lib/ruby/gems/1.8'Create the file public/.htaccess in the typo directory as:
# General Apache options
AddHandler fastcgi-script .fcgi
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
ErrorDocument 500 /500.html # You may want to edit this fileSetup a mysql database for the blog’s production db, and configure it in config/database.yml. Example config:
production:
adapter: mysql
database: username_blog
username: username_blog
password: secret
host: localhostThen run
rake db:migrate RAILS_ENV=productionto load the schema.
If you installed your blog anywhere other than under your public_html directory, you’ll need to create a symlink to the blog, e.g.
ln -s /path/to/typo/public public_html/blogHopefully this ends up helping someone. If not, well at least it gave me an excuse to get to grips with some of typo’s editing syntax. If I’ve missed anything, please bitch at me, so I can fix it.

(in reverse order)
ln -s /home/site5username/path/to/typo public_html/blog
make sure there is only one space on the indentations of the database.yml file
when making the local gem dir, on the site5 thread, do steps 1-7, then 11; Then type 'gem install typo' (add -y to autoinstall dependencies); do step 9 on the site5 thread.
if typo isn't found, you can install an instance of this with ./gems/bin/typo
I indeed found it helpful. After a few hours of trying to debug my installation, your tutorial cleared up a few things.