title: Error "'Validate_default_type!': An option's default must match its type (ArgumentError)" when running Ruby on Rails generate on Windows
body: <p>I am following <a href="http://guides.rubyonrails.org/getting_started.html" rel="nofollow noreferrer">this tutorial</a> and have just started. I have installed Ruby on Rails with <code>gem install rails</code> and have created a blog with <code>rails new blog</code>.</p>
  
  <p>The tutorial now says that I need to run <code>rails generate controller Welcome index</code>, however when I do, I get this error:</p>
  
  <pre><code>C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/parser/option.rb:130:in `validate_default_type!': An option's default must match its type. (ArgumentError)
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/parser/option.rb:113:in `validate!'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/parser/argument.rb:24:in `initialize'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/parser/option.rb:9:in `initialize'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/base.rb:544:in `new'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/base.rb:544:in `build_option'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/base.rb:278:in `class_option'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/generators/base.rb:202:in `class_option'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/generators/base.rb:178:in `block in hook_for'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/generators/base.rb:168:in `each'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/generators/base.rb:168:in `hook_for'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:9:in `&lt;class:ScaffoldControllerGenerator&gt;'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:6:in `&lt;module:Generators&gt;'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:5:in `&lt;module:Rails&gt;'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:4:in `&lt;top (required)&gt;'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jbuilder-2.6.0/lib/jbuilder/railtie.rb:32:in `block in &lt;class:Railtie&gt;'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:230:in `call'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:230:in `block in run_generators_blocks'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:247:in `each'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:247:in `each_registered_block'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:230:in `run_generators_blocks'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:453:in `block in run_generators_blocks'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine/railties.rb:13:in `each'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine/railties.rb:13:in `each'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:453:in `run_generators_blocks'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:465:in `load_generators'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:144:in `generate_or_destroy'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:60:in `generate'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
      from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `&lt;top (required)&gt;'
      from bin/rails:4:in `require'
      from bin/rails:4:in `&lt;main&gt;'
  </code></pre>
  
  <p>I have found a similar question on Stack Overflow asking the same question <a href="https://stackoverflow.com/questions/32552782/thor-argument-error-when-trying-to-create-a-new-rails-app">here</a>, but the poster never responded when asked to show his <code>gem list</code>. So here's mine:</p>
  
  <pre><code>actioncable (5.0.0.1)
  actionmailer (5.0.0.1)
  actionpack (5.0.0.1)
  actionview (5.0.0.1)
  activejob (5.0.0.1)
  activemodel (5.0.0.1)
  activerecord (5.0.0.1)
  activesupport (5.0.0.1)
  arel (7.1.4)
  bigdecimal (1.2.7, default: 1.2.6)
  builder (3.2.2)
  bundler (1.13.6)
  coffee-rails (4.2.1)
  coffee-script (2.4.1)
  coffee-script-source (1.11.1)
  concurrent-ruby (1.0.2)
  debug_inspector (0.0.2)
  erubis (2.7.0)
  execjs (2.7.0)
  globalid (0.3.7)
  i18n (0.7.0)
  io-console (0.4.6, default: 0.4.3)
  jbuilder (2.6.0)
  jquery-rails (4.2.1)
  json (2.0.2, default: 1.8.1)
  loofah (2.0.3)
  mail (2.6.4)
  method_source (0.8.2)
  mime-types (3.1)
  mime-types-data (3.2016.0521)
  mini_portile2 (2.1.0)
  minitest (5.9.1, 5.4.3)
  multi_json (1.12.1)
  nio4r (1.2.1)
  nokogiri (1.6.8.1 x86-mingw32)
  power_assert (0.3.1, 0.2.2)
  psych (2.2.0, default: 2.0.8)
  puma (3.6.2)
  rack (2.0.1, 1.6.4)
  rack-protection (1.5.3)
  rack-test (0.6.3)
  rails (5.0.0.1)
  rails-dom-testing (2.0.1)
  rails-html-sanitizer (1.0.3)
  railties (5.0.0.1)
  rake (11.3.0, default: 10.4.2)
  rdoc (5.0.0, default: 4.2.0)
  sass (3.4.22)
  sass-rails (5.0.6)
  sinatra (1.4.7)
  sprockets (3.7.0)
  sprockets-rails (3.2.0)
  sqlite3 (1.3.12 x86-mingw32)
  test-unit (3.2.3, 3.0.8)
  thor (0.19.2, 0.19.1)
  thread_safe (0.3.5)
  tilt (2.0.5)
  turbolinks (5.0.1)
  turbolinks-source (5.0.0)
  tzinfo (1.2.2)
  tzinfo-data (1.2016.10)
  uglifier (3.0.3)
  web-console (3.4.0)
  websocket-driver (0.6.4)
  websocket-extensions (0.1.2)
  </code></pre>
  
  <p>Has anybody encountered this error before? If so, how did you resolve it?</p>