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


#1

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. Subsequently when I open the browser to
link to HTTP://www.mycookbook.com, the browser tries to connect to the
internet implying that it has not found a link to the Hosts file.

How can I ensure that the configuration in the Hosts file on the C drive
is recognized? My C drive is too full to move InstantRails to the D
drive.

Using the same download, installed on the C drive of a different
computer, when I start the Rails Applications Cookbook with the “Start
with Mongrel” button, the DOS window stays open and subsequently, I can
open a browser and enter HTTP://www.mycookbook.com and view the sample
rails application.


#2

On 12/31/06, Jane removed_email_address@domain.invalid wrote:

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

Subsequently when I open the browser to


#3

Curt H. wrote:

On 12/31/06, Jane removed_email_address@domain.invalid wrote:

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).

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.

Any advice welcome!
Jane


#4

On 1/1/07, Jane removed_email_address@domain.invalid wrote:

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.

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


#5

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.

Tried this, but sad to say, it didn’t seem to work! The path gets
inserted back as before when IR is started. Neither the Mongrel button
nor the Rails Console button are working.

try browsing directly to the Mongrel server:

http://127.0.0.1:3001/

Did that work?

Worked perfectly when adjusted to http://127.0.0.1:3000 instead of 3001.
And when the Virtual Host was modified to 3000 in the Apache config file
that also worked! So at least that part is sorted out.

Jane


#6

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


#7

I am facing the same problem as Jane, and I notice from some other sites
that other folk are stuck at this point as well. It seems that the
Mongrel server is not responding to calls from Apache. What could be
the solution?

Jane wrote:

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.

Tried this, but sad to say, it didn’t seem to work! The path gets
inserted back as before when IR is started. Neither the Mongrel button
nor the Rails Console button are working.

try browsing directly to the Mongrel server:

http://127.0.0.1:3001/

Did that work?

Worked perfectly when adjusted to http://127.0.0.1:3000 instead of 3001.
And when the Virtual Host was modified to 3000 in the Apache config file
that also worked! So at least that part is sorted out.

Jane


#8

Curt

Tried that, didn’t help.

Curt H. wrote:

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


#9

On Jan 8, 7:00 am, Mahmood removed_email_address@domain.invalid wrote:

Then see if things now run as expected.
Curt–
Posted viahttp://www.ruby-forum.com/.

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


#10

Kevin

Apache on Port 80 was initially causing a conflict, so I had changed its
port to 3000 and it’s been working fine since then. Mongrel seems to
initialise correctly (in the DOS window) on Port 3001. However when I
try to access www.mycookbook.com:3000 I get the error:

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

_Kevin wrote:

On Jan 8, 7:00 am, Mahmood removed_email_address@domain.invalid wrote:

Then see if things now run as expected.
Curt–
Posted viahttp://www.ruby-forum.com/.

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