I have a simple bit of code that serves up index.html in our application.
class StaticContentController < Sinatra::Base
get '/' do
send_file '/Users/jilles/git/localstream/www/localstream-web/foo.html'
end
end
This worked fine up to 1.3.6. After upgrading to 1.4.2, it mangles the content by prepending and appending some ramdom characters. I've been manually installing and uninstalling gems with specific versions until I narrowed it down to just the sinatra gem and the way it interacts with fishwife. Using gem list, I can see that sinatra is the only gem that is different. I've verified it is broken for 1.4.0 and 1.4.1 as well. I've tried with a simple foo.html file that contains nothing but the word hello and it returns '6 hello 0' in the browser.
to break: gem uninstall sinatra; gem install --version '1.4.2' sinatra
and to fix: gem uninstall sinatra; gem install --version '1.3.6' sinatra
So, what is wrong here? Using either mizuno or rackup, things are fine. So obviously it is a problem with fishwife. On the other hand that works fine with 1.3.6. So that makes me wonder what changed between that version and 1.4.0 that breaks things for me. Any help here would be greatly appreciated.
These are all the gems I have installed:
backports (3.3.0)
bundler (1.3.5)
eventmachine (1.0.3 java)
faraday (0.8.7)
fishwife (1.5.0 java)
hashie (2.0.4)
httpauth (0.2.0)
jsonj-integration (1.2)
jwt (0.1.8)
multi_json (1.7.3)
multipart-post (1.2.0)
oauth (0.4.7)
oauth2 (0.8.1)
omniauth (1.1.4)
omniauth-facebook (1.4.1)
omniauth-foursquare (0.0.8)
omniauth-oauth (1.0.1)
omniauth-oauth2 (1.1.1)
omniauth-openid (1.0.1)
omniauth-twitter (0.0.16)
rack (1.5.2)
rack-openid (1.3.1)
rack-protection (1.5.0)
rack-test (0.6.2)
rjack-jetty (9.0.2.0 java)
rjack-slf4j (1.7.5.0 java)
ruby-openid (2.2.3)
sinatra (1.3.6)
sinatra-docdsl (0.3.0)
tilt (1.4.0)