1.9.2-rc2 -> 1.9.2-p0 breaks Sinatra

6 views
Skip to first unread message

Jeremy Henty

unread,
Aug 20, 2010, 7:58:25 AM8/20/10
to
My Sinatra apps work with 1.9.2-rc2. After upgrading to 1.9.2-p0 they
terminate immediately (no output, exit status 0). Can anyone
reproduce this? I would appreciate help investigating this, as this
makes 1.9.2-p0 unusable for me.

Linux From Scratch 6.5, kernel 2.6.35.2
gcc version 4.4.1
glibc 2.10.1
Rack uses Thin as the server backend
All gems up to date as per this morning (2010/08/20)

Regards,

Jeremy Henty

Luis Lavena

unread,
Aug 20, 2010, 8:03:15 AM8/20/10
to

Did you install and recompile all the gems from -rc2 to -p0 ?

Specially the ones dealing with Thin and EventManchine

removing those from the equation, your application still works?

--
Luis Lavena

Abhijit Hoskeri

unread,
Aug 20, 2010, 8:45:35 AM8/20/10
to
Jeremy Henty wrote:
> My Sinatra apps work with 1.9.2-rc2. After upgrading to 1.9.2-p0 they
> terminate immediately (no output, exit status 0). Can anyone
> reproduce this? I would appreciate help investigating this, as this
> makes 1.9.2-p0 unusable for me.
>

Sinatra's behaviour has appeared to change in the 1.9 compatible
versions.

I need to add the following line in my server.rb:

set :run, true

Also the template directory is no longer implicitly 'views', you need to
set it yourself.

set :views, File.dirname(__FILE__) + "/views"

-Abhijit
--
Posted via http://www.ruby-forum.com/.

Jeremy Henty

unread,
Aug 20, 2010, 8:56:24 AM8/20/10
to
On 2010-08-20, Luis Lavena <luisl...@gmail.com> wrote:
> On Aug 20, 8:58 am, Jeremy Henty <onepo...@starurchin.org> wrote:
>> My Sinatra apps work with 1.9.2-rc2.  After upgrading to 1.9.2-p0
>> they terminate  immediately  (no  output,   exit  status  0).
>
> Did you install and recompile all the gems from -rc2 to -p0 ?

No, because I never imagined that it might be necessary for an upgrade
from -rc2 to -p0 . But since you suggest it I have now tried removing
all of /usr/*/*ruby*, and re-installing ruby and all of my gems. No
change: all Sinatra apps terminate immediately, no output, exit status
0.

> Specially the ones dealing with Thin and EventManchine
>
> removing those from the equation, your application still works?

I uninstalled thin and eventmachine and it made no difference. I
assume the expectation was that the apps would fall back to the
webrick backend?

I ran "make check" and got one error (a Timeout) and "irb" runs OK, so
the Ruby core seems sound. Are there any other tests I could run?
Maybe something to check the Rack core? (I am afraid I know little
about Rack, I just use Sinatra and assume it will work.)

Has anyone managed to run Sinatra apps on 1.9.2-p0?

Regards,

Jeremy Henty

Jeremy Henty

unread,
Aug 20, 2010, 9:21:05 AM8/20/10
to
On 2010-08-20, Abhijit Hoskeri <abhijit...@gmail.com> wrote:

> Sinatra's behaviour has appeared to change in the 1.9 compatible
> versions.
>
> I need to add the following line in my server.rb:
>
> set :run, true
>
> Also the template directory is no longer implicitly 'views', you need to
> set it yourself.
>
> set :views, File.dirname(__FILE__) + "/views"

Thanks! That was it! But why should Sinatra change its behaviour
between 1.9.2-rc2 -> 1.9.2-p0? Any ideas? I would have said that the
*definition* of *-rc* is "behaviour won't change when you upgrade to
*-p*". Something, somewhere is doing it wrong.

Incidentally, the error message I get when I do not set the views
directory is very strange; Sinatra says:

Errno::ENOENT at /sinatra/index

No such file or directory -
[path to my Sinatra app directory]/<internal:lib/rubygems/views/index.haml

* file: tilt.rb
* location: read
* line: 122

[...]

It looks as though the template directory is being set to something
ridiculous, which suggests that setting it explicitly is really a
workaround for a bug.

I'll see what the Sinatra devs say.

Thanks again for your help!

Jeremy Henty

Rdogg Sv

unread,
Sep 15, 2010, 1:13:07 PM9/15/10
to
Abhijit Hoskeri wrote:
..

> Sinatra's behaviour has appeared to change in the 1.9 compatible
> versions.
>
> I need to add the following line in my server.rb:
>
> set :run, true
> ...


Thank you very much this solved my problem also, executing sinatra code
had no output and nothing happened, after adding that line it started
working again.

Reply all
Reply to author
Forward
0 new messages