Discussion:
Typo does not to work
Jaroslaw Zabiello
2005-11-13 13:21:49 UTC
Permalink
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: "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 Zabiello
Dick Davies
2005-11-13 13:34:23 UTC
Permalink
typo 2.0.6 is very very old - try a more recent one.
Post by Jaroslaw Zabiello
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: "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 Zabiello
_______________________________________________
Rails mailing list
http://lists.rubyonrails.org/mailman/listinfo/rails
--
Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/
Jaroslaw Zabiello
2005-11-13 13:43:11 UTC
Permalink
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.
Post by Dick Davies
typo 2.0.6 is very very old - try a more recent one.
Post by Jaroslaw Zabiello
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: "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 Zabiello
Jaroslaw Zabiello
2005-11-13 14:49:40 UTC
Permalink
The problem solved. Uff. I had to hack step by step the code. It was
trivial. After all there was bad database name definied. :)
Post by Jaroslaw Zabiello
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.
Post by Dick Davies
typo 2.0.6 is very very old - try a more recent one.
Post by Jaroslaw Zabiello
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: "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 Zabiello
Ezra Zygmuntowicz
2005-11-13 22:30:12 UTC
Permalink
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
Post by Jaroslaw Zabiello
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.
Post by Dick Davies
typo 2.0.6 is very very old - try a more recent one.
Post by Jaroslaw Zabiello
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: "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 Zabiello
_______________________________________________
Rails mailing list
http://lists.rubyonrails.org/mailman/listinfo/rails
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra-gdxLOakOTQ9oetBuM9ipNAC/***@public.gmane.org
509-577-7732

Loading...