I'm trying to migrate a sinatra application to ruby 1.9
I'm using sinatra 1.0, rack 1.2.0 and erb templates
when I start sinatra it works but when I request the web page from the browser I get this error:
Encoding::CompatibilityError at /
incompatible character encodings: ASCII-8BIT and UTF-8
all .rb files has this header:
#!/usr/bin/env ruby
# encoding: utf-8
I think the problem is in the erb files even if it shows that it's UTF-8 encoded
[user@localhost views]$ file home.erb
home.erb: UTF-8 Unicode text
any one had this problem before? is sinatra not fully compatible with ruby 1.9?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…