Just moved to a new laptop running on Win 10/ruby 2.2.2/Rails 4.2.0 (No problem on previous Win 8 ruby 2.0.0/Rails 4.2/rspec 3.2). Now when installing rspec, there is a strange error below:
$ rails g rspec:install identical .rspec exist spec create spec/C:/Users/Jun C/AppData/Local/Temp/d20160219-10996-1x6hu8w/spec/spec_helper.rb C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:252:in mkdir': Invalid argument @ dir_s_mkdir - C:/D/code/rails_proj/engines/simple_orderx/spec/C: (Errno::EINVAL) from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:252:in fu_mkdir' from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:226:in block (2 levels) in mkdir_p' from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:224:inreverse_each' from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:224:in block in mkdir_p' from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:210:ineach' from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:210:in mkdir_p' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:61:inblock in invoke!' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in call' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in invoke_with_conflict_check' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!' There is /spec under Rails app root. The spec-helper file should be generated under /spec as /spec/spec-helper.rb. However the installation tried to generate spec-helper at spec/C:/Users/Jun C/AppData/Local/Temp/d20160219-10996-1x6hu8w/spec/. It seems that the path is wrong. Here is the line in Gemfile: s.add_development_dependency "rspec-rails", ">= 3.2.0" Here is the config in engine.rb config.generators do |g| g.template_engine :erb g.integration_tool :rspec g.test_framework :rspec g.fixture_replacement :factory_girl, :dir => "spec/factories" end The rspec version is 3.2.2. How to fix this wrong path in rspec installation? -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/9b07e23f-c1e4-4c51-a460-9897694b9c94%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
