rspec --init not working /`mkd ir':无效参数 - ./C:(Errno :: EINVAL) [英] rspec --init not working/ `mkd ir': Invalid argument - ./C: (Errno::EINVAL)

查看:103
本文介绍了rspec --init not working /`mkd ir':无效参数 - ./C:(Errno :: EINVAL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注codechool的 rspec 课程。安装工作正常。我为该项目制作了一个名为rspec-zombie的文件。精细。但是当我在powershell中尝试rspec --init时,我得到了一个不圣洁的错误信息。我的印象是,应该在目录内制作一些文件,这些文件不在那里。如下所示。

I'm following codeschool's class on rspec. Installing worked fine. I made a file called rspec-zombie for the project. Fine. But when I tried rspec --init in powershell, I got an unholy error message. I'm under the impression there are supposed to be some files made inside the directory, which aren't there. It follows.

C:\Users\Roman\The-Odin-Project\rspec-zombie> rspec --init
  create   .rspec
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-support-3.1.0/lib/rspec/support/directory_maker.rb:17:in `mkd
ir': Invalid argument - ./C: (Errno::EINVAL)
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-support-3.1.0/lib/rspec/support/directory_maker.
rb:17:in `block in mkdir_p'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-support-3.1.0/lib/rspec/support/directory_maker.
rb:13:in `each'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-support-3.1.0/lib/rspec/support/directory_maker.
rb:13:in `mkdir_p'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/project_initializer.rb
:33:in `copy_template'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/project_initializer.rb
:22:in `run'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/option_parser.rb:81:in
 `block (2 levels) in parser'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/optparse.rb:1360:in `call'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/optparse.rb:1360:in `block in parse_in_order'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/optparse.rb:1347:in `catch'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/optparse.rb:1347:in `parse_in_order'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/optparse.rb:1341:in `order!'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/optparse.rb:1432:in `permute!'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/optparse.rb:1453:in `parse!'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/option_parser.rb:16:in
 `parse'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/option_parser.rb:8:in
`parse'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/configuration_options.
rb:120:in `command_line_options'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/configuration_options.
rb:154:in `custom_options_file'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/configuration_options.
rb:112:in `file_options'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/configuration_options.
rb:44:in `organize_options'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/configuration_options.
rb:14:in `initialize'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/runner.rb:58:in `new'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/runner.rb:58:in `run'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/lib/rspec/core/runner.rb:37:in `invok
e'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.3/exe/rspec:4:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/bin/rspec:23:in `load'
        from C:/RailsInstaller/Ruby1.9.3/bin/rspec:23:in `<main>'


推荐答案

Here's how I finally fixed this crap:

下面是我最终解决这个问题的方法: -core rspec-expectations rspec-mocks rspec-support
gem install rspec -v 2.14.1

gem uninstall rspec gem uninstall rspec-core rspec-expectations rspec-mocks rspec-support gem install rspec -v 2.14.1

巴斯cally,rspec的新版本在Windows上被破坏。不要使用它们。这样做和rspec工作得很好。

Basically, newer versions of rspec are broken on Windows. Don't use them. Do this and rspec works just fine.

这篇关于rspec --init not working /`mkd ir':无效参数 - ./C:(Errno :: EINVAL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆