2016-11-27 22 views
0

新しいプロジェクトを作成する際にこのエラーが発生しますので、重複した質問に説明されている宝石のバージョンを追加します。"rails new blog"を使用して新しいアプリケーションを作成できません

新しいレールアプリケーションを作成しようとすると、このエラーが発生します。私は、コマンド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

WindowsでRuby on Railsを実行すると、[Error "Validate \ _default \ _type!":オプションのデフォルトはそのタイプ(ArgumentError)と一致する必要があります](http://stackoverflow.com/questions/40823526)/error-validate-default-type-an-options-default-its-type-argumeに一致する必要があります) –

答えて

0

を実行しているとき、私はまた、あなたが使用トール宝石のバージョンに問題があり、同じエラーを取得しています。

詳しくはhereをご覧ください。この質問は重複しています。

関連する問題