Typo does not to work


I cannot lauch Typo 2.0.6 under my Debian 3.1. I set up chmod a+w for
log and public folder. public/.htaccess is using dispatch.cgi.
database mysql5.0 works fine and database.yml is set correctly. I
lauch webrick with ruby script/server -r production. It listen at port
3000. When I try to run links2 http://localhost:3000 I get empty page.
And there is error message in logs: “ - -
[13/Nov/2005:08:07:25 EST] “GET / HTTP/1.1” 500 0”. I am using ruby
1.8.4 (2005-10-29) [i486-linux], and the latest Rails.

Now I am trying use Typo under WinXP. It works perfectly well, but
only from webrick. Under Apache (2.0.54), in cgi mode, my Firefox
browser displays: “Application Error. Typo could not be reached”

Any ideas?

Jaroslaw Z.


typo 2.0.6 is very very old - try a more recent one.


Sorry, my mistake. I am using the latest Typo 2.6.0. And I’ve launched
it with script/server -e production (not -r). Only winxp + webrick
works. linux + webrick or apache2/cgi and apache2/winxp + cgi does not

2005/11/13, Dick D. removed_email_address@domain.invalid:


The problem solved. Uff. I had to hack step by step the code. It was
trivial. After all there was bad database name definied. :slight_smile:

2005/11/13, Jaroslaw Z. removed_email_address@domain.invalid:


Maybe you need to check the shebang lines in your scripts. If it
works on windows then I assume you have them set to look for your
ruby binary somewhere in #!c: You need to set it to the proper path
for your linux box so run these commands:

$ which ruby

it will answer /usr/bin/ruby or /usr/local/bin/ruby or something like
that. You need to change all the lines in all the scripts in the
scripts folder as weel as your dispatch.* files in public dir. Here
is a littel ruby script you could use to do this:

#1/usr/bin/env ruby

require ‘find’
require ‘ftools’

contents = []

Find.find(ARGV[0]) do |file|
unless test(?d, file)
File.open(file).each do |line|
line.gsub!(/#!c:/ruby/bin/ruby/, ‘/usr/bin/env ruby’)
contents << line
File.open(file, “w”) do |f|
contents.each do |line|
f.puts line
contents = []

Run this like so:

$ ruby replace.rb myrailsapp

And it will change your shebang lines for you recursively for the

whole app. Make sure you have the correct regex for your windows
shebang line in that script.