小编Sha*_*nir的帖子

rails 5 - 无法生成rspec:install

我正在尝试使用rails构建restful api

我正在关注博客链接教程

https://scotch.io/tutorials/build-a-restful-json-api-with-rails-5-part-one

但是当我运行以下命令时

rails generate rspec:install

它会生成以下错误

identical  .rspec
       exist  spec
      create  spec/C:/Users/Shad Munir/AppData/Local/Temp/d20170503-6768-l4n0e9/spec/spec_helper.rb
C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:253:in `mkdir': Invalid argument @ dir_s_mkdir - E:/todos-api/spec/C: (Errno::EINVAL)
        from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:253:in `fu_mkdir'
        from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:227:in `block (2 levels) in mkdir_p'
        from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:225:in `reverse_each'
        from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:225:in `block in mkdir_p'
        from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:211:in `each'
        from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:211:in `mkdir_p'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:61:in `block in invoke!'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:60:in `invoke!'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions.rb:95:in `action'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:25:in `create_file'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/file_manipulation.rb:27:in `copy_file'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/directory.rb:94:in `block in execute!'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/directory.rb:80:in `each' …
Run Code Online (Sandbox Code Playgroud)

ruby rspec ruby-on-rails

6
推荐指数
1
解决办法
227
查看次数

标签 统计

rspec ×1

ruby ×1

ruby-on-rails ×1