2016-11-27 61 views
0

我在创建新项目期间遇到此错误,因此我将在哪里添加thor宝石版本,如给出的重复问题中所述。我无法使用“rails新博客”创建新应用程序

我收到这个错误,当我试图创建一个新的rails应用程序。我也越来越相同的错误,当我运行命令rails -v

[email protected]:~/work/practice$ rails new blog 
/home/umesh/.rvm/gems/ruby-2.3.1/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 /home/umesh/.rvm/gems/ruby-2.3.1/gems/thor-0.19.2/lib/thor/parser/option.rb:113:in `validate!' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/thor-0.19.2/lib/thor/parser/argument.rb:24:in `initialize' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/thor-0.19.2/lib/thor/parser/option.rb:9:in `initialize' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/thor-0.19.2/lib/thor/base.rb:544:in `new' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/thor-0.19.2/lib/thor/base.rb:544:in `build_option' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/thor-0.19.2/lib/thor/base.rb:278:in `class_option' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/generators/base.rb:202:in `class_option' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/generators/app_base.rb:71:in `add_shared_options_for' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:160:in `<class:AppGenerator>' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:159:in `<module:Generators>' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:153:in `<module:Rails>' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:3:in `<top (required)>' 
    from /home/umesh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require' 
    from /home/umesh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/commands/application.rb:2:in `<top (required)>' 
    from /home/umesh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require' 
    from /home/umesh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/cli.rb:14:in `<top (required)>' 
    from /home/umesh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require' 
    from /home/umesh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/bin/rails:9:in `<top (required)>' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/bin/rails:23:in `load' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/bin/rails:23:in `<main>' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval' 
    from /home/umesh/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>' 
[email protected]:~/work/practice$ 
+3

[错误“Validate \ _default \ _type!”的可能重复:在Windows上运行Ruby on Rails时,选项的默认值必须与其类型(ArgumentError)匹配(http://stackoverflow.com/questions/40823526) /错误验证默认型的选项 - 缺省 - 必匹配其型argume) –

回答

0

没有与您使用雷神宝石版中的问题。

看一看here了解更多信息。这个问题是重复的。

相关问题