Instant Rails SCGI Problem


#1

I have installed instant rails and configured it
http://instantrails.rubyforge.org/wiki/wiki.pl?Getting_Started

I can get typo and webrick to work on webrick localhost:3000 but cant
get anything to work with scgi.

When i start the scgi server i get a blank dos window screen. When i
type www.mycookbook.com into the browser i get the following

Unable to connect
Firefox can’t establish a connection to the server at
www.mycookbook.com.

I have looked at the common errors at the bottom of the page below but
none of them seem to help.
http://instantrails.rubyforge.org/wiki/wiki.pl?Getting_Started

I have added the following to the bottom of the windows host file
127.0.0.1 www.mycookbook.com
127.0.0.1 typo

Anyone help?


#2

On 4/12/06, John B. removed_email_address@domain.invalid wrote:

Firefox can’t establish a connection to the server at
Anyone help?
It sounds like apache isn’t runing. Does the Instant Rails manager
show a “green” status for apache (indicating that it is up and
running)?

Also, check the apache access log and error log to see if there are
any clues. You can open these via the Instant Rails main menu: I>>Log
Files

Curt


#3

Both Apache and MySQL have a green light. There are no entries in the
apache access log or error log.


#4

John B. wrote:

Both Apache and MySQL have a green light. There are no entries in the
apache access log or error log.

Add the following batch file to your application’s folder and use it to
start SCGI:

SET RUBY_HOME=%CD%…\ruby
SET MYSQL_HOME=%CD%…\mysql
SET PATH=%RUBY_HOME%\bin;%MYSQL_HOME%\bin;
call ruby %RUBY_HOME%\bin\scgi_service
pause

If there is an error, the pause in the batch file will let to see what
happened

Ed

p.s.
I like to see in the SCGI console which app is running, so I added the
following change which is just cosmetic.

To display the environment and the port in the SCGI console window,
instead of the current blank window, I made the following changes:

C:\InstantRails-1.2\ruby\lib\ruby\gems\1.8\gems\scgi_rails-0.4.3\bin\scgi_service
<typo:code lang=“ruby”>

Added Port for display – Ed Gard

def configure_rails(environment, port)
ENV[“RAILS_ENV”] = environment
# Added to display environment and port – Ed Gard
STDERR.puts(“Environment: #{environment}; Port: #{port}”)
require “config/environment”
ActiveRecord::Base.threaded_connections = false
require ‘dispatcher’
end

class RailsController < SCGI::Controller
def initialize(config_file)
@config_file = config_file
# Added the port for display – Ed Gard
configure_rails(config[:env], config[:port])
super(RailsProcessor.new(config))
end
</typo:code>


#5

On 4/12/06, John B. removed_email_address@domain.invalid wrote:

Both Apache and MySQL have a green light. There are no entries in the
apache access log or error log.

What version of windows are you running? This should work on Windows
2000 and Windows XP, but not on Windows 98.

Are you running anything else that might be using port 80 (skype, for
example, does this)? This should be detected by Apache, but I’m just
trying to cover all the bases here.

Curt