Forum: Ruby on Rails Typo does not to work

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5f9c010866ed7b4ceff994510de2ef8c?d=identicon&s=25 hipertracker (Guest)
on 2005-11-13 14:23
(Received via mailing list)
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
A52b0e1c5d982f2512a03c5dbfd033d6?d=identicon&s=25 rasputnik (Guest)
on 2005-11-13 14:35
(Received via mailing list)
typo 2.0.6 is very very old -  try a more recent one.
5f9c010866ed7b4ceff994510de2ef8c?d=identicon&s=25 hipertracker (Guest)
on 2005-11-13 14:44
(Received via mailing list)
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 Davies <rasputnik@gmail.com>:
5f9c010866ed7b4ceff994510de2ef8c?d=identicon&s=25 hipertracker (Guest)
on 2005-11-13 15:50
(Received via mailing list)
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 Zabiello <hipertracker@gmail.com>:
132a94ca65959bda6c74fae54bff2425?d=identicon&s=25 ezra (Guest)
on 2005-11-13 23:32
(Received via mailing list)
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
This topic is locked and can not be replied to.