在lion上无效的多字节字符(US-ASCII)(SyntaxError),#encoding:utf-8不起作用

时间:2011-11-24 22:55:25

标签: ruby-on-rails autotest

我正在尝试使用我的mac上的growl和fsevent安装自动测试,但是得到了以下消息:正如许多其他人所获得的:     加载autotest / rails_rspec2     /Users/xunx/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ZenTest-4.6.2/lib/autotest.rb:316:in load': /Users/xunx/projects/ourbull/.autotest:1: invalid multibyte char (US-ASCII) (SyntaxError) from /Users/xunx/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ZenTest-4.6.2/lib/autotest.rb:316:in阻止初始化'     来自/Users/xunx/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ZenTest-4.6.2/lib/autotest.rb:315:in each' from /Users/xunx/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ZenTest-4.6.2/lib/autotest.rb:315:in initialize'     来自/Users/xunx/.rvm/gems/ruby-1.9.2-p290@rails3/gems/rspec-core-2.0.1/lib/autotest/rspec2.rb:11:in initialize' from /Users/xunx/.rvm/gems/ruby-1.9.2-p290@rails3/gems/rspec-rails-2.0.1/lib/autotest/rails_rspec2.rb:31:in initialize'     来自/Users/xunx/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ZenTest-4.6.2/lib/autotest.rb:245:in new' from /Users/xunx/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ZenTest-4.6.2/lib/autotest.rb:245:in run'     来自/Users/xunx/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ZenTest-4.6.2/bin/autotest:7:in <top (required)>' from /Users/xunx/.rvm/gems/ruby-1.9.2-p290@rails3/bin/autotest:19:in load'     来自/Users/xunx/.rvm/gems/ruby-1.9.2-p290@rails3/bin/autotest:19:in`'

我用Google搜索并尝试将#coding:utf-8放到所有这些文件中,但不起作用。 还试图按照rvm网站上的建议更改textmate_ruby文件,也不起作用。

这是我的系统: Mac OS X Lion Ruby 1.9.2 Rails 3.0.1   #gem'autotest','4.4.6'   #gem'autotest-rails-pure','4.1.2'   #gem'autotest-fsevent','0.2.4'   #gem'autotest-growl','0.2.9'

有什么想法吗?感谢

1 个答案:

答案 0 :(得分:0)

我在https://github.com/drhenner/ror_ecommerce/blob/master/Gemfile

时遇到了同样的问题

我不得不将Zentest改为强制4.5.0

gem "ZenTest", '4.5.0'# 4.6 breaks autotest