Peter Warrick wrote: > Sijo k g wrote: >> Hi Peter Warrick >> >> 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. :) 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. :) (Although granted I must've screwed up a gem somehow for this bug to surface only on this one computer. :) ) Thanks for the prior responses as well. Pete -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---