Help with project init and EINVAL error

Hi all,

I am new to ruby and to middleman. I installed the software per the instructions at the site. But when I try to create an initial project, I get the following error: fileutils.rb:252:in `mkdir’: Invalid argument @ dir_s_mkdir - C:/Users/exco 41/my_new_project/C: (Errno::EINVAL)

I am running windows 10, ruby 2.2.5p319, rubygems 2.6.8, and middleman 4.1.10.

Any help would be greatly appreciated. thanks!

(What I see on my screen)

$ middleman init my_new_project
run git clone --depth 1 https://github.com/middleman/middleman-templates-default.git C:/Users/AppData/Local/Temp/d20161102-9108-1jk3eq7 from “.”
Cloning into ‘C:/Users/AppData/Local/Temp/d20161102-9108-1jk3eq7’…
remote: Counting objects: 22, done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 22 (delta 0), reused 14 (delta 0), pack-reused 0
Unpacking objects: 100% (22/22), done.
exist
create C:/Users/AppData/Local/Temp/d20161102-9108-1jk3eq7/template/.gitignore
C:/Ruby22/lib/ruby/2.2.0/fileutils.rb:252:in mkdir': Invalid argument @ dir_s_mkdir - C:/Users/my_new_project/C: (Errno::EINVAL) from C:/Ruby22/lib/ruby/2.2.0/fileutils.rb:252:in fu_mkdir’
from C:/Ruby22/lib/ruby/2.2.0/fileutils.rb:226:in block (2 levels) in mkdir_p' from C:/Ruby22/lib/ruby/2.2.0/fileutils.rb:224:in reverse_each’
from C:/Ruby22/lib/ruby/2.2.0/fileutils.rb:224:in block in mkdir_p' from C:/Ruby22/lib/ruby/2.2.0/fileutils.rb:210:in each’
from C:/Ruby22/lib/ruby/2.2.0/fileutils.rb:210:in mkdir_p' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:61:in block in invoke!’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in call' from C:/Ruby22/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/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in invoke!' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in action’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:25:in create_file' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:115:in template’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/directory.rb:92:in block in execute!' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/directory.rb:80:in each’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/directory.rb:80:in execute!' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/directory.rb:66:in invoke!’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in action' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/directory.rb:52:in directory’
from C:/Users/AppData/Local/Temp/d20161102-9108-1jk3eq7/Thorfile:10:in copy_default_files' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in block in invoke_all’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in each' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in map’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in invoke_all' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/group.rb:232:in dispatch’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in invoke' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/middleman-cli-4.1.10/lib/middleman-cli/init.rb:77:in block in init’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions.rb:184:in block in inside' from C:/Ruby22/lib/ruby/2.2.0/fileutils.rb:127:in chdir’
from C:/Ruby22/lib/ruby/2.2.0/fileutils.rb:127:in cd' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions.rb:184:in inside’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/middleman-cli-4.1.10/lib/middleman-cli/init.rb:71:in init' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in block in invoke_all’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in each' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in map’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in invoke_all' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/group.rb:232:in dispatch’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in invoke' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:40:in block in register’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in dispatch' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in start’
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/middleman-cli-4.1.10/bin/middleman:72:in <top (required)>' from C:/Ruby22/bin/middleman:22:in load’
from C:/Ruby22/bin/middleman:22:in `’

I’d advise not using Windows for ANY Ruby development. Mac OS is best, or you can easily get a Linux VM running on your windows machine.