0

我正在尝试通过关注 railstutorial.org 网站来学习 Ruby。我在自动化测试部分,正在运行 Guard,但它会引发错误:

C:\Users\Thomas\Documents\Development\teachmtg.com [master]> bundle exec guard
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.1/lib/guard/dsl.rb:119:in `instance_eval': C:/Users/Thomas/Documents/Development/teachmtg.com/Guardfile:4: syntax error, unexpected ',' (SyntaxError)
guard 'rspec', :version => 2 do, :all_after_pass => false do
                                ^
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.1/lib/guard/dsl.rb:119:in `instance_eval_guardfile'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.1/lib/guard/dsl.rb:74:in `evaluate_guardfile'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.1/lib/guard.rb:147:in `setup_from_guardfile'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.1/lib/guard.rb:63:in `setup'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.1/lib/guard.rb:188:in `start'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.1/lib/guard/cli.rb:110:in `start'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.1/bin/guard:6:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/bin/guard:23:in `load'
        from C:/RailsInstaller/Ruby1.9.3/bin/guard:23:in `<main>'

由于我对 Ruby 和 Rails 完全陌生,所以我不知道去哪里寻找,寻找什么等等。

你能给我一些提示和指示吗?

谢谢 !

4

1 回答 1

2

从Guardfile 中的表达式中删除do:version => 2 do, :all_after_pass ...

于 2013-06-27T21:31:27.683 回答