Everything seems to be all set up and wired nicely -- so why doesn't
it just ... work?
Does anyone have experience with Camping on this platform?
Thanks a million.
-Eli
Aur
Thanks for your help!!
-Eli
On Apr 10, 8:12 am, SonOfLilit <sonofli...@gmail.com> wrote:
> Did you first try using Camping's default deploy and see that it works?
>
> Aur
>
Aur
On 4/10/07, Eli <ewo...@gmail.com> wrote:
>
I discovered that ruby scripts under FastCGI are kind of
temperamental. You have to wear kid gloves.
Certain errors during Ruby execution would be caught by the script's
error handling, other errors bypassed them entirely and simply crashed
the FastCGI module. The server would report a 500 error, with
absolutely no reason and nothing worth looking at in the logs.
One such way to get a 500 error is to have a ruby script fail during a
"require". I had a bunch of those that worked under IRB but did not
work under FastCGI ... for instance, "require 'camping'" didn't work,
because camping was a gem and I hadn't called "require 'rubygems'"
yet.
It took much playing around to find it, because, as I said, there was
no log with a readable exception.
Getting it to work heartened me greatly, and now I feel like I can
take on the world.
On 4/11/07, Eli <ewo...@gmail.com> wrote:
>
> Ok, in case anyone cares, I found my problem.
>
> I discovered that ruby scripts under FastCGI are kind of
> temperamental. You have to wear kid gloves.
>
> Certain errors during Ruby execution would be caught by the script's
> error handling, other errors bypassed them entirely and simply crashed
> the FastCGI module. The server would report a 500 error, with
> absolutely no reason and nothing worth looking at in the logs.
>
> One such way to get a 500 error is to have a ruby script fail during a
> "require". I had a bunch of those that worked under IRB but did not
> work under FastCGI ... for instance, "require 'camping'" didn't work,
> because camping was a gem and I hadn't called "require 'rubygems'"
> yet.
>
> It took much playing around to find it, because, as I said, there was
> no log with a readable exception.
>
> Getting it to work heartened me greatly, and now I feel like I can
> take on the world.
>
_why does that :P
> On Apr 10, 12:18 am, "Eli" <ewok...@gmail.com> wrote:
> > Imagine that -- a real technical problem on the forum!!!
> >
> > Everything seems to be all set up and wired nicely -- so why doesn't
> > it just ... work?
> >
> > Does anyone have experience with Camping on this platform?
> >
> > Thanks a million.
> >
> > -Eli
>
>
> >
>
Aur
Thanks so much for the idea, I'll check it out if FastCGI gives me
unforgivable problems in the future.
-Eli
http://mongrel.rubyforge.org/rdoc/classes/Mongrel/Camping.html
And I second vitaly here: Mongrel is more stable than FastCGI, and in
general, a better choice.
However - I need it to be a Windows service. I tried using the win32-
service gem, but Mongrel acts funny when it's running as a service.
Something is listening on the port, but an http request returns blank.
I'm running it using the standard:
Camping::Models::Base.establish_connection :adapter => 'sqlite3',
:database => 'tmp/camping.db'
h = Mongrel::HttpServer.new("0.0.0.0", 3001)
h.register("/catcarrier",
Mongrel::Camping::CampingHandler.new(CampingModule))
h.register("/favicon.ico", Mongrel::Error404Handler.new(""))
h.run.join
This works when I run the script in interactive mode. But under the
service (and wrapped in the "Daemon" class) I get the blank response.
(Note I can't use the mongrel-service because that's custom built for
Rails apps.)
Again ... does anyone have any experience with this?
Thanks.
-Eli