# 1.9.2-rc2 -\> 1.9.2-p0 breaks Sinatra

**URL:** <https://www.ruby-forum.com/t/1-9-2-rc2-1-9-2-p0-breaks-sinatra/193609>\
**Category:** Ruby\
**Created:** [August 20, 2010, 2:00pm UTC](https://www.ruby-forum.com/t/1-9-2-rc2-1-9-2-p0-breaks-sinatra/193609 "2010-08-20T14:00:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [August 20, 2010, 2:00pm UTC](https://www.ruby-forum.com/t/1-9-2-rc2-1-9-2-p0-breaks-sinatra/193609/1 "2010-08-20T14:00:34Z")

</div>

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 H.

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [August 20, 2010, 2:07pm UTC](https://www.ruby-forum.com/t/1-9-2-rc2-1-9-2-p0-breaks-sinatra/193609/2 "2010-08-20T14:07:35Z")

</div>

On Aug 20, 8:58 am, Jeremy H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

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?

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [August 20, 2010, 2:43pm UTC](https://www.ruby-forum.com/t/1-9-2-rc2-1-9-2-p0-breaks-sinatra/193609/3 "2010-08-20T14:43:18Z")

</div>

Jeremy H. 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

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [August 20, 2010, 3:00pm UTC](https://www.ruby-forum.com/t/1-9-2-rc2-1-9-2-p0-breaks-sinatra/193609/4 "2010-08-20T15:00:16Z")

</div>

On 2010-08-20, Luis L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Aug 20, 8:58 am, Jeremy H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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 H.

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [August 20, 2010, 3:26pm UTC](https://www.ruby-forum.com/t/1-9-2-rc2-1-9-2-p0-breaks-sinatra/193609/5 "2010-08-20T15:26:02Z")

</div>

On 2010-08-20, Abhijit H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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 H.

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [August 20, 2010, 3:21pm UTC](https://www.ruby-forum.com/t/1-9-2-rc2-1-9-2-p0-breaks-sinatra/193609/6 "2010-08-20T15:21:21Z")

</div>

Jeremy H.:

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

Yes, I upgraded a (granted, trivial) Sinatra app from Ruby 1.9.1-p378 to  
1.9.2-p0 and all I needed to cater for was the lack of the current dir  
in $LOAD\_PATH (but it shouldnâ€™t matter if you ran 1.9.2-rc2 previously):

> <https://github.com/chastell/tributary/commit/292145ba5e9cef868cf5a5f18247f67425bee110>

Iâ€™m affraid itâ€™s a bit hard to tell what might be wrong without more  
info. Can you come up with a minimal app that doesnâ€™t work (and share  
it with us)?

â€” Piotr S.

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [September 15, 2010, 7:13pm UTC](https://www.ruby-forum.com/t/1-9-2-rc2-1-9-2-p0-breaks-sinatra/193609/7 "2010-09-15T19:13:04Z")

</div>

Abhijit H. 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.
