我在Mac OS 10.7.5上使用rvm和ruby 1.9.3.
我希望能够使用Sublime Text 2 RubyTest包来验证我的Ruby语法.
但是,当我尝试Tools -> RubyTest -> Verify Ruby Syntax在任何ruby文件(test.rb下面)上运行时,RubyTest控制台中会显示以下错误:
/Users/jladieu/.rvm/rubies/ruby-1.9.3-p194/bin/ruby:1:无效的多字节字符(US-ASCII)
我的test.rb文件内容很简单:
class Test
def hello
puts "Hello world"
end
end
Run Code Online (Sandbox Code Playgroud)
我的RubyTest.sublime_settings文件如下:
{
"erb_verify_command": "erb -xT - {file_name} | ruby -c",
"ruby_verify_command": "ruby -c {file_name}",
"run_ruby_unit_command": "bundle exec ruby -Itest {relative_path}",
"run_single_ruby_unit_command": "bundle exec ruby -Itest {relative_path} -n '{test_name}'",
"run_cucumber_command": "zeus cucumber {relative_path} --no-color",
"run_single_cucumber_command": "zeus cucumber {relative_path}:{line_number} --no-color",
"run_rspec_command": "zeus rspec {relative_path}",
"run_single_rspec_command": "zeus rspec {relative_path}:{line_number}", …Run Code Online (Sandbox Code Playgroud)