在Ruby中运行Rpec时出错

时间:2016-11-05 17:41:08

标签: ruby-on-rails rspec rspec-rails

我正在关注coursera的课程,并且我的第一个作业详情可以在thisthis链接找到。我的问题是,只要我运行rails生成rspec:install我就会收到此错误:

    F:\todolists>rails generate rspec:install
      create  .rspec
      create  spec
      create  spec/C:/Users/Zeeshan Haider/AppData/Local/Temp/d20161105-1220-5idpo0/spec/spec_helper.rb
D:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/fileutils.rb:252:in `mkdir': Invalid argument @ dir_s_mkdir - F:/todolists/spec/C: (Errno::EINVAL)
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/fileutils.rb:252:in `fu_mkdir'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/fileutils.rb:226:in `block (2 levels) in mkdir_p'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/fileutils.rb:224:in `reverse_each'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/fileutils.rb:224:in `block in mkdir_p'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/fileutils.rb:210:in `each'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/fileutils.rb:210:in `mkdir_p'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:61:in `block in invoke!'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `call'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:25:in `create_file'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:27:in `copy_file'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/directory.rb:94:in `block in execute!'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/directory.rb:80:in `each'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/directory.rb:80:in `execute!'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/directory.rb:66:in `invoke!'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/directory.rb:52:in `directory'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-rails-3.5.2/lib/generators/rspec/install/install_generator.rb:23:in `block in copy_spec_files'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/tmpdir.rb:88:in `mktmpdir'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-rails-3.5.2/lib/generators/rspec/install/install_generator.rb:20:in `copy_spec_files'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/generators.rb:157:in `invoke'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/generate.rb:13:in `<top (required)>'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:130:in `generate_or_destroy'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:50:in `generate'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

F:\todolists>

知道我可以做些什么来测试我的作业?

感谢。

0 个答案:

没有答案