Skip to content

Unable to create spec folder using rails generate rspec:install #27129

@suresh02

Description

@suresh02

Steps to reproduce

  1. Install rails
  2. Install rspec gems
    3.Enter rails g rspec:install command in cmd
    (Guidelines for creating a bug report are available
    here
    )

Expected behavior

Spec folder should be generated

Actual behavior

D:\Demo\sample>rails generate rspec:install
   identical  .rspec
       exist  spec
      create  spec/C:/Users/suresh.achanta/AppData/Local/Temp/d20161117-6256-19l
lfm8/spec/spec_helper.rb
C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:253:in `mkdir': Invalid argument @ dir
_s_mkdir - D:/Demo/sample/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.1/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.1/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.1/lib/thor/actions
/create_file.rb:60:in `invoke!'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions
.rb:94:in `action'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions
/create_file.rb:25:in `create_file'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions
/file_manipulation.rb:27:in `copy_file'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions
/directory.rb:94:in `block in execute!'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions
/directory.rb:80:in `each'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions
/directory.rb:80:in `execute!'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions
/directory.rb:66:in `invoke!'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions
.rb:94:in `action'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions
/directory.rb:52:in `directory'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rspec-rails-3.5.2/lib/genera
tors/rspec/install/install_generator.rb:23:in `block in copy_spec_files'
        from C:/Ruby23-x64/lib/ruby/2.3.0/tmpdir.rb:89:in `mktmpdir'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rspec-rails-3.5.2/lib/genera
tors/rspec/install/install_generator.rb:20:in `copy_spec_files'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command
.rb:27:in `run'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocat
ion.rb:126:in `invoke_command'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocat
ion.rb:133:in `block in invoke_all'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocat
ion.rb:133:in `each'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocat
ion.rb:133:in `map'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocat
ion.rb:133:in `invoke_all'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/group.r
b:232:in `dispatch'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb
:440:in `start'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/g
enerators.rb:180:in `invoke'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/c
ommands/generate.rb:13:in `<top (required)>'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/ac
tive_support/dependencies.rb:293:in `require'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/ac
tive_support/dependencies.rb:293:in `block in require'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/ac
tive_support/dependencies.rb:259:in `load_dependency'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/ac
tive_support/dependencies.rb:293:in `require'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/c
ommands/commands_tasks.rb:138:in `require_command!'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/c
ommands/commands_tasks.rb:145:in `generate_or_destroy'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/c
ommands/commands_tasks.rb:60:in `generate'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/c
ommands/commands_tasks.rb:49:in `run_command!'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/c
ommands.rb:18:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

System configuration

Rails version:5.0.0.1

Ruby version:2.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions