Instant Rails installed on D drive doesn't appear to work

I have installed InstantRails on the D drive and configured the Windows Hosts file on the C drive with the lines

127.0.0.1 www.mycookbook.com 127.0.0.1 typo

Trouble is, when I start the Rails Applications Cookbook with the "Start

with Mongrel" button, the DOS window opens without showing anything and then closes almost immediately.

The problem is occurring here. The Mongrel web server is not starting up (the console window should stay open and you should see Mongrel status messages), so you’re not going to be able to proceed and with the browser until this is fixed.

First, check these two log files to see if there are any clues in there to tell you what is going wrong:

InstantRails\rails_apps\cookbook\log\mongrel_debug\files.log

InstantRails\rails_apps\cookbook\log\development.log

If that doesn’t tell you anything useful, then manualy open a ruby console window by selecting the menu item:

Rails Applications >> Open Ruby Console Window

Then, move into the cookbook directory (“cd cookbook”) and try to start Mongrel with this command:

mongrel_rails start

When this fails, you should (hopefully) see some message saying why.

Curt

Thanks for the advice but there is still a problem somewhere. Your first suggestion didn’t show anything (no log files appeared under

InstantRails\rails_apps\cookbook\log\ at all!). I then followed your second suggestion to open the Ruby Console Window and enter mongrel_rails start. In this case the Mongrel Server appeared to open fine with no errors, and the mongrel_debug file appeared under the

InstantRails\rails_apps\cookbook\log\ directory! (note:the Start with Mongrel button is still just giving an empty window that closes immediately).

Hmmm… Sounds like IR may not have relocated all the paths to your current installation directory. When IR is not running, edit the file “InstantRails.ini” in your IR root directory and locate the line that starts with “OldRunningPath=” and then delete the path after the equals sign (leaving just “OldRunningPath=” on the line).

Now start IR and say “yes” when it asks if you want to update the configuration files.

See is the start, mongrel button works now.

With the Mongrel server started from the ruby console window, I then attempted to open http://www.mycookbook.com with my internet browser and got the following message:

Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /.

Reason: Error reading from remote server


Apache/1.3.33 Server at www.mycookbook.com Port 80

Please note that I am not using a proxy server in my browser. I next tried to comment out the following in the Apache config file:

<VirtualHost *> ServerName www.mycookbook.com ProxyPass / http://localhost:3001/ ProxyPassReverse / http://localhost:3001

This resulted in the browser coming up with the text from the index.html file from the www directory, but nothing further.

Put the VirtuaHost back, you’ll need that (eventually). After you start Mongrel, it will say what port number is started the Rails app on (I think it should be port 3001), try browsing directly to the Mongrel server:

http://127.0.0.1:3001/

Did that work?

During development of a Rails app, you’ll be browsing directly like this anyway. Proxying through Apache is only for when you want to simulate a production environment.

Curt

I received reports that that this can fix weird problems like what you two are having… Open a command window and run the command:

netsh winsock reset

Then see if things now run as expected.

Curt

I'd also make sure that you don't have anything else trying to use port 80 or 3001... stuff like Skype or another webserver. I've had problems with mongrel failing to start only to discover that something else was using that particular port. The error message that shows up in this case is fairly cryptic.

_Kevin