我使用标准RVM和自制软件安装程序安装了Ruby。我尝试安装新版本的readline,然后强制重新安装ruby-2.0.0,但这并没有解决这个问题。我可以通过搜索找到的唯一其他类似错误是丝瓜络,但这对我没有帮助,因为我不能同样修改html5 gem。升级到Ruby 2时有没有其他人遇到过这个?
/Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/html5-0.10.0/lib/html5/inputstream.rb:305: too short escaped multibyte character: /^ (SyntaxError)
( [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
| \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
)/x
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/html5-0.10.0/lib/html5/tokenizer.rb:2:in `<top (required)>'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/html5-0.10.0/lib/html5/html5parser.rb:2:in `<top (required)>'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/html5-0.10.0/lib/html5.rb:1:in `<top (required)>'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/xss_terminate-0.2/lib/xss_terminate.rb:2:in `<top (required)>'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/jday/git/forks/shoptap-server/config/application.rb:8:in `<top (required)>'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/jday/.rvm/gems/ruby-2.0.0-p0@rails3.2/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
答案 0 :(得分:0)
好吧,事实证明,如果我真的读过错误消息,我会意识到这是html5 gem中的语法错误,这是xss_terminate的依赖。用silofah-activerecord替换xss_terminate(参见xss_foliate)解决了这个问题。