Preventing a loop in Mongrel when compiling Ruby with OCRA
2011-11-10 23:08:07
If you are using OCRA and Mongrel with Ruby and can't compile because of an infinite loop, the simplest way is to prevent the loop running in the first place.
Credit where it is due. I wouldn't have known what to do without StackOverflow
But due to my own lack of understanding, I was wondering how on Earth to go about hacking Mongrel to break the loop. Then I thought about it sensibly. For anyone else who hasn't realised it straight away, this is probably the best option.
Credit where it is due. I wouldn't have known what to do without StackOverflow
But due to my own lack of understanding, I was wondering how on Earth to go about hacking Mongrel to break the loop. Then I thought about it sensibly. For anyone else who hasn't realised it straight away, this is probably the best option.
if ENV.has_key?('OCRA_EXECUTABLE') == true #will only run on the OCRA compiled build
server = Mongrel::HttpServer.new("127.0.0.1", "2000")
server.register("/", MyServerClass.new)
server.run.join
end
server = Mongrel::HttpServer.new("127.0.0.1", "2000")
server.register("/", MyServerClass.new)
server.run.join
end