Forum: Ruby on Rails Instant Rails SCGI Problem

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.
John B. (Guest)
on 2006-04-12 11:41
I have installed instant rails and configured it
http://instantrails.rubyforge.org/wiki/wiki.pl?Get...

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?Get...

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?
Curt H. (Guest)
on 2006-04-12 15:14
(Received via mailing list)
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
John B. (Guest)
on 2006-04-12 15:58
Both Apache and MySQL have a green light.  There are no entries in the
apache access log or error log.
Ed G. (Guest)
on 2006-04-12 17:42
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>
Curt H. (Guest)
on 2006-04-13 17:47
(Received via mailing list)
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
This topic is locked and can not be replied to.