RailsPlayground
How To Install Typo
Setting up typo is very easy if you follow the steps below.
- Login to cPanel, click on MySQL and create a new database and login for Typo to use.
- Now go the subdomain section in cPanel and add a subdomain for your blog. In our example we will use a subdomain called blog.
- Now SSH into your account
- Grab the typo source code
wget http://rubyforge.org/frs/download.php/32865/typo-5.0.3.tgz
- Extract the source and rename the directory and setup your symbolic link. For the link you would replace the blog directory with the name of your subdomain.
tar xzvf typo-5.0.3.tgz
mv typo-5.0.3 typo
rm -rf ~/public_html/blog
ln -s ~/typo/public ~/public_html/blog
- Now, setup your database configuration
cd typo
cd config
vi database.yml
- Enter in your database information you setup in the first step.
- Next, edit the environment.rb file, and put typo into production mode. Typo 5.0.3 does not work well with Rails 2.1 Make sure to set the Rails version to 2.0.2 in environment.rb file
RAILS_GEM_VERSION = '2.0.2'
Change:
RAILS_ENV = ENV['RAILS_ENV'] || 'development'
To:
RAILS_ENV = ENV['RAILS_ENV'] || 'production'
- Typo doesn’t work very well with FastCGI, so we need to put the application in CGI mode by editing the .htaccess file contained in the typo/public directory. Change dispatch.fcgi to dispatch.cgi
- Update: Typo can use FastCGI!
Edit the public/.htaccess file
1. Find the line AddHandler fastcgi-script .fcgi and comment it out, this is not needed since this is already configured by Apache.
#AddHandler fastcgi-script .fcgi
2. Find the line in the .htaccess file containing dispatch.cgi and change this to dispatch.fcgi
- The last thing we need to do is setup our database structure, you may do so using the command line mysql tool.
cd typo/db
mysql databasename -u databaseuser -p < schema.mysql.sql
Typo should now be setup and ready to use.
TroubleShooting
————————
If you receive “require’: no such file to load /public/../config/../vendor/rails/railties/lib/initializer (LoadError)” error when running the dispatch.fcgi ,try removing the rails directory under vendor folder.
Revised on July 11, 2008 23:47:00
by
Mithu Jose?
(203.187.136.242)
(2248 characters / 0.0 pages)