8

http://testfirst.org/learn_javascriptを調べながら、00_hello/ フォルダーで rake jasmine を実行しようとしました。次のエラーが表示されます。

hugos-MacBook-Pro:00_hello hugo$ rake jasmine --trace
(in /Users/hugo/Developer/test_first_javascript/learn_javascript)
** Invoke jasmine (first_time)
** Invoke jasmine:server (first_time)
** Invoke jasmine:require (first_time)
** Execute jasmine:require
** Execute jasmine:server
your tests are here:
  http://localhost:8888/
rake aborted!
(<unknown>): did not find expected alphabetic or numeric character while scanning an alias at line 5 column 7
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse'
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse'
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in `load'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/config.rb:19:in `simple_config'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/config.rb:62:in `spec_dir'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/runner_config.rb:32:in `spec_dir'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/application.rb:28:in `block (2 levels) in app'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:141:in `new'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:141:in `block in generate_map'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:141:in `each'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:141:in `generate_map'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:128:in `to_app'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:55:in `app'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/application.rb:14:in `app'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/server.rb:3:in `initialize'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/tasks/jasmine.rake:51:in `new'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/jasmine-1.2.1/lib/jasmine/tasks/jasmine.rake:51:in `block (2 levels) in <top (required)>'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/Users/hugo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/bin/rake:19:in `load'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/bin/rake:19:in `<main>'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/Users/hugo/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => jasmine => jasmine:server

私はいくつかの調査を行い、これに出くわしました: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680227。Ruby パーサーが間違っている可能性があります / 間違ったバージョンの Ruby を使用しています。

hugos-MacBook-Pro:00_hello hugo$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]

考え?

4

1 に答える 1

25

yamlには機能しない文字がいくつかあるようです。spec / support / jasmine.yamlを見てください。次のようなものがあります:

- **/*.js

次のように置き換えてください。

- '**/*.js'
于 2012-10-27T15:15:24.260 に答える