Project Server not starting. No Errors

I apologize if this has been asked before.

I’m trying to simply start my server and the only output is as
follows…

ruby script/server
./script/…/config/boot.rb:26:Warning: Gem::SourceIndex#search support
for String patterns is deprecated

The server is not started up. Netstat shows nothing listening on port
3000. I haven’t done any changes to the configs at all since it worked.
The script is just sitting there.

Any quick ideas?

Thank you.

Peter

versions? check script\about

On Oct 18, 5:27 pm, Peter W. [email protected]

Eric wrote:

versions? check script\about

On Oct 18, 5:27�pm, Peter W. [email protected]

Eric,

Thanks for the reply and the help… This is what script/about reported…

About your application’s environment
Ruby version 1.8.7 (universal-darwin10.0)
RubyGems version 1.3.1
Rails version 1.2.3
Active Record version 1.15.3
Action Pack version 1.13.3
Action Web Service version 1.2.3
Action Mailer version 1.3.3
Active Support version 1.4.2
Application root /Users/peter/Development/RadRails
Workspace/rails_space
Environment development
Database adapter postgresql

Peter

Hi Peter W.

Have you properly setup database? Seems like you have not given
username and/or password in database.yml

Sijo

Eric wrote:

The app was written for an older version of rails, do you have those
versions installed?

-eric

On Oct 18, 8:21�pm, Peter W. [email protected]

Eric,

I just did a gem list and I do appear to have 1.2.3 installed…

rails (2.3.4, 2.2.2, 1.2.6, 1.2.3)

The thing is, this was working earlier today. Just all of a sudden. It
almost seemed like after I upgraded firefox things started to go bad.

I checked what I was running on my laptop and upgraded from 3.0.15 (I
think it was) to 3.5. Still the same problem.

What also is odd, I’ve copied the project over to my laptop and it works
just fine there. I have my DB pointing to my postgres db on the computer
I’m having issues with and its just fine (I explicitly set the hostname
to the IP of my main computer, not the loopback).

Is there any way to just reset things? Is there some sort of rails/ruby
cache I can clear? I found the cache in my project under the tmp folder
and cleared that… no go.

Thanks again for any help.

Peter

The app was written for an older version of rails, do you have those
versions installed?

-eric

On Oct 18, 8:21 pm, Peter W. [email protected]

Sijo k g wrote:

Hi Peter W.

Have you properly setup database? Seems like you have not given
username and/or password in database.yml

Sijo

Sijo,

Thanks for the reply. The DB is working properly. It was working earlier
today no problem. As I stated above, I copied over my project to my
laptop with the hostname of the db set to the IP of my original machine.
Everything works just fine.

It does seem likes it’s waiting to do something but is stuck. I hit
CTRL-C and it then says it’s started up the server. But its not actually
running since nothing shows up in netstat and when I try to connect to
it via a browser it of course doesn’t work.

I’m baffled by this one.

Peter

On Oct 20, 6:19 am, Peter W. [email protected]
wrote:

Ok this was a tough one. But I have FIXED it.

Turns out this is a bug in mongrel. Normally I would not have believed
this as this was working just fine before and then suddenly stopped.
Admittedly I can’t remember what little I did to mess it up but I’m
thinking a gem got messed up or a bad one got installed.

Good stuff. Something else that may prove problematic: ruby 1.8.7 came
out way after rails 1.2.3 and only later versions of rails were marked
as being compatible with it (from memory 2.1.something) - you may get
odd errors further down the line

Fred

Peter W. wrote:

Sijo k g wrote:

Hi Peter W.

Have you properly setup database? Seems like you have not given
username and/or password in database.yml

Sijo

Sijo,

Thanks for the reply. The DB is working properly. It was working earlier
today no problem. As I stated above, I copied over my project to my
laptop with the hostname of the db set to the IP of my original machine.
Everything works just fine.

It does seem likes it’s waiting to do something but is stuck. I hit
CTRL-C and it then says it’s started up the server. But its not actually
running since nothing shows up in netstat and when I try to connect to
it via a browser it of course doesn’t work.

I’m baffled by this one.

Peter

Ok this was a tough one. But I have FIXED it.

Turns out this is a bug in mongrel. Normally I would not have believed
this as this was working just fine before and then suddenly stopped.
Admittedly I can’t remember what little I did to mess it up but I’m
thinking a gem got messed up or a bad one got installed.

Here’s the website that helped me out…

http://mongrel.rubyforge.org/ticket/37

There’s a bunch of weird links are you go through the comments about
n1ke (had to put in a 1 there since ruby-forum thought I was spamming)
shoes and stuff… Ignore that. In fact don’t bother reading past
the attachments section. Click on it or go to this link which is the
patch file. I didn’t bother grabbing the patch I just fixed it
manually… Link is here…

http://mongrel.rubyforge.org/attachment/ticket/37/37-fix-infinite-loop-error-in-gem-require.patch

You’ll noticed that they replaced the “retry” with “Kernel.require
library”. I guess Mongrel can go into an infinite loop if it see a gem
installed but the file inside it doesn’t exist (at least that’s what I
read).

Anyway I edited the bad file and it works great now.

On my mac the file existed here and use sudo vi to edit it (here’s the
entire commandline command)…

sudo vi
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/…/lib/mongrel/gems.rb

You’ll notice it goes back a directory between bin and lib. This was a
copy paste I grabbed. I guess you could just cut out the bin/…/ and
just shove in the rest starting at lib. :slight_smile:

Anyway, I’m fairly new to ruby and rails and am just trying to learn.
This was a baffling mystery to me and I thought it was all in my code. I
re-installed ruby, rails, mongrel, postgres, etc… many times without
success… I hope this helps someone else who runs into this in the
future. It was frustrating. It’s not often the error is not in your own
code. :slight_smile: (Although granted I must’ve screwed up a gem somehow for this
bug to surface only on this one computer. :slight_smile: )

Thanks for the prior responses as well.

Pete