# Typo does not to work

**URL:** <https://www.ruby-forum.com/t/typo-does-not-to-work/47745>\
**Category:** Rails\
**Created:** [November 13, 2005, 2:23pm UTC](https://www.ruby-forum.com/t/typo-does-not-to-work/47745 "2005-11-13T14:23:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hipertracker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/58f4c7/32.png) [@hipertracker](https://www.ruby-forum.com/u/hipertracker)\
**Post date:** [November 13, 2005, 2:23pm UTC](https://www.ruby-forum.com/t/typo-does-not-to-work/47745/1 "2005-11-13T14:23:33Z")

</div>

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](http://localhost:3000) I get empty page.  
And there is error message in logs: “127.0.0.1 - -  
[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.

---

<div class="post-metadata">

**Author:** ![hipertracker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/58f4c7/32.png) [@hipertracker](https://www.ruby-forum.com/u/hipertracker)\
**Post date:** [November 13, 2005, 2:35pm UTC](https://www.ruby-forum.com/t/typo-does-not-to-work/47745/2 "2005-11-13T14:35:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hipertracker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/58f4c7/32.png) [@hipertracker](https://www.ruby-forum.com/u/hipertracker)\
**Post date:** [November 13, 2005, 2:44pm UTC](https://www.ruby-forum.com/t/typo-does-not-to-work/47745/3 "2005-11-13T14:44:37Z")

</div>

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  
work.

2005/11/13, Dick D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![hipertracker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/58f4c7/32.png) [@hipertracker](https://www.ruby-forum.com/u/hipertracker)\
**Post date:** [November 13, 2005, 3:50pm UTC](https://www.ruby-forum.com/t/typo-does-not-to-work/47745/4 "2005-11-13T15:50:47Z")

</div>

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

2005/11/13, Jaroslaw Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![hipertracker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/58f4c7/32.png) [@hipertracker](https://www.ruby-forum.com/u/hipertracker)\
**Post date:** [November 13, 2005, 11:32pm UTC](https://www.ruby-forum.com/t/typo-does-not-to-work/47745/5 "2005-11-13T23:32:30Z")

</div>

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  
end  
File.open(file, “w”) do |f|  
contents.each do |line|  
f.puts line  
contents = []  
end  
end  
end  
end

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.

Cheers-  
–Ezra
