Adapters on MRI 1.9.1

1 view
Skip to first unread message

Clive Crous

unread,
Nov 16, 2009, 4:24:42 AM11/16/09
to ramaze
Are there any adapters (besides Webrick) that work on MRI 1.9.1?

webrick: incredibly slow but works perfectly

thin: gem (thin 1.2.4) installs but in ramaze I just get the following:
log:
DEBUG -- : Using thin
curl:
curl: (52) Empty reply from server

ebb: gem (ebb 0.3.2) installs but when I try start ramaze it crashes
with this message:
unititialized constant Ebb::FFI

in fact, I get the same if try use ebb by itself outside of ramaze too:

mongrel: gem does not install
c complitation errorn in http11.c: error: 'struct RString' has no
member named 'ptr'


Clive

Clive Crous

unread,
Nov 16, 2009, 4:55:04 AM11/16/09
to ramaze
2009/11/16 Clive Crous <clive...@gmail.com>:

> thin: gem (thin 1.2.4) installs but in ramaze I just get the following:
>  log:
>    DEBUG -- : Using thin
>  curl:
>    curl: (52) Empty reply from server

It's worth noting here that a minimal "hard coded" config.ru returning
'hi' works fine. It's only when using thin in conjunction with Ramaze
that nothing gets returned.

Clive

Gavin Kistner

unread,
Nov 16, 2009, 9:27:43 AM11/16/09
to ram...@googlegroups.com
On Nov 16, 2009, at 2:24 AM, Clive Crous wrote:
> Are there any adapters (besides Webrick) that work on MRI 1.9.1?
>
> thin: gem (thin 1.2.4) installs but in ramaze I just get the following:
> log:
> DEBUG -- : Using thin
> curl:
> curl: (52) Empty reply from server

Not sure what the issue is here. I use Thin with 1.9.1p243 on both OS X for development and 1.9.1p243 under Ubuntu and Fedora.

Michael Fellinger

unread,
Nov 16, 2009, 9:51:37 AM11/16/09
to ram...@googlegroups.com
On Mon, Nov 16, 2009 at 6:24 PM, Clive Crous <clive...@gmail.com> wrote:
>
> Are there any adapters (besides Webrick) that work on MRI 1.9.1?
>
> webrick: incredibly slow but works perfectly
>
> thin: gem (thin 1.2.4) installs but in ramaze I just get the following:
>  log:
>    DEBUG -- : Using thin
>  curl:
>    curl: (52) Empty reply from server

Thin doesn't work in :dev mode because of issues with the Lint
middleware, use thin from github or :live mode.

> ebb: gem (ebb 0.3.2)  installs but when I try start ramaze it crashes
> with this message:
>  unititialized constant Ebb::FFI

gem install ffi
should fix it.

>  in fact, I get the same if try use ebb by itself outside of ramaze too:
>
> mongrel: gem does not install
>  c complitation errorn in http11.c: error: 'struct RString' has no
> member named 'ptr'

Mongrel still has to be ported/released for 1.9, have been telling the
devs for a year now, but no reaction.
There were rumors about a mongrel 2.0 that integrates better with
rack, but nothing released yet.
http://github.com/taf2/mongrel/ works on 1.9, if you want to build it manually.

>
> Clive

--
Michael Fellinger
CTO, The Rubyists, LLC
972-996-5199

Clive Crous

unread,
Nov 16, 2009, 10:08:01 AM11/16/09
to ram...@googlegroups.com
2009/11/16 Michael Fellinger <m.fel...@gmail.com>:

>> ebb: gem (ebb 0.3.2)  installs but when I try start ramaze it crashes
>> with this message:
>>  unititialized constant Ebb::FFI
>
> gem install ffi
> should fix it.

Unfortunately it does not fix it.

Clive

Michael Fellinger

unread,
Nov 16, 2009, 10:41:20 AM11/16/09
to ram...@googlegroups.com
Just tried it, their autoload seems to fail:
require 'ebb_ffi' before Ramaze.start should do it.

Clive Crous

unread,
Nov 16, 2009, 10:49:26 AM11/16/09
to ram...@googlegroups.com
2009/11/16 Michael Fellinger <m.fel...@gmail.com>:

> Just tried it, their autoload seems to fail:
> require 'ebb_ffi' before Ramaze.start should do it.

I don't think anything will fix it:

% sudo gem install ffi
[sudo] password for clive:
Building native extensions. This could take a while...
Successfully installed ffi-0.5.1
1 gem installed
Installing ri documentation for ffi-0.5.1...
Updating class cache with 2167 classes...
Installing RDoc documentation for ffi-0.5.1...

% ruby -rubygems -rebb -rebb_ffi -e ''
ruby:0:in `require': uninitialized constant Ebb::FFI (NameError)

% ruby -rubygems -rebb -rffi -rebb_ffi -e ''
ruby:0:in `require': uninitialized constant Ebb::FFI (NameError)

Clive

Clive Crous

unread,
Nov 16, 2009, 10:50:36 AM11/16/09
to ram...@googlegroups.com
2009/11/16 Michael Fellinger <m.fel...@gmail.com>:

> Thin doesn't work in :dev mode because of issues with the Lint
> middleware, use thin from github or :live mode.

What's interesting to note here is that I've successfully used the
same version of Thin, in :dev mode with Sinatra or by itself.
It's only inside of Ramaze that it fails.

Clive

Michael Fellinger

unread,
Nov 16, 2009, 11:09:02 AM11/16/09
to ram...@googlegroups.com

Sinatra doesn't use Lint, maybe because of this.
I talked with raggi, he fixed it recently:
http://github.com/macournoyer/thin/commit/ad10c3a8e96303e992269ba38a3ac3095f5faa6f
I don't think I want to work around this issue, if you don't want to
use Lint, don't use it.

Michael Fellinger

unread,
Nov 16, 2009, 11:12:02 AM11/16/09
to ram...@googlegroups.com
the ruby -r parameter is not the same as require:

sigma ~ % ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]
sigma ~ % gem list | egrep 'ffi|ebb'
ebb (0.3.2)
ffi (0.5.1)
sigma ~ % ruby -e 'require "ebb_ffi"; require "ebb"'
sigma ~ %

Clive Crous

unread,
Nov 16, 2009, 11:43:05 AM11/16/09
to ram...@googlegroups.com
2009/11/16 Michael Fellinger <m.fel...@gmail.com>:

> the ruby -r parameter is not the same as require:

I tried to illustrate what I was getting in my app.

Doing those requires before ramaze.start results in the same error.

Clive

Pistos

unread,
Nov 16, 2009, 11:52:38 AM11/16/09
to Ramaze
On Nov 16, 4:55 am, Clive Crous <clive.cr...@gmail.com> wrote:
> 2009/11/16 Clive Crous <clive.cr...@gmail.com>:
>
> > thin: gem (thin 1.2.4) installs but in ramaze I just get the following:
> >  log:
> >    DEBUG -- : Using thin
> >  curl:
> >    curl: (52) Empty reply from server
>
> It's worth noting here that a minimal "hard coded" config.ru returning
> 'hi' works fine. It's only when using thin in conjunction with Ramaze
> that nothing gets returned.

FWIW, here's what helped me when I had the "empty response" problem
with Thin under Ramaze:

http://groups.google.com/group/ramaze/browse_thread/thread/f60127a38e234b02/9c29b29faf8733cf?lnk=gst&q=thin#9c29b29faf8733cf

sam carr

unread,
Nov 17, 2009, 2:33:00 PM11/17/09
to ram...@googlegroups.com
Perhaps worth a look at Unicorn (http://unicorn.bogomips.org/) - the
new ruby server on the scene?

From what I read, it is very fast but it achieves this by assuming
clients are fast, local and make only brief requests. It pretty much
requires a reverse proxy in front (nginx is ideal by the sounds of it)
and still won't be a good solution for deployment of certain types of
web app: ones with slow requests. Still, it looks like one to watch
and I believe that sister project Rainbows!
(http://rainbows.rubyforge.org/) is intended to sort out those cases,
though it's even younger. I should be very clear: I've not tried using
either of these projects, I've only read about them.

BTW, don't you hate names with exclamation marks built into them!

Reply all
Reply to author
Forward
0 new messages